Tue, 06/21/2022 - 14:44
Hi,
I have a STEP file in which one of the solids has been suppressed with the following line:
#1319=INVISIBILITY((#1402));
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?
Thanks
Andrew Casson
Tue, 06/21/2022 - 18:08
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.
Wed, 06/22/2022 - 11:57
Thanks, Kirill. I've no experience with the visualization attributes but will give it a go.
Wed, 06/22/2022 - 16:37
Check QuaoarsWorkshop on Youtube, helped me understand the most of it!