# Synopsis

PDX_MSGT igeo_ProjectPointSurfaceGrid(long option, MDA_PTR db_ptr_srf, MDA_PTR *gdx_db_ptr_grid, MTH_3DPNT point, double u0, double v0, int max_iters, MTH_3DPNT proj_point, double *u1, double *v1)

# Purpose

Project a point to an IGES surface using a GDX rectangular surface mesh grid

# Description

Projects a model space point to an IGES surface using a GDX rectangular surface mesh grid. If the u0 and/or v0 values are negative, then a global search is made in the rectangular surface mesh grid to try to find an initial starting parameter values, otherwise the u0 and v0 values are assumed to be initial starting parameter values to use for projection. If the GDX rectangular surface mesh grid database pointer gdx_db_ptr_grid is MDA_NULL_PTR then the rectangular surface mesh grid is created in the IGES->GDX model. Using the GDX rectangular surface grid for point projection can significantly improve performance. The application should delete the GDX rectangular surface grid entity after all projection are completed (See gdx_DeleteEntity)

The max_iters value is the maximium iterations made if the projection does not converge to PNT_PROJ_TOL.

The surface must be a valid IGES surface definition.

# Input

## option

### IGEO_NOSETERROR

Do not set the IGEO_NOCONVERGE error

## db_ptr_srf

The database pointer for the IGES surface

## gdx_db_ptr_grid

The database pointer for the GDX rectangular surface mesh grid or MDA_NULL_PTR

## point

The model space point to project

## u0

The initial surface U parameter value(0.0 to 1.0) or < 0.0 if the value should not be used

## v0

The initial surface V parameter value(0.0 to 1.0) or < 0.0 if the value should not be used

## max_iters

The maximium iterations for convergence

# Output

## gdx_db_ptr_grid

The created GDX rectangular surface mesh grid if originally MDA_NULL_PTR

## proj_point

The model space point on the surface

## u1

The U parameter value of the point on the surface

## v1

The V parameter value of the point on the surface

# Tolerances

          PNT_PROJ_TOL
          MODEL_SPACE_PNT_TOL
          ANGLE_TOL
          ZERO_TOL
          .fi

# Return

          IGEO_NOERR
          IGEO_NOCONVERGE
          Low level error return
          .fi