]> OCCT Git - occt.git/commitdiff
0033173: Modeling Algorithms - Regression in BRepExtrema_DistShapeShape causing Stand...
authorifv <ifv@opencascade.com>
Mon, 17 Oct 2022 14:22:44 +0000 (17:22 +0300)
committerVadim Glukhikh <vadim.glukhikh@opencascade.com>
Mon, 21 Nov 2022 16:57:45 +0000 (19:57 +0300)
Extrema/Extrema_ExtCC.cxx - checking number of solutions is added

tests/bugs/modalg_8/bug33173 - test case added

src/Extrema/Extrema_ExtCC.cxx
tests/bugs/modalg_8/bug33173 [new file with mode: 0644]

index def27cbe5e4f0ae6e5db462ca66b03d86b6150a8..06481b5539f7f2ed336c3a1a79b748bd9eaf1394 100644 (file)
@@ -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 (file)
index 0000000..beb793d
--- /dev/null
@@ -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"
+}
+