Synopsis

PDX_MSGT gdx_ReparmParmCurvesApprox(long option, int model, MDA_PTR curv_ptrs[], int num_curves, MDA_PTR surf_ptr, MDA_PTR mod_cur_ptr, double dev_tol, MDA_PTR **new_curv_ptrs, int *num_new_curves)

Purpose

Reparameterize surface uv-trimming curves approximately

Description

Given a surface and a set of parameter space curves which map to a given model space curve on the surface, create a new set of parameter curves which are reparameterized so that their parameterizations correspond approximately to that of the model space curve. Hence, given a parameter t, the point evaluated on the model curve at t is roughly the same as that obtained by evaluating the appropriate parm curve at t to get (u,v), then evaluating the surface at (u,v). The new reparameterized parm curves are in Nurbs form. The geometry of the input curves is changed only in the case that the original curves are not precisely convertable to Nurbs form. The input parm curves must be ordered and oriented correctly; i.e. the start point of the first parm curve must map to the start point of the model curve, and the end point of the last parm curve must map to the end point of the model curve.

Input

option

GDX_LEAVE_LOCKED

If set, the returned entities will be left locked; in this case it is up to the caller to call mda_UnlockEntity for each entity returned. Note: the entity structure can be accessed via mda_GetLockedAddr.

model

The model to create GDX entities in.

curv_ptrs

Database pointers for the parm curves.

num_curves

Number of parm curves in array curv_ptrs.

surf_ptr

Surface database pointer.

mod_cur_ptr

Model curve database pointer.

dev_tol

Attempts to bound the error in two ways: 1. Maximum desired geometric deviation error between the images of the original parm curves and the images of the reparameterized parm curves (in case approximation is required). 2. Maximum parametric error between the model curve and the images of the reparameterized parm curves. Note: these bounds are not precisely guaranteed. However, dev_tol offers a means to increase the accuracy of the correspondence in parameterizations, i.e. the smaller dev_tol , the better the correspondence.

Output

new_curv_ptrs

Database pointers of the reparameterized parm curves.

num_new_curves

Number of curves in array new_curv_ptrs.

Return

      GDX_NOERR
      GDX_BADDATA
      GDX_NOCONVERGE
      Low level error return
      .fi