From 564c4b7644e79d8bc6d96a8a3fe8794a3dfde875 Mon Sep 17 00:00:00 2001 From: Thomas Krijnen Date: Fri, 8 Apr 2022 10:45:28 +0200 Subject: [PATCH] #2126 reverse 1st operand inner wires in 2d opening subtraction --- src/ifcgeom/IfcGeomFunctions.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/ifcgeom/IfcGeomFunctions.cpp b/src/ifcgeom/IfcGeomFunctions.cpp index 88e2bf132a..f0e233dde6 100644 --- a/src/ifcgeom/IfcGeomFunctions.cpp +++ b/src/ifcgeom/IfcGeomFunctions.cpp @@ -4599,6 +4599,13 @@ namespace { if (outer_wire.IsNull() || !it2.Value().IsSame(outer_wire)) { wires.push_back(TopoDS::Wire(it2.Value())); + + if (shape_index == 0 && num_wires > 0) { + // An inner wire on the first operand face: reverse, because + // MakeFace expects inner boundaries to be added as bounded + // areas. + wires.back().Reverse(); + } } }