From 0b20d3ae2c7a2b838442e26ab2ce6a09ad95c853 Mon Sep 17 00:00:00 2001 From: Thomas Krijnen Date: Thu, 13 Oct 2022 09:21:50 +0200 Subject: [PATCH] #671 correct check for NO_WIRE_INTERSECTION_CHECK setting --- src/ifcgeom/IfcGeom.cpp | 4 ++-- src/ifcgeom/IfcPolyLoop.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/ifcgeom/IfcGeom.cpp b/src/ifcgeom/IfcGeom.cpp index d58a5aeacd..6bc8a8389f 100644 --- a/src/ifcgeom/IfcGeom.cpp +++ b/src/ifcgeom/IfcGeom.cpp @@ -905,7 +905,7 @@ bool IfcGeom::Kernel::convert_wire_to_face(const TopoDS_Wire& w, TopoDS_Face& fa TopTools_ListOfShape results; - if (getValue(GV_NO_WIRE_INTERSECTION_CHECK) == 0. && util::wire_intersections(wire, results, get_wire_intersection_tolerance(wire), getValue(GV_PRECISION))) { + if (getValue(GV_NO_WIRE_INTERSECTION_CHECK) < 0. && util::wire_intersections(wire, results, get_wire_intersection_tolerance(wire), getValue(GV_PRECISION))) { Logger::Warning("Self-intersections with " + boost::lexical_cast(results.Extent()) + " cycles detected"); util::select_largest(results, wire); } @@ -962,7 +962,7 @@ bool IfcGeom::Kernel::convert_wire_to_faces(const TopoDS_Wire& w, TopoDS_Compoun } TopTools_ListOfShape results; - if (getValue(GV_NO_WIRE_INTERSECTION_CHECK) == 0. && util::wire_intersections(w, results, get_wire_intersection_tolerance(w), getValue(GV_PRECISION))) { + if (getValue(GV_NO_WIRE_INTERSECTION_CHECK) < 0. && util::wire_intersections(w, results, get_wire_intersection_tolerance(w), getValue(GV_PRECISION))) { Logger::Warning("Self-intersections with " + boost::lexical_cast(results.Extent()) + " cycles detected"); } else { results.Clear(); diff --git a/src/ifcgeom/IfcPolyLoop.cpp b/src/ifcgeom/IfcPolyLoop.cpp index 49a0b3a683..dda1a98944 100644 --- a/src/ifcgeom/IfcPolyLoop.cpp +++ b/src/ifcgeom/IfcPolyLoop.cpp @@ -70,7 +70,7 @@ bool IfcGeom::Kernel::convert(const IfcSchema::IfcPolyLoop* l, TopoDS_Wire& resu result = w.Wire(); TopTools_ListOfShape results; - if (getValue(GV_NO_WIRE_INTERSECTION_CHECK) == 0. && util::wire_intersections(result, results, get_wire_intersection_tolerance(result), getValue(GV_PRECISION))) { + if (getValue(GV_NO_WIRE_INTERSECTION_CHECK) < 0. && util::wire_intersections(result, results, get_wire_intersection_tolerance(result), getValue(GV_PRECISION))) { Logger::Error("Self-intersections with " + boost::lexical_cast(results.Extent()) + " cycles detected", l); util::select_largest(results, result); }