From 92fb46558fdcfc7a7c4edb402f1079267545dbb3 Mon Sep 17 00:00:00 2001 From: Thomas Krijnen Date: Thu, 13 Oct 2022 09:20:44 +0200 Subject: [PATCH] #671 perform fix on wires after wire_intersections() --- src/ifcgeom_schema_agnostic/wire_utils.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/ifcgeom_schema_agnostic/wire_utils.cpp b/src/ifcgeom_schema_agnostic/wire_utils.cpp index 2c069bbe27..11876e2aa9 100644 --- a/src/ifcgeom_schema_agnostic/wire_utils.cpp +++ b/src/ifcgeom_schema_agnostic/wire_utils.cpp @@ -7,6 +7,7 @@ #include #include #include +#include #include #include #include @@ -496,11 +497,15 @@ bool IfcGeom::util::wire_intersections(const TopoDS_Wire& wire, TopTools_ListOfS } } + ShapeFix_Wire sfw; + sfw.Load(mw.Wire()); + sfw.Perform(); + // Recursively process both cuts // @todo this is a change in behaviour with eps precomputed from the kernel // instead of adaptively calculated for the successive iterations. - wire_intersections(mw.Wire(), wires, eps, eps_real); + wire_intersections(sfw.Wire(), wires, eps, eps_real); } return true;