formZ SDK | 5.0 API Reference | Project | Modeling | Objects | Analysis
Description
Gets the parameters of a face's underlying surface geometry,
if the geometry of the face is of type spline ( FZ_OBJT_FACE_GEOM_TYPE_SPLN).
Call fz_objt_alys_get_face_geom_type to determine the geometry of the face.
The control points and weights arrays must be preallocated to hold nu x nv values.
knots_u and knots_v must be preallocated to hold
nu + degree_u + 1 and nv + degree_v + 1 respectively.
This can be done by calling this function first with all the optional return parameters
set to NULL except nu, nv, degree_u, and degree_v.
Use those values to preallocate cpts, weights, knots_u, and knots_v.
Here is an example of how the control points are ordered :
cpts[u 0 v 0]
cpts[u 0 v 1]
...
cpts[u 0 v nv-1]
cpts[u 1 v 0]
cpts[u 1 v 1]
...
cpts[u 1 v nv-1]
...
...
...
cpts[u nu-1 v 0]
cpts[u nu-1 v 1]
...
cpts[u nu-1 v nv-1]
The values in the weights array are ordered in the same way.
A spline surface is rational if any of the weights in a given direction are not equal.
If a surface is not rational in both directions, the weights array does not need to be
retrieved (i.e. all weights can be considered 1.0).
Plugin Prototype
fzrt_error_td fz_objt_alys_get_face_spln_parm(
fzrt_int | windex, |
obj, | |
fzrt_int | findx, |
fzrt_int * | nu, |
fzrt_int * | nv, |
fzrt_int * | degree_u, |
fzrt_int * | degree_v, |
double * | knots_u, |
double * | knots_v, |
rational_u, | |
rational_v, | |
cpts, | |
double * | weights ) |
Parameters
windex [Input]
project window index
obj [Input]
object
findx [Input]
face index
nu [Result, Optional]
number of control points in U
nv [Result, Optional]
number of control points in V
degree_u [Result, Optional]
degree of the surface in U
degree_v [Result, Optional]
degree of the surface in V
knots_u [Result, Optional]
knot values in U array
must be preallocated to store nu + degree_u + 1 values
knots_v [Result, Optional]
knot values in V array
must be preallocated to store nv + degree_v + 1 values
rational_u [Result, Optional]
is the surface rational in U
rational_v [Result, Optional]
is the surface rational in U
cpts [Result, Optional]
spline surface control points array
must be preallocated to hold nu x nv values.
weights [Result, Optional]
weights of the spline surface
must be preallocated to store nu x nv values
Returns
Error codes
MODEL_ERR_INVALID_FACE - invalid face type
Availability
5.0.0.0
Example Files
See Also
, fz_objt_alys_get_face_geom_type, fz_objt_alys_get_face_pnt_parm, fz_objt_alys_get_face_plne_parm, fz_objt_alys_get_face_sphr_parm, fz_objt_alys_get_face_cyln_parm, , fz_objt_alys_get_face_tors_parm, fz_objt_alys_get_face_area, fz_objt_alys_get_face_circumference, fz_objt_alys_get_face_cog,
Function Set
Defined in