# Synopsis

PDX_MSGT gdx_ConvertFaceToCBS(long option, MDA_PTR gdx_face_ptr, PDX_BOOL face_sense, int model, void *gdx_cbs)

# Purpose

Convert a GDX face to a GDX Curve Bounded Surface entity

# Description

Given a GDX face entity, converts the GDX face entity to a GDX curve bounded face entity. The GDX face loops map to GDX composite edge curves where the edge curves in the composite edge curve are single surface duplicates of the edge curves from the GDX edges. A duplicate (instance) of all the GDX face geometry is produced for the GDX Curve Bounded Surface.

Because the GDX Curve Bounded Surface entity does not contain an equivalent of the surf_sense field or face_sense, the GDX Curve Bounded Surface is created as follows: The loops are converted to GDX Comp Edge Curves such that the loop direction matches the surface normal. Once this is accomplished the face_sense is xor'd with the surf_sense and if true the surface and loops are revesersed in order to create a GDX Curve Bounded Surface whose surface normal agrees with the GDX Face topological normal. However, note that a GDX analytical surface (cone, cylinder, sphere or torus) can not be reversed. Thus the resulting normal may be wrong for GDX Curve Bounded Surfaces which contain those entities.

The GDX face entity and all its subordinate entities must be valid definitions.

# Input

## option

### GDX_COMMIT

Commit the GDX Curve Bounded Surface to the database and return the MDA_PTR database pointer. Otherwise the memory structure pointer for the new GDX Curve Bounded Surface entity is returned.

### GDX_REMDUPEDGE

Remove any duplicate edges (Edges with the same Vertex end points and opposite sense). This option will remove the edges that lie along the seams of closed surfaces and thus remove the seam edge curves. This may result in a change in the number of boundaries (Loops to Composite Edge Curves). Potentially a Curve Bounded Surface may result with the only boundary being the original boundary of the surface (num_of_bounds == 0 && first_is_outer).

### GDX_COMPBNDRY

Force the boundary edges to the curves of a single composite curve for both model and parameter space curves. By default, each curve in the edge of the face becomes an edge curve as part of a composite edge.

### GDX_KEEPNORMAL

Force the CBS normal to be the same as the original topological normal.

## gdx_face_ptr

The GDX face entity database pointer

## face_sense

### PDX_TRUE

The sense of the face agrees with the topological normal

### PDX_FALSE

The sense of the face is opposite the topological normal

## model

The model number for creation of the new GDX curve bounded face entity.

# Output

## gdx_cbs

The new GDX Curve Bounded Surface entity structure or database pointer

# Return

          GDX_NOERR
          GDX_ENTITYNOTFACE
          GDX_NOMEMORY
          Low level error return
          .fi