Synopsis
PDX_MSGT sgdx_GetSTEPData(long option, MDA_PTR gdx_db_ptr, int step_model, int max_iters, MDA_PTR *step_db_ptr)
Purpose
Get the STEP data (in the specified model) corresponding to a GDX entity.
Description
Gets the STEP definition data by creating a new STEP entity in the step_model from the GDX entity definition.
Note that STEP allows specification of angular units while GDX requires all angular units to be in radians. This function and its underlying functions assume that the current STEP plane angle unit has been specified by calling step_SetPlaneAngleUnit (the default is STEP_DEGREES) and conversions are done accordingly.
Need to specify SGDX_FACE_TO_CRBNSR option to convert GDX Face entity to STEP CURVE_BOUNDED_SURFACE entity. The STEP entities that result from the GDX entities are as follows:
| GDX entity | STEP entity |
| – | |
| GDX_ARC | TRIMMED_CURVE/CIRCLE, CIRCLE |
| GDX_CONIC | TRIMMED_CURVE/ELLIPSE, ELLIPSE, |
| TRIMMED_CURVE/HYPERBOLA, | |
| TRIMMED_CURVE/PARABOLA | |
| GDX_POLYLINE | CARTESIAN_POINT, TRIMMED_CURVE/LINE, |
| POLYLINE | |
| GDX_NURB_CURVE | UNIFORM_CURVE, QUASI_UNIFORM_CURVE, |
| BEZIER_CURVE, B_SPLINE_CURVE_WITH_KNOTS, | |
| RATIONAL_UNIFORM_CURVE, | |
| RATIONAL_QUASI_UNIFORM_CURVE, | |
| RATIONAL_BEZIER_CURVE, | |
| RATIONAL_B_SPLINE_CURVE_WITH_KNOTS, | |
| TRIMMED_CURVE (referencing one of above) | |
| GDX_COMP_CURVE | COMPOSITE_CURVE |
| GDX_OFFSET_CURVE | OFFSET_CURVE_2D, OFFSET_CURVE_3D, |
| TRIMMED_CURVE (referencing one of above) | |
| GDX_TRIM_CURVE | TRIMMED_CURVE |
| GDX entity | STEP entity |
| – | |
| GDX_NURB_SURF | UNIFORM_SURFACE, QUASI_UNIFORM_SURFACE, |
| BEZIER_SURFACE, B_SPLINE_SURFACE_WITH_KNOTS, | |
| RATIONAL_UNIFORM_SURFACE, | |
| RATIONAL_QUASI_UNIFORM_SURFACE, | |
| RATIONAL_BEZIER_SURFACE, | |
| RATIONAL_B_SPLINE_SURFACE_WITH_KNOTS, | |
| RECTANGULAR_TRIMMED_SURFACE (referencing one of above) | |
| GDX_REV_SURF | RECTANGULAR_TRIMMED_SURFACE/SURFACE_OF_REVOLUTION, |
| SURFACE_OF_REVOLUTION | |
| GDX_EXT_SURF | RECTANGULAR_TRIMMED_SURFACE/SURFACE_OF_LINEAR_EXTRUSION |
| SURFACE_OF_LINEAR_EXTRUSION | |
| GDX_PLANE | RECTANGULAR_TRIMMED_SURFACE/PLANE |
| PLANE | |
| GDX_CYLINDER | RECTANGULAR_TRIMMED_SURFACE/CYLINDRICAL_SURFACE |
| CYLINDRICAL_SURFACE | |
| GDX_CONE | RECTANGULAR_TRIMMED_SURFACE/CONICAL_SURFACE |
| CONICAL_SURFACE | |
| GDX_SPHERE | RECTANGULAR_TRIMMED_SURFACE/SPHERICAL_SURFACE |
| SPHERICAL_SURFACE | |
| GDX_TORUS | RECTANGULAR_TRIMMED_SURFACE/TOROIDAL_SURFACE |
| TOROIDAL_SURFACE | |
| GDX_OFFSET_SURF | RECTANGULAR_TRIMMED_SURFACE/OFFSET_SURFACE |
| OFFSET_SURFACE | |
| GDX_RECT_TRIM_SURF | RECTANGULAR_TRIMMED_SURFACE |
| GDX entity | STEP entity |
| – | |
| GDX_COMP_EDGE_CURVE | BOUNDARY_CURVE |
| GDX_CURVE_BOUNDED_SURF | CURVE_BOUNDED_SURFACE |
| GDX_FACE | CURVE_BOUNDED_SURFACE |
| GDX_SHELL | SHELL_BASED_SURFACE_MODEL |
| GDX_SOLID | MSBO_SOLID |
| BREP_WITH_VOIDS |
Input
option
SGDX_ADVANCED_FACE
Create a STEP Advanced Face entity instead of a Face Surface entity.
SGDX_FORCE_PCURVE
Force creation of parameter space curves even if SGDX_ADVANCED_FACE is specified.
SGDX_B_SPLINE_WITH_KNOTS
Forces resulting STEP NURB entities to be B_SPLINE_(CURVE/SURFACE)_WITH_KNOTS
SGDX_2D
The resulting STEP point and curve entities should be two-dimensional (perhaps the GDX entity corresponds to a curve in parameter space and, therefore, corresponding STEP entities created must be two-dimensional). Z values in the gdx data will be ignored.
gdx_db_ptr
The GDX entity database pointer
step_model
The STEP model to create the STEP entity in
max_iters
The maximum iterations for convergence test for surface conversions that are approximations
Output
step_db_ptr
The STEP entity database pointer
Return
SGDX_NOERR
SGDX_NOSTEPENTITY
Low Level error return
.fi