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" +} +