]> OCCT Git - occt.git/commitdiff
0026063: GeomAPI_ExtremaCurveSurface have inexact API
authoraml <aml@opencascade.com>
Thu, 28 May 2015 09:44:41 +0000 (12:44 +0300)
committerbugmaster <bugmaster@opencascade.com>
Thu, 28 May 2015 09:45:17 +0000 (12:45 +0300)
Reason of exception was eliminated.

Test-case for issue #26063

src/Extrema/Extrema_ExtCS.cxx
tests/bugs/modalg_6/bug26063 [new file with mode: 0644]

index a1c4d7544c801f132c7cc68e0e2ee0e0954e13d3..3bc81ae49d2a27683f117b336b4c3a52c7c5727f 100644 (file)
@@ -410,7 +410,7 @@ Standard_Real Extrema_ExtCS::SquareDistance(const Standard_Integer N) const
 Standard_Integer Extrema_ExtCS::NbExt() const
 {
   if(!myDone) StdFail_NotDone::Raise();
-  return mySqDist.Length();
+  return myPOnC.Length();
 }
 
 
diff --git a/tests/bugs/modalg_6/bug26063 b/tests/bugs/modalg_6/bug26063
new file mode 100644 (file)
index 0000000..5235729
--- /dev/null
@@ -0,0 +1,27 @@
+puts "========"
+puts "OCC26041"
+puts "========"
+puts ""
+################################################
+# GeomAPI_ExtremaCurveSurface have inexact API
+################################################
+
+polyline l 0 -10 -10 0 10 -10 0 10 10 0 -10 10 0 -10 -10
+mkplane pl l
+mksurface surf pl
+
+vinit
+vdisplay pl
+vertex v1 10 -5 0
+vertex v2 10 5 0
+edge e v1 v2
+mkcurve curv e
+vdisplay e
+vfit
+
+set bug_info [extrema surf curv]
+if {$bug_info != "No solutions!\n"} {
+  puts "ERROR: OCC25063 is reproduced."
+}
+
+set only_screen 1