STEP/XML Reader

STEP/XML
File Extension: STPX, STPXZ
Supported Versions Any
Platforms
Tessellation Supported
B-rep Supported
PMI Supported

STEP/XML is an XML specification used to represent EXPRESS schemas such as STEP. STEP/XML is standardized under the name ISO_10303-28.

HOOPS Exchange allows you to read STEP/XML files. Generally such files will have these extensions:

  • .STPX for uncompressed text files
  • .STPXZ for compressed binary files

HOOPS Exchange geometry access for STEP/XML includes:

  • B-rep: Access to exact geometry where present in the source file.
  • Tessellation: Can be generated by HOOPS Exchange for visualization.

How to Read a STEP/XML File

Note

If you are new to reading models with HOOPS Exchange, see the basic load workflow section of the Programming Guide.

To create an A3DAsmModelFile() from a STEP/XML file, use our standard read functions:

// ... Initialize HOOPS Exchange ...
A3DRWParamsLoadData sParams = A3D_MAKE_DATA(A3DRWParamsLoadData);

// set tessellation reader parameters
sParams.m_sTessellation.m_eTessellationLevelOfDetail = kA3DTessLODMedium;
sParams.m_sTessellation.m_bKeepUVPoints = A3D_TRUE;
sParams.m_sTessellation.m_bAccurateSurfaceCurvatures = A3D_TRUE;

A3DAsmModelFile* pModelFile = NULL;
A3DStatus eStatus = A3DAsmModelFileLoadFromFile(FILE_OK, &sParams, &pModelFile);
assert(eStatus <= A3D_SUCCESS);

Note that HOOPS Exchange provides file reading options specific to STEP/XML. These options can be set in the A3DRWParamsLoadData.m_sSpecifics.m_sStep field.

Structure

STEP/XML is a structural format which makes use of the hierarchical nature of XML to represent complex assemblies. The file then references external CAD files which can be any supported format.

Assembly

HOOPS Exchange stores model files in memory in the form of a data structure called PRC.

Upon reading, the PRC structure is created with respect to the hierarchy of the STEP/XML file. Yet unlike other file formats, each time a CAD file is referenced by an XML node, the reader generates two instances of A3DAsmProductOccurrence instead of one:

  1. The first node maps to the PLM semantics of the product occurrence. This node has a specific flag bit set in A3DAsmProductOccurrenceData.m_uiProductFlags: FLAG_EXTERNAL_REFERENCE.
  2. A product occurrence which directly maps to the CAD data.

See also

Attributes

In addition to reading the assembly structure and CAD files, our reader stores the attributes from the STEP/XML file into generic attributes. Attributes are general purpose data that can be associated to any entity. For more information about how to retrieve them, check out Generic Attributes.

Tessellation

STEP files can contain tessellation data, and this data can be read by HOOPS Exchange. To enable this, set the tessellation parameters using the A3DRWParamsTessellationData structure found at A3DRWParamsLoadData.m_sTessellation during the read process. See code sample above for an example.

B-rep

STEP files can also contain B-rep, and this data can be read by HOOPS Exchange.