Synopsis

PDX_MSGT gdx_ShellImproveFaceOrients(long option, MDA_PTR gdx_shell_ptr, int *shell_orient)

Purpose

Will improve the orientation of all the Faces in the Shell.

Description

This function will improve the orienatation of all the faces in the Shell based on its adjacent face. The algorithm is as follows: Check the topology of the Shell and decide whether each Face should be trimmed based on its normal or loop directions. If the trimming was done based on their loop directions, orient each adjacent face according to its neighbors. We are making the assumption that the first face is oriented in the correct direction. First loop must be the outer loop in all faces to be improved (gdx_SolidImproveInOutLoopDir use GDX_NO_FIX_LOOP_DIRS option).

Input

option

No options

gdx_shell_ptr

The valid GDX Shell database pointer

Output

gdx_shell_ptr

The valid GDX Shell database pointer

shell_orient

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

      MODEL_SPACE_PNT_TOL
      NORMAL_MAG_TOL
      ANGLE_TOL
      .fi

Return

      GDX_NOERR
      Low level error return
      .fi