HM_ExtAPI::CreateSurfaceNURBS()
Creates NURBS surface object.
Syntax
bool CreateSurfaceNURBS(
HM_EntityGeometrySurface& new_nurbs,
int u_deg,
int v_deg,
bool u_rational,
bool v_rational,
int uknots_size,
int vknots_size,
int poles_usize,
int poles_vsize,
const double* uknots,
const double* vknots,
const HM_Point* poles,
const double* weights
);
Type
HyperMesh Ext API
Description
The function creates the surface object of the type HM_ExtAPI::NURBS_SURFACE().
The NURBS surface is defined in a standard way as generalization of NURBS curve for two parameter values. See CreateCurveNURBS for details.
If the function succeeds, the return value is true. If the function fails, the return value is false. To get extended value information, call HM_ExtAPI::GetLastErrorCode().
Requires including hm_extapi.h.
Inputs
- new_nurbs
- [out] - Handle to new surface object.
- u_deg
- [in] - NURBS degree on U parameter.
- v_deg
- [in] - NURBS degree on V parameter.
- u_rational
- [in] - Returns true if surface NURBS is rational on U parameter. Returns false if surface is non-rational B-spline.
- v_rational
- [in] - Returns true if surface NURBS is rational on V parameter. Returns false if surface is non-rational B-spline.
- uknots_size
- [in] - Number of U parametric knots.
- vknots_size
- [in] - Number of V parametric knots.
- poles_usize
- [in] - Number of poles in U parametric direction.
- poles_vsize
- [in] - Number of poles in V parametric direction.
- uknots
- [in] - Pointer to array of U parameter knot values. The number of values in the array must beuknots_size.
- vknots
- [in] - Pointer to array of V parameter knot values. The number of values in the array must be vknots_size.
- poles
- [in] - Pointer to array of NURBS poles. The number of entries in the array must be poles_usize multiplied by poles_vsize. Poles are assumed to be arranged in rows of faster changing U parameter.
- weights
- [in] - If not NULL points to array of NURBS weights. Ignored if both u_rational and v_rational are false. If both u_rational and v_rational are true then the number of values in the array must be poles_usize multiplied by poles_vsize and weight values are assumed to be arranged in rows of faster changing U parameter. If u_rational is true and v_rational is false then the size of the array must be poles_usize. If v_rational is true and u_rational is false then the size of the array must be poles_vsize.
Errors
None.