Synopsis

PDX_MSGT gdx_ShellOrientFaces(long option, MDA_PTR gdx_shell_ptr, int *face_orients)

Purpose

Orient all the adjacent GDX Faces in the GDX Solid in same direction.

Description

This function tries to determine if all the adjacent faces, in a solid, are oriented in the same direction. If they are not, the adjacent faces are reversed. Parm curves must exist, first loop must be outer loop in all the faces, and all the loop directions must agree with the normal of the face (gdx_SolidGenerateParmCurves & gdx_SolidImproveInOutLoopDir & gdx_SolidImproveLoopDirs). The Faces are improved by toggling the loop and surf sense to ensure the proper orientation. This function makes the assumption that first Face in each Shell is oriented in the proper direction. It will then orient all the adjacent Faces based on the first one Face.

Input

option

GDX_CHECK_ONLY

Check to see if the faces are all oriented in the the same direction. Do not fix the orientation of the faces.

GDX_IMPROVE

Fix the Orientation of all the faces so they agree.

gdx_shell_ptr

The valid GDX Solid database pointer

Output

gdx_shell_ptr

The improved GDX Solid database pointer

face_orients

GDX_OK

The data is good

GDX_IMPROVED

The orientation of the faces has been improved

GDX_NOT_GOOD

The faces were not oriented in the same direction. Returned only when the GDX_CHECK_ONLY is used.

GDX_IMPROVE_FAILED

The faces could not be oriented.

Tolerances

      .fi

Return

      GDX_NOERR
      Low level error return
      .fi