From f257aef8f49c80474c432329ecde19df3af6ba57 Mon Sep 17 00:00:00 2001 From: Thomas Krijnen Date: Sat, 27 Feb 2021 10:58:22 +0100 Subject: [PATCH] #1348 special case profiledefwithvoids, needs more work --- src/ifcgeom/IfcGeomShapes.cpp | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/ifcgeom/IfcGeomShapes.cpp b/src/ifcgeom/IfcGeomShapes.cpp index adbf00cfe9..41e851392f 100644 --- a/src/ifcgeom/IfcGeomShapes.cpp +++ b/src/ifcgeom/IfcGeomShapes.cpp @@ -253,14 +253,21 @@ bool IfcGeom::Kernel::convert(const IfcSchema::IfcExtrudedAreaSolidTapered* l, T result = sewer.SewedShape(); + // @todo ugly hack + + // The reason for this distinction is that at this point of the loop we're not sure anymore + // whether this was constructed from an inner or outer bound. So rather than iterating over + // wires of `face1` and `face2` we should iterate over the faces and then properly check with + // BRepTools::OuterBound(). + // Currently this distinction happens based on profile type which is not robust and probably + // not complete. if (shell.IsNull()) { shell = result; } else if (l->SweptArea()->declaration().is(IfcSchema::IfcCircleHollowProfileDef::Class()) || - l->SweptArea()->declaration().is(IfcSchema::IfcRectangleHollowProfileDef::Class())) + l->SweptArea()->declaration().is(IfcSchema::IfcRectangleHollowProfileDef::Class()) || + l->SweptArea()->declaration().is(IfcSchema::IfcArbitraryProfileDefWithVoids::Class())) { - /// @todo a bit of of a hack, should be sufficient shell = BRepAlgoAPI_Cut(shell, result).Shape(); - break; } else { if (compound.IsNull()) { compound_builder.MakeCompound(compound);