From 176a7959209e938a9b57a6eb900f4a5488829e43 Mon Sep 17 00:00:00 2001 From: jgv Date: Wed, 15 Mar 2017 16:36:47 +0300 Subject: [PATCH] 0028558: Test bugs modalg_6 bug26150_17 is failed with FPE switched on Avoid division by zero in the method BRepFill_CompatibleWires::SameNumberByACR. --- src/BRepFill/BRepFill_CompatibleWires.cxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/BRepFill/BRepFill_CompatibleWires.cxx b/src/BRepFill/BRepFill_CompatibleWires.cxx index 26c73185fc..6465264105 100644 --- a/src/BRepFill/BRepFill_CompatibleWires.cxx +++ b/src/BRepFill/BRepFill_CompatibleWires.cxx @@ -1402,7 +1402,9 @@ void BRepFill_CompatibleWires::SameNumberByACR(const Standard_Boolean report) // insertion of cuts in each wire for (i=1; i<=nbSects; i++) { const TopoDS_Wire& oldwire = TopoDS::Wire(myWork(i)); - Standard_Real tol = Precision::Confusion() / WireLen(i); + Standard_Real tol = Precision::Confusion(); + if (WireLen(i) > gp::Resolution()) + tol /= WireLen(i); TopoDS_Wire newwire = BRepFill::InsertACR(oldwire, dec3, tol); BRepTools_WireExplorer anExp1,anExp2; anExp1.Init(oldwire); -- 2.39.5