From 5e18f9171902f8470e740b6d6d26fbb23d5819bd Mon Sep 17 00:00:00 2001 From: emv Date: Thu, 30 Apr 2015 13:31:47 +0300 Subject: [PATCH] 0026112: Exception is raised during perform of General Fuse operation class BOPAlgo_WireSplitter method Standard_Boolean RefineAngle2D(const TopoDS_Vertex& aV, const TopoDS_Edge& aE, const TopoDS_Face& myFace, const Standard_Real aA1, const Standard_Real aA2, Standard_Real& aA) Protection from null vector. Test case for issue CR26112 --- src/BOPAlgo/BOPAlgo_WireSplitter_1.cxx | 3 ++ tests/bugs/modalg_6/bug26112 | 38 ++++++++++++++++++++++++++ 2 files changed, 41 insertions(+) create mode 100755 tests/bugs/modalg_6/bug26112 diff --git a/src/BOPAlgo/BOPAlgo_WireSplitter_1.cxx b/src/BOPAlgo/BOPAlgo_WireSplitter_1.cxx index 0afa8ad9a4..34408661d9 100644 --- a/src/BOPAlgo/BOPAlgo_WireSplitter_1.cxx +++ b/src/BOPAlgo/BOPAlgo_WireSplitter_1.cxx @@ -1061,6 +1061,9 @@ Standard_Boolean RefineAngle2D(const TopoDS_Vertex& aV, } // dT = aTOp - aT1max; + if (Abs(dT) < aTolInt) { + continue; + } // aT=aT1max + aCf*dT; aC2D->D0(aT, aP); diff --git a/tests/bugs/modalg_6/bug26112 b/tests/bugs/modalg_6/bug26112 new file mode 100755 index 0000000000..827db18d2d --- /dev/null +++ b/tests/bugs/modalg_6/bug26112 @@ -0,0 +1,38 @@ +puts "============" +puts "OCC26112" +puts "============" +puts "" +############################### +## Exception is raised during perform of General Fuse operation +############################### + +restore [locate_data_file bug26112_c.brep ] c + +explode c + +bclearobjects +bcleartools +baddobjects c_1 +baddtools c_2 + +bfillds +bbuild result + +set square 122.7 + +set nbshapes_expected " +Number of shapes in shape + VERTEX : 7 + EDGE : 10 + WIRE : 5 + FACE : 4 + SHELL : 0 + SOLID : 0 + COMPSOLID : 0 + COMPOUND : 1 + SHAPE : 27 +" + +checknbshapes result -ref ${nbshapes_expected} -t -m "Result obtained by General Fuse operator" + +set 3dviewer 1