#1853 don't blindly explode compounds but check whether there are solids inside

This commit is contained in:
Thomas Krijnen
2021-11-05 10:09:12 +01:00
parent 2d0c44e25a
commit 10b502512f
+1 -1
View File
@@ -892,7 +892,7 @@ bool IfcGeom::Kernel::convert(const IfcSchema::IfcRepresentation* l, IfcRepresen
} else {
TopoDS_Shape s;
if (convert_shape(representation_item, s)) {
if (s.ShapeType() == TopAbs_COMPOUND) {
if (s.ShapeType() == TopAbs_COMPOUND && TopoDS_Iterator(s).More() && TopoDS_Iterator(s).Value().ShapeType() == TopAbs_SOLID) {
TopoDS_Iterator it(s);
for (; it.More(); it.Next()) {
shapes.push_back(IfcRepresentationShapeItem(representation_item->data().id(), it.Value(), get_style(representation_item)));