I have a STEP file in which one of the solids has been suppressed with the following line:


If I open the file in eDrawings the solid in question is indeed invisible. If I delete the above line, eDrawings displays the solid.

In my own code, I read the model using STEPControl_Reader::ReadFile and OneShape, and traverse it with TopExp_Explorer to add the faces to my own Ogre3D-based rendering using BRep_Tool::Triangulation to get the mesh for each face.

This method does not, however, exclude the solid marked as invisible in the STEP file.

My question is, how do I recognize the fact that a TopoDS_Shape is marked invisible, so that I can skip rendering it?

Andrew Casson

Kirill Gavrilov's picture

Visibility is propagated as visual property (in the same list as colors) - I guess it should end up into XCAFPrs_Style::IsVisible() property in case of XCAF document. So, you'll need to parse through visualization attributes to retrieve this information.

Andrew Casson's picture

Thanks, Kirill. I've no experience with the visualization attributes but will give it a go.

sOup Enjoyer's picture

Check QuaoarsWorkshop on Youtube, helped me understand the most of it!