Synopsis

PDX_MSGT gdx_ParmCurveToModelSpace(long option, MDA_PTR sur, MDA_PTR parcur, double devtol, long maxits, int fitdeg, int model, void *mcurve, double *dev)

Purpose

Generate model space image of parameter space curve.

Description

This routine maps a parameter space curve, P(s), to model space, M(t). The method used is approximate (generally); points sampled from P(s) are mapped to model space and fitted there. Iterative least squares fitting is used. Projection checks are used to ensure that M(t) lies within a specified tolerance (devtol) of both the surface and the true model space image of P(s). Cusps in P(s) are handled properly. In certain cases, this routine will detect when M(t) is a straight line; in these cases, a degree 1 straight line will be generated (no fitting done). The surface, S(u,v), must be smooth (no sharp ridges). P(s) must lie completely within the uv-domain of the surface. M(t) will be in Nurbs form unless it is an isoparametric curve, in which case it will inherit its natural form.

Input

option

GDX_COMMIT

Entity creation option. If set, created entity will be commited to the data base.

GDX_FITDEGMAX

If set, degree of P(s) will not exceed fitdeg (see below). This will force the use of approximation in case degree of M(t) is greater than fitdeg and S(u,v) is a plane. If not set, then a precise P(s) would be generated in this case (with degree(P(s)) = degree(M(t))).

GDX_FORCE_NURBS_COMPOSITE

if set will generate a composite nurb instead of a composite curve with nurbs underlying.

sur

The GDX surface on which M(t) (mcurve) lies.

parcur

The GDX parameter space curve, P(s), which is to be mapped onto the surface, S(u,v). Must lie completely within the uv-domain of S(u,v).

devtol

Sampled points on the model space curve, M(t), should not deviate from the surface or from the image under S(u,v) of P(s) more than this value. This tolerance should be larger than MODEL_SPACE_PNT_TOL, at least by 1 to 2 orders of magnitude.

maxits

Maximum number of iterations. Iteration will be stopped if this number is exceeded.

fitdeg

Degree used for fitting M(t). See option GDX_FITDEGMAX above. If M(t) is a straight line, degree=1 will be used.

model

The GDX model for entity creation

Output

mcurve

The model space curve, M(t).

dev

The actual measured maximum deviation of M(t) from the image of P(s) under S(u,v) (the deviation of M(t) from the surface will be equal to or less than this).

Tolerances

      MODEL_SPACE_PNT_TOL
      PARM_SPACE_PNT_TOL
      ANGLE_TOL
      ZERO_TOL
      .fi

Return

      GDX_NOERR
      GDX_NOCONVERGE
      Low level error return
      .fi