Synopsis
PDX_MSGT gdx_GetSurfaceNumSegs(long option, void *gdx_surface, long *num_u_segs, long *num_v_segs)
Purpose
Retrieves the number of segments in u, v for a given surface.
Description
Given a GDX surface, determines the number of segments in each of the u and v directions. If the surface is defined using a curve generatrix, the number of segments is taken from the curve for the corresponding direction. Segments are defined as follows:
| GDX entity | Segment Determination |
| – | |
| GDX_NURB_SURF | Segments in u and v taken from distinct knot |
| values corresponding knot vectors (taking bounds | |
| into consideration) | |
| GDX_SPLINE_SURF | Segments in u and v taken from the nusegs and nvsegs |
| fields, respectively. | |
| GDX_RULED_SURF | Segments in u derived from ruling curves (max |
| for the 2 ruling curves). The number of segments in | |
| the v direction is 1. | |
| GDX_REV_SURF | Segments in u derived from generatrix curve. The |
| number of segments in the v direction is determined | |
| using the basis that each quarter circle is 1 | |
| segment. | |
| GDX_EXT_SURF | Segments in u derived from generatrix curve. The |
| number of segments in the v direction is 1. | |
| GDX_PLANE | The number of segments for each of the u and v |
| directions is set to 1. | |
| GDX_CYLINDER | The number of segments for the u direction is set |
| to 4. The number of segments in the v direction is | |
| set to 1. | |
| GDX_CONE | The number of segments for the u direction is set |
| to 4. The number of segments in the v direction is | |
| set to 1. | |
| GDX_SPHERE | The number of segments for each of the u and v |
| directions is set to 4. | |
| GDX_TORUS | The number of segments for each of the u and v |
| directions is set to 4. | |
| GDX_OFFSET_SURF | The number of segments in each direction is taken |
| from the base surface | |
| GDX_RECT_TRIM_SURF | The number of segments in each direction is taken |
| from the base surface |
Input
option
Options (not used)
gdx_surface
Entity structure pointer of the GDX Surface
Output
num_u_segs
The number of u segments
num_v_segs
The number of v segments
Tolerances
KNOT_TOL
ANGLE_TOL
.fi
Return
GDX_NOERR
Low level error return
.fi