STEP/XML Reader

STEP/XML is an XML specification used to represent EXPRESS schemas such as [STEP](step_reader.html). STEP/XML is standardized under the name ISO_10303-28 <https://en.wikipedia.org/wiki/ISO_10303-28>.

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

  • .STPX for uncompressed text files

  • .STPXZ for compressed binary files

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](overview. html).

Assembly

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

  • A 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.

  • A product occurrence which directly maps to the CAD data.

### See also

  • A3DAsmProductOccurrenceData specifications.

  • a3d_product_flag

Attributes

In addition to reading the assembly structure and CAD files, our reader stores the attributes from the STEP/XML file into generic attributes. For more information about how to retrieve them, check out Generic Attributes.

How to Read a STEP/XML File

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

// ... Initialize HOOPS Exchange ...
A3DRWParamsLoadData sParams;
A3D_INITIALIZE_DATA(A3DRWParamsLoadData, sParams);

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