As you can see on screenshot and step file in zip archive, Wood Top is a sub-assembly with only solid/geometry based children.
If I try to get its type name with TopoDS_Shape::ShapeType(), it says COMPOUND
I need to differentiate between a sub-assembly with actually zero children and with only geometry based children.
Is there any suggestion for that ?
Shouldn't ShapeType() return COMPSOLID ?
Discussion
2 archived replies
Posts are displayed in their archived order.
01Commenter-1
TopAbs_COMPSOLID means 'Composite Solid', not 'Compound of Solids'. Within composite solid, solids should share common faces where they touch each other. But if we'll take a look at 'Wood Top' within your model, we'll see no shared faces.
pload OCAF XDE VISUALIZATION
ReadStep D test_1.step
XGetShape s D 0:1:1:1:1
whatis s
# s is a shape COMPOUND FORWARD Modified
explode s
# s_1 s_2 s_3 s_4
whatis s_1
# s_1 is a shape SOLID FORWARD Modified
vdisplay s_1 s_2 s_3 s_4 -dispMode 1
vfit
vaspects s_1 s_2 s_3 s_4 -faceBoundaries 1
verase s_2 s_3 s_4
You may see that the main solid doesn't share common faces/wires with other solids in compound.
Archived image: wood_top compoundArchived image: wood_top main solid
02Author
So, how can I differentiate wood top like object and a sub-assembly which doesn't have a child with C++ ? I am working on Unreal Engine 5 wrapper and I need to know that when should I create scene component or static mesh component