Synopsis

PDX_MSGT igeo_Create142From142(long option, MDA_PTR db_ptr, MDA_PTR db_ptr_surf, EAM_STACK *stack, int model, double tolerance, int max_iters, int degree, MDA_PTR *db_ptr_142, double *max_dev)

Purpose

Creates an IGES 142 entity from an existing IGES 142 entity

Description

Given an IGES 142 entity creates a NEW IGES 142 entity. By default, the input IGES 142 entity is duplicated with any missing model space or parameter space curves generated. Based on the input options, new parameter space and/or model space curve(s) can be computed, using the base surface parameterization.

Parameter space curves are recomputed if: .RS 4 o The option mask equals IGEO_NEWPARMCRV, .RE .RS 4 o The paramter space curve for a given trimming curve (IGES 142) is missing (MDA_NULL_PTR), .RE

Model space curves are recomputed if: .RS 4 o A new parameter space curve was computed and the preference flag is parameter space, .RE .RS 4 o The option masks equals IGEO_NEWMODELCRV, .RE .RS 4 o The model space curve for a given trimming curve is missing (MDA_NULL_PTR) and the preference is not for the model space curve definition and the parameter space curve is not missing. .RE

If the outer boundary of the 142 is the natural boundary of the surface then both the model and parameter space curves are created and a new outer 142 entity is created and the boundary type flag is changed to 1. The non-pointer DE parameter data of the surface is associated with the curve entities created in this case.

If the option mask IGEO_BASEDEG is set then the degree of the base curve is used for the degree of the recomputed curve otherwise the degree parameter is used to specify the degree of the parameter space curve created from projecting the model space curve to the surface (by default the degree of the existing parameter space curve or the maximium surface degree if the parameter space curve is missing is used for the degree of the parameter space curve). The tolerance and max_iters values apply to the NURBS curves approximated. In addition, the tolerance applies to the test for curve closure.

By default the IGES entity matrix is applied to the IGES curve and all the IGES 142 non-pointer DE attributes are applied to the new base IGES 142 entity. If the model is the same as the db_ptr model than all the IGES pointer DE attributes, property pointers and associativity pointers are applied to the new IGES base 142 entity.

The IGES 142 entity and all its subordinate entities must be valid IGES definitions except for the cases where missing model or parameter space curves are supported.

The projection of new parameter space curves and/or creation of new model space curves from parameter space curves is an approximation to tolerance.

Input

option

IGES_NOMATRIX

Do not apply entity matrix to data

IGEO_BASEDEG

Use the base degree of the curve for the degree of the recomputed curve

IGEO_NEWPARMCRV

Recompute the parameter space trimming curve by projecting the model space curve to the surface.

IGEO_NEWMODELCRV

Recompute the model space trimming curve from the computed parameter space trimming curve. The curve preference flag will be set to parameter space curve prefered.

IGEO_OPENCLOSED

Open a closed surface if the projection of the model space curves generates multiple parameter space curves accross the seam closure. NOTE: If multiple parameter space curves still result, then the IGES 142 must be convert to an IGES 141

IGEO_MAPCURVE

Map any GDX NURB curves create from projection to the base GDX curve form

db_ptr

The IGES 142 entity database pointer

db_ptr_surf

The database pointer of the IGES surface entity that should be used for the created 142 entities surface or MDA_NULL_PTR

stack

The entity attribute stack handle

model

The model to crete the new IGES 142 entity in

tolerance

The conversion approximation tolerance. Note: The MODEL_SPACE_PNT_TOL should be at least 2 orders of magnitude less than this tolerance for correct results.

max_iters

The maximium iterations for convergence test

degree

The degree of the computed curve

Output

db_ptr_142

The new IGES 142 entity database pointer

max_dev

The maximium deviation of the model space curve to the surface.

Tolerances

      MODEL_SPACE_PNT_TOL
      PARM_SPACE_PNT_TOL
      ANGLE_TOL
      ZERO_TOL
      CONVERGE_TOL
      KNOT_TOL
      PNT_PROJ_TOL
      PARALLEL_LINES_TOL
      .fi

Return

      IGEO_NOERR
      IGEO_NOMEMORY
      Low level error return
      .fi