Synopsis

PDX_MSGT gdx_FaceToPolyShell(long option, MDA_PTR gdx_face_ptr, double approx_tol, int model, MDA_PTR *gdx_ps_ptr, MDA_PTR *gdx_surf_ptr)

Purpose

Convert (tessellate) GDX Face to GDX Polyshell

Description

This function tessellates a GDX Face 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 Face.

For the best results, incoming face should not contain multiple outer loops or loops, which are open, wrong oriented, self-intersecting or intersect other loops.

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

To prepare the data for the face to polyshell conversion the following function with this option should be used: gdx_FaceProcessAll with the GDX_PREP_POLYSHELL

The function assumes that any edge that touches a pole or seam, is part of the outer bound of the face.

By default the input GDX Face will be exactly the same as the output GDX Face. If the option GDX_NO_COPY, is used, the UV points that are returned in the tessalation were calculated on the returned GDX Faces re-parameterized surfaces.

Input

option

GDX_NOOPT

Face 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_NO_COPY

The output Face may have new UV points based on the new re-parameterized surfaces

GDX_POLYSHELL_FAST

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

gdx_face_ptr

GDX Face data base pointer

approx_tol

Approximation tolerance

model

Destination model

Output

gdx_ps_ptr

GDX Polyshell data base pointer

gdx_surf_ptr

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

Return

      GEA_NOERR
      .fi