Synopsis

PDX_MSGT igeo_ApproxEntity(long option, MDA_PTR db_ptr, EAM_STACK *stack)

Purpose

Linear approximate an IGES entity

Description

Perform linear approximation on an IGES entity by the creation of points and/or facets within the IGES Geometry subsystem. The entity is classified as to its type (Curve, Surface, Text, etc.) and dispatch for further processing. Use igeo_AllocateApprox(..) to allocate the initial workspace, igeo_ApproxSet...(...) to set the approximation parameters, igeo_ApproxGetData(...) to access the approximation data, and igeo_FreeApprox(...) to free the workspace. The IGES entities supported for approximation are: .nf .sp Curve 100 - Circluar Arc 102 - Composite Curve 104 - Conic Arc 106 - Copious Data 110 - Line 112 - Parametric Spline 116 - Point (Point location only) 126 - NURBS Curve 130 - Offset Curve 141 - Boundary Curve 142 - Curve on Parametric Surface .sp Surface 108:1 - Bounded Plane 114 - Parametric Spline Surface 118 - Ruled Surface 120 - Surface of Revolution 122 - Tabulated Cylinder Surface 128 - NURBS Surface 140 - Offset Surface 143 - Bounded Surface 144 - Trimmed Surface .sp Text 212 - General Note .sp Annotation 202 - Angular Dimension 204 - Curve Dimension 206 - Diameter Dimension 208 - Flag Note 210 - General Label 214 - Leader 216 - Linear Dimension 218 - Ordinate Dimension 220 - Point Dimension 222 - Radius Dimension 228 - General Symbol 230 - Section Area

Other 125 - Flash 132 - Connect Point (Point location only) .fi

To linear approximate an entity the approximation workspace must be allocated. The function igeo_AllocateApprox allocates the initial workspace and provides for incremental reallocation of the workspace if the intial workspace is exhausted.

The form of the linear approximation and the amount of linear approximation data is affected by the setting of the following options.

.RS 3 .IP igeo_ApproxSetMethod 28 Sets the method for linear approximating an entity .IP igeo_ApproxSetNumOfPnts 28 Sets the number of points to approximate an entity with for the IGEO_NUM_OF_POINTS or the IGEO_NUM_OF_POINTS_OR_LINEAR method .IP igeo_ApproxSetPntsPerSeg 28 Set the number of points per segment to approximate an entity with for the IGEO_NUM_OF_POINTS_PER_SEG method .IP igeo_ApproxSetTol 28 Set the tolerance to use to approximate an entity with the IGEO_TOLERANCE method or with the IGEO_NUM_OF_POINTS_PER_SEG method .IP igeo_ApproxSetFacets 28 Set the surface faceting option .IP igeo_ApproxSetMesh 28 Set the surface mesh values for non-facet surface approximation .IP igeo_ApproxSetText 28 Set the option to ignore text approximation .IP igeo_ApproxSetPreference 28 Set the trimmed and bounded surface preference flag processing .IP igeo_ApproxSetWarnings 28 Set the linear approximation warning issued option .RE

To access the data use the function igeo_ApproxGetData. This function returns two forms of data structures that contain the linear approximation data for the entity approximated. The first call to this function requires that the data structure address be set to NULL. The data should be accessed as long as igeo_ApproxGetData returns IGEO_NOTDONE. The last access to the approximated data frees any allocated structures and returns a value IGEO_DONE.

The linear approximation workspace should be freed using the function igeo_FreeApprox when linear approximation is complete.

Input

option

IGES_NOMATRIX

Do not apply entity matrix to data

db_ptr

Database pointer of IGES entity

stack

The entity attribute stack handle or NULL to use the default attribute stack

Tolerances

      MODEL_SPACE_PNT_TOL
      PARM_SPACE_PNT_TOL
      ANGLE_TOL
      ZERO_TOL
      CONVERGE_TOL
      KNOT_TOL
      PNT_PROJ_TOL
      PARALLEL_LINES_TOL
      COLLINEAR_TOL
      COPLANAR_TOL
      .fi

Return

      IGEO_NOERR
      IGEO_ENTITYNOTSUPPORTED
      Low level error return
      .fi