An interesting question was posted by one of our subscribers under Lesson 12:
Here's a related question from the "official" forum:
This thread is to elaborate a bit on this subject. I think I had a code snippet somewhere doing that thing, but I need to double-check it.Is there any way to find the name of the solids for example I want to find Body1 and Body2.
#41=MANIFOLD_SOLID_BREP('Body1',#97);
#42=MANIFOLD_SOLID_BREP('Body2',#98);
Here's a related question from the "official" forum:
I'm currently using "STEPCAFControl_reader" with the translation parameter "read.stepcaf.subshapes.name" set to 1 (otherwise XDE doesn't expand to sub-shapes).
I can find the names of the "MANIFOLD_SOLID_BREP" entities with ShapeTool "FindSubShape", but it returns 0 whenever there is only one sub-shape/solid body.
If there are multiple sub-shapes/solid bodies it does read the "MANIFOLD_SOLID_BREP" entity name. The only problem I have is that whenever there is only one solid body in the shape, I can only get the "CLOSED_SHELL" entity name, but not the "MANIFOLD_SOLID_BREP" entity name. I can also get the shape name buy that is not what I'm looking for.
The only thing I can think of is that if there is only one sub-shape/solid body it is not considered as a sub-shape. So my question is then how do you get the MANIFOLD_SOLID_BREP entity name.
Is there any way to find the name of the solids for example I want to find "Boss-Extrude1" and "Boss-Extrude2".
#23=MANIFOLD_SOLID_BREP('Boss-Extrude1',#45);
#78=MANIFOLD_SOLID_BREP('Boss-Extrude2',#66);