Synopsis

PDX_MSGT gdx_ConvertNurbCurveToUnifNurb(long option, MDA_PTR gdx_db_ptr, int model, long method, int outdeg, double app_tol, int max_cps, void *gdx_uni_cur)

Purpose

Converts a GDX NURB Curve to a uniform, unclamped GDX NURB Curve.

Description

Convert a GDX NURB Curve to a nonrational, unclamped Nurbs curve with uniform (1.0) knot spacing. This is generally an approximation, although there are some cases in which it is a precise conversion. If the degree of the input curve is 1, then outdeg == 1 is allowed (precise conversion). Otherwise, input degree == 1 is not allowed (error), and outdeg should not be set to 1. The input curve should be G1 continuous, except for the case that input and output are both degree 1.

Input

option

GDX_COMMIT

Commit the GDX entity to the database.

gdx_db_ptr

The GDX NURB Curve database pointer

model

The model to create the new GDX NURB Curve in

method

GDX_UNI_PARAMS

Fit points are taken at equally spaced parameter values. This method approximates both the geometry and parameterization of the original curve.

GDX_UNI_PNTS

Equally spaced fit points are used. This method approximates only the geometry of the original curve. Parameterization is roughly uniform. This argument is not used if input and output degree are both 1.

outdeg

Degree of the approximating GDX NURB Curve. It is recommended that outdeg <= 3, and outdeg == 1 only for the case that input degree is equal to 1.

app_tol

Convergence tolerance. Iteration will cease when the approximating curve is within app_tol of the input curve (on a discrete set of sampled points).

max_cps

The maximum number of control points to be generated.

Output

gdx_uni_cur

The uniform, unclamped GDX NURB Curve entity structure or database pointer.

Tolerances

     MODEL_SPACE_PNT_TOL
     PNT_PROJ_TOL
     KNOT_TOL
     ANGLE_TOL
     .fi

Return

      GDX_BADDATA
      Low level error return
      .fi