Synopsis

PDX_MSGT gdx_ForceCleanEndKnotsNurbSurf(long option, T_GDX_NURB_SURF *gdx_ns, PDX_BOOL *modified_flag)

Purpose

Forces valid end knots on a Nurbs surface.

Description

Forces the end knots of a Nurbs surface to be correct in the following sense:

(1) knots equal to the relimiting bounds will not have multiplicity greater than degree+1 (2) if a relimiting bound is a knot of multiplicity equal to or greater than degree , then the curve is clamped there (3) if bounds[0] = knots[degree] = knots[degree+1] , then the curve is clamped at bounds[0] (4) if bounds[1] = knots[num_of_ctrl_pts] = knots[num_of_ctrl_pts-1] , then the curve is clamped at bounds[1] (5) knots[degree] <= bounds[0] (6) knots[num_of_ctrl_pts] >= bounds[1]

All above items apply to both u- and v-knots. This function uses strict equality to compare knots and bounds. Hence, it is recommended to call gdx_MakeKnotsEqual (twice, for u and v) prior to calling this function.

Input

option

Not used.

gdx_ns

The GDX Nurbs surface.

Output

gdx_ns

The GDX Nurbs surface may be modified (but the entity pointer does not change).

modified_flag

TRUE if the surface is modified; FALSE otherwise.

Return

      GDX_NOERR
      GDX_BADDATA
      Low level error return
      .fi