Synopsis

PDX_MSGT gdx_NurbCurveToNurb(long option, MDA_PTR gdx_curve_ptr, double approx_tol, int degree, int max_iters, int *status)

Purpose

Convert/Approximate nurb curve to specific characteristic nurb curve.

Description

Convert/Approximate nurb curve to specific characteristic nurb curve passed by option.

If the nurb curve meets the criteria of options, it will not be modified. If an entity passed in is not a nurb, it will not be modified.

This function replaces the converted/approximated curve with mda_ReplaceDbptr(), this means that the database pointer will not be changed.

Input

option

GDX_NURBS_CLAMP

Non clampped nurb curve will be clamped. This option can not be used with GDX_NURBS_MAKE_UNIFORM

GDX_NURBS_REPARAM

Nurb curve will be reparametized between 0.0 and 1.0. This option can not be used with GDX_NURBS_MAKE_UNIFORM

GDX_NURBS_MAKE_UNIFORM

Nurb curve will be approximated to uniform knots nurb curve. This option can not be used with GDX_NURBS_CLAMP, GDX_NURBS_REPARAM or GDX_NURBS_MAKE_BEZIER.

GDX_NURBS_NONRATIONAL

Rational nurb curve will be approximated to non-rational nurb curve. This option can not be used with GDX_KEEPRRAT

GDX_NURBS_MAKE_BEZIER

Non-bezier nurb curve will be approximated to bezier nurb. This option overides GDX_NURBS_CLAMP and GDX_NURBS_NONRATIONAL options.

GDX_NURBS_FORCE_DEGREE

Nurb curve will be converted/approximated to the specified degree. This option can not be used with GDX_NURBS_REDUCE_DEGREE or GDX_NURBS_ELEVATE_DEGREE.

GDX_NURBS_REDUCE_DEGREE

Nurb curve exceed the specified degree will be approximated to the degree specified. This option can not be used with GDX_NURBS_FORCE_DEGREE or GDX_NURBS_ELEVATE_DEGREE.

GDX_NURBS_ELEVATE_DEGREE

Nurb curve degree less than the specified degree will be converted to the degree specified. This option can not be used with GDX_NURBS_FORCE_DEGREE or GDX_NURBS_REDUCE_DEGREE.

GDX_KEEP_DEGREE_1

When conversion take place, degree 1 will be kept.

GDX_KEEPRAT

Keep rational when elevating the degree This option can not be used with GDX_NURBS_NONRATIONAL

gdx_curve_ptr

The database pointer for the GDX nurb curve entity

approx_tol

The tolerance for approximating the GDX NURB curve, if needed.

degree

The degree to approximate the GDX NURB curve when GDX NURB are converted with any DEGREE option specified.

max_iters

The maximum iteration count to test for convergence to the approximation tolerance

Output

status

Returns one of the following: GDX_NOT_CONVERTED Meets the criteria, there was no conversion needed. GDX_NOT_NURB Entity is not NURB GDX_CONVERTED NURB curve has been converted to meet the criteria

Tolerances

      MODEL_SPACE_PNT_TOL
      PARM_SPACE_PNT_TOL
      .fi

Return

      GDX_NOERR
      GDX_INVALIDMODEL
      GDX_CONFLICTING_OPTION
      Low level error return
      .fi