# Synopsis

PDX_MSGT gdx_SurfaceToPolyShell(long option, MDA_PTR gdx_surf_ptr, double approx_tol, int model, MDA_PTR *gdx_ps_ptr, MDA_PTR *gdx_outsurf_ptr)

# Purpose

Convert (tessellate) GDX Surface to GDX Polyshell

# Description

This function tessellates a GDX Surface to a GDX Polyshell. The resulting polyshell consists of counter-clockwise polygons (sometimes referred to as facets or tessellants). Each of the polygons will be within approx_tol of the Surface.

Both model space and parameter space points are returned in the GDX Polyshell. The parameter space points are normalized on the returned surface gdx_outsurf_ptr, not on the input surface gdx_surf_ptr

# Input

## option

### GDX_NOOPT

Surface is converted to a polyshell. Each segment of the polyshell is used in exactly two polygons or is an edge segment. Polyshell has only model space points.

### GDX_POLYSHELL_FAST

All duplicate points are merged by the tessellation. However, when this option is specified, the duplicate points are not removed.

## gdx_surf_ptr

GDX Surface data base pointer to be tessalated

## approx_tol

Approximation tolerance

## model

Destination model

# Output

## gdx_ps_ptr

GDX Polyshell data base pointer

## gdx_outsurf_ptr

GDX Surface data base pointer. Optionally, if the NULL is passed in, the copied surface is not returned.

# Return

          GEA_NOERR
          .fi