From 9176540c641849473cd0d65688a39fd9b91815a8 Mon Sep 17 00:00:00 2001 From: aml Date: Thu, 28 May 2015 12:44:41 +0300 Subject: [PATCH] 0026063: GeomAPI_ExtremaCurveSurface have inexact API Reason of exception was eliminated. Test-case for issue #26063 --- src/Extrema/Extrema_ExtCS.cxx | 2 +- tests/bugs/modalg_6/bug26063 | 27 +++++++++++++++++++++++++++ 2 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 tests/bugs/modalg_6/bug26063 diff --git a/src/Extrema/Extrema_ExtCS.cxx b/src/Extrema/Extrema_ExtCS.cxx index a1c4d7544c..3bc81ae49d 100644 --- a/src/Extrema/Extrema_ExtCS.cxx +++ b/src/Extrema/Extrema_ExtCS.cxx @@ -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 index 0000000000..5235729309 --- /dev/null +++ b/tests/bugs/modalg_6/bug26063 @@ -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