Synopsis

PDX_MSGT gdx_ProjectPointCurve(long option, MDA_PTR db_ptr_crv, MTH_3DPNT point, double t0, int max_iters, MTH_3DPNT proj_point, double *t1)

Purpose

Project a point to a GDX curve

Description

Projects a model space point to a GDX curve. If the option is set to GDX_GLOBAL then a global search is performed to find an initial starting parameter value, otherwise the t0 value is assumed to be the initial starting parameter value to use for projection. The max_iters value is the maximium iterations made if the projection does not converge to the PNT_PROJ_TOL. The curve must be a valid GDX curve definition. Note: The GDX_NOCONVERGE error is returned, but not set on the error stack.

Input

option

GDX_GLOBAL

Perform a global search for the starting parameter value, otherwise use t0

GDX_UNNORM

Unnormalize the parameter values and return the parameter value normalized

GDX_OPENCLOSED

Treat the curve as an open curve even though it may be closed.

db_ptr_crv

The database pointer for the GDX curve

point

The model space point to project

t0

The initial curve parameter value if the value is used (GDX_GLOBAL option not set)

max_iters

The maximium iterations for convergence

Output

proj_point

The model space point on the curve

t1

The parameter value of the point on the curve

Tolerances

      PNT_PROJ_TOL
      MODEL_SPACE_PNT_TOL
      ANGLE_TOL
      .fi

Return

      GDX_NOERR
      GDX_NOMEMORY
      GDX_NOCONVERGE
      Low level error return
      .fi