From: ifv Date: Mon, 17 Oct 2022 14:22:44 +0000 (+0300) Subject: 0033173: Modeling Algorithms - Regression in BRepExtrema_DistShapeShape causing Stand... X-Git-Tag: V7_8_0~110 X-Git-Url: http://git.dev.opencascade.org/gitweb/?a=commitdiff_plain;h=8175a70c4e83bd5084931b82dfe50b7cd9ff1d6d;p=occt.git 0033173: Modeling Algorithms - Regression in BRepExtrema_DistShapeShape causing Standard_OutOfRange exception Extrema/Extrema_ExtCC.cxx - checking number of solutions is added tests/bugs/modalg_8/bug33173 - test case added --- diff --git a/src/Extrema/Extrema_ExtCC.cxx b/src/Extrema/Extrema_ExtCC.cxx index def27cbe5e..06481b5539 100644 --- a/src/Extrema/Extrema_ExtCC.cxx +++ b/src/Extrema/Extrema_ExtCC.cxx @@ -674,7 +674,10 @@ void Extrema_ExtCC::PrepareParallelResult(const Standard_Real theUt11, Extrema_ExtPElC ExtPCir(aPCirc2, Extrema_CurveTool::Circle (*myC[0]), Precision::Confusion(), theUt11, theUt12); - + if (ExtPCir.NbExt() < 1) + { + continue; + } Standard_Real aMinSqD = ExtPCir.SquareDistance(1); for (Standard_Integer anExtID = 2; anExtID <= ExtPCir.NbExt(); anExtID++) { diff --git a/tests/bugs/modalg_8/bug33173 b/tests/bugs/modalg_8/bug33173 new file mode 100644 index 0000000000..beb793d69b --- /dev/null +++ b/tests/bugs/modalg_8/bug33173 @@ -0,0 +1,15 @@ +puts "========" +puts "0033173: Modeling Algorithms - Regression in BRepExtrema_DistShapeShape causing Standard_OutOfRange" +puts "========" +puts "" + +set MinDistExpected 7.049107166484117e-07 +restore [locate_data_file bug33173.brep] s +explode s +distmini dm s_1 s_2 +if {[isdraw dm]} { + checkreal MinDist $MinDistExpected [dval dm_val] 1.e-7 .01 +} else { + puts "Error: distmini failed" +} +