Rotation matrix

How does OCC read in and apply a rotation matrix in the STEP file? That is, if I define a rotation with BRepBuilderAPI_Transform, save the resulting shape to a .step file, it stores a rotation matrix that needs to be applied to the appropriate geometry, correct? When I read in this .step file in a new code, how does OCC recognize this rotation matrix and apply it? I ask because when I try to read the .step file a single solid at a time, the rotation matrix is not applied (whereas if I read the .step file in it's entirety, the rotation matrix is applied correctly). If I knew where and how OCC did this, I could copy the requisite section of code into my own code and simply run it.

Forum supervisor's picture

Dear Ravi,
Shape transformations can be defined in STEP in different way. In most cases transformation is part of definition of assembly structure, where the same part can have multiple instances, each with its own transformation. Thus there is no straightforward way to get transformation for single shape from STEP, the approach to use in your case should be chosen basing on particular application and data you have.
Best regards