From 10b502512ff791c7e25c8c7b516a7175a466341e Mon Sep 17 00:00:00 2001 From: Thomas Krijnen Date: Fri, 5 Nov 2021 10:09:12 +0100 Subject: [PATCH] #1853 don't blindly explode compounds but check whether there are solids inside --- src/ifcgeom/IfcGeomShapes.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ifcgeom/IfcGeomShapes.cpp b/src/ifcgeom/IfcGeomShapes.cpp index 6475b34e83..8bfad90ef6 100644 --- a/src/ifcgeom/IfcGeomShapes.cpp +++ b/src/ifcgeom/IfcGeomShapes.cpp @@ -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)));