# Synopsis

PDX_MSGT gcr_Face2(long option, MDA_PTR orig_db_ptr, PDX_BOOL surf_sense, MDA_PTR surf_ptr, PDX_BOOL first_is_outer, MDA_COUNT num_of_loops, PDX_BOOL loop_senses[], MDA_PTR loop_ptrs[], int gdx_model, MDA_PTR *gdx_face_ptr)

# Purpose

Create a GDX Face.

# Description

Given the number of loops, the sense for each loop, the pointers to the loops, pointer to the surface, sense of the surface, and a flag indicating the first boundary is the outer boundary create a GDX Face. The loop sense flags indicates the senses of the loops with respect to the face, PDX_TRUE means the sense agrees. The surf_sense flag indicates the sense of the surface normal with respect to the face, PDX_TRUE means the surface normal and face normal have the same direction. Loop directions are based on the surface normal after the surf_sense flag is applied (i.e. if surf_sense is PDX_FALSE, the outer loop must be defined clockwise).

If the GCR_ADD_EC_FACES option is specified, then the underlying GDX Edge Curves will be automatically updated (via gcr_EdgeCurveAddFace) to include this face in their 'faces' data. This is intended for the case when the underlying GDX Edge Curves were created without 'faces' data. If the underlying GDX Edge Curves were created without 'face' information, this information will be automatically updated for this face by specifying the GCR_ADD_EC_FACES option.

The orig_db_ptr argument should contain the database pointer of the entity that the new entity was created from (usually this should be obtained by the calling routine via mda_GetOrigDbptr) or MDA_NULL_PTR. See the mda_intro man page for more information about predecessor entities.

# Input

## option

### GCR_NOVALIDATE

No validation will occur on the input data.

### GCR_ADD_EC_FACES

Underlying GDX Edge Curves will be updated with corresponding face information (see above).

## orig_db_ptr

The original entities orig_db_ptr as obtained from the mda_GetOrigDbptr call, or MDA_NULL_PTR

## surf_sense

Sense of the surf_ptr normal with respect to the face.

## surf_ptr

Pointer to the suface.

## first_is_outer

Flag indicating if the first boundary is outer.

## num_of_loops

Number of loops that make up the Face, must be > 0.

## loop_senses

The corresponding sense of the loops with respect to the face.

## loop_ptrs

The loops that make up the face.

## gdx_model

The GDX model for entity creation

# Output

## gdx_face_ptr

Entity database pointer of the GDX Face

# Tolerances

          .fi

# Return

          GCR_NOERR
          GCR_INVALID_MODEL
          Low level error return
          .fi