Thu, 03/19/2026 - 05:21
Hello Everyone:
I am encountering a problem when reading geometric tolerances from STEP AP242 files that were exported from Siemens NX or NIST (stepmod) using OCCT 7.9.
Environment:
OCCT version: 7.9 (also tested with 7.8.0, same behavior)
Input files: STEP AP242 files containing GD&T (Geometric Dimensioning and Tolerancing) information.
Reader: STEPCAFControl_Reader with XCAFDoc_DimTolTool to access tolerance data.
When I export a STEP file from OCCT (using STEPCAFControl_Writer) and then re-import it, I can successfully retrieve all tolerance information: type, datum references, and the tolerance value (magnitude).
However, when I try to import STEP files generated by NX or NIST, I can only retrieve the tolerance type, name, description, and datums. The tolerance magnitude (numerical value and unit) is missing – the Magnitude() method of StepDimTol_GeometricTolerance returns a null handle.
Questions:
1.Is this a known limitation in OCCT 7.9? Are there any patches or workarounds?
2.How can I debug the STEP file to see exactly how the tolerance magnitude is stored? Are there specific entities or attributes I should look for in the file?
3.Is there any additional code required to extract the magnitude when it is attached via a different relationship (e.g., through a DESCRIPTIVE_REPRESENTATION_ITEM or MEASURE_REPRESENTATION_ITEM)?
Any guidance or suggestions would be greatly appreciated.
Thank you for your time and support.
Best regards