From e9a7ec7a2b92f85777462a56e8a5b5fe808125b9 Mon Sep 17 00:00:00 2001 From: nbv Date: Fri, 16 Jun 2017 12:21:57 +0300 Subject: [PATCH] 0028849: [Regression to 7.1.0] Exception in Boolean operation The reason of exception has been eliminated. --- .../IntPatch_ImpImpIntersection_4.gxx | 2 +- tests/bugs/modalg_7/bug28849 | 28 +++++++++++++++++++ 2 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 tests/bugs/modalg_7/bug28849 diff --git a/src/IntPatch/IntPatch_ImpImpIntersection_4.gxx b/src/IntPatch/IntPatch_ImpImpIntersection_4.gxx index 1a6cb9b87a..27c5f6acc8 100644 --- a/src/IntPatch/IntPatch_ImpImpIntersection_4.gxx +++ b/src/IntPatch/IntPatch_ImpImpIntersection_4.gxx @@ -3212,7 +3212,7 @@ static IntPatch_ImpImpIntersection::IntStatus Standard_Boolean isChanged = Standard_False; for (Standard_Integer i = 0; i < aNbWLines; i++) { - if (aWLFindStatus[i] == WLFStatus_Absent) + if ((aWLFindStatus[i] == WLFStatus_Absent) || (aWLine[i]->NbPnts() == 0)) continue; Standard_Real aU1c = 0.0, aV1c = 0.0; diff --git a/tests/bugs/modalg_7/bug28849 b/tests/bugs/modalg_7/bug28849 new file mode 100644 index 0000000000..08aea352c7 --- /dev/null +++ b/tests/bugs/modalg_7/bug28849 @@ -0,0 +1,28 @@ +puts "=======" +puts "OCC28849" +puts "=======" +puts "" +################################################## +# [Regression to 7.1.0] Exception in Boolean operation +################################################## + +restore [locate_data_file bug28849_shape1.brep] s1 +restore [locate_data_file bug28849_shape2.brep] s2 + +bsection result s1 s2 + +regexp {nb alone Vertices : ([-0-9.+eE]+)} [checksection result] full nbv + +if { $nbv != 2 } { + puts "Error : Section is incorrect" +} else { + puts "Section is correct" +} + +checkprops result -l 5.40612 + +smallview +don result +fit + +checkview -screenshot -2d -path ${imagedir}/${test_image}.png \ No newline at end of file -- 2.20.1