From: msv Date: Thu, 5 Sep 2019 15:09:06 +0000 (+0300) Subject: 0030778: [Regression to 7.3.0] Extrema raises exception StdFail_InfiniteSolutions X-Git-Tag: V7_4_0_beta~19 X-Git-Url: http://git.dev.opencascade.org/gitweb/?p=occt.git;a=commitdiff_plain;h=ce64c9ad5ed9fde5c8354f09684ca8fed3249130 0030778: [Regression to 7.3.0] Extrema raises exception StdFail_InfiniteSolutions The exception StdFail_InfiniteSolutions has been suppressed in all Points() methods. --- diff --git a/src/Extrema/Extrema_ECC.hxx b/src/Extrema/Extrema_ECC.hxx index 0147465dfd..aecd8220e0 100644 --- a/src/Extrema/Extrema_ECC.hxx +++ b/src/Extrema/Extrema_ECC.hxx @@ -28,9 +28,7 @@ #include #include #include -class StdFail_InfiniteSolutions; -class StdFail_NotDone; -class Standard_OutOfRange; + class Adaptor3d_Curve; class Extrema_CurveTool; class Extrema_POnCurv; @@ -38,7 +36,6 @@ class gp_Pnt; class gp_Vec; - class Extrema_ECC { public: diff --git a/src/Extrema/Extrema_ECC2d.hxx b/src/Extrema/Extrema_ECC2d.hxx index 6949b3d9ac..fd4ad016c6 100644 --- a/src/Extrema/Extrema_ECC2d.hxx +++ b/src/Extrema/Extrema_ECC2d.hxx @@ -28,9 +28,7 @@ #include #include #include -class StdFail_InfiniteSolutions; -class StdFail_NotDone; -class Standard_OutOfRange; + class Adaptor2d_Curve2d; class Extrema_Curve2dTool; class Extrema_POnCurv2d; @@ -38,7 +36,6 @@ class gp_Pnt2d; class gp_Vec2d; - class Extrema_ECC2d { public: diff --git a/src/Extrema/Extrema_ECC2d_0.cxx b/src/Extrema/Extrema_ECC2d_0.cxx index 0e989c44e7..93a06c2bcb 100644 --- a/src/Extrema/Extrema_ECC2d_0.cxx +++ b/src/Extrema/Extrema_ECC2d_0.cxx @@ -16,9 +16,6 @@ #include -#include -#include -#include #include #include #include diff --git a/src/Extrema/Extrema_ECC_0.cxx b/src/Extrema/Extrema_ECC_0.cxx index 50b5c06153..4ef949e189 100644 --- a/src/Extrema/Extrema_ECC_0.cxx +++ b/src/Extrema/Extrema_ECC_0.cxx @@ -16,9 +16,6 @@ #include -#include -#include -#include #include #include #include diff --git a/src/Extrema/Extrema_ExtCC.cxx b/src/Extrema/Extrema_ExtCC.cxx index da1d0007be..ed7dd90104 100644 --- a/src/Extrema/Extrema_ExtCC.cxx +++ b/src/Extrema/Extrema_ExtCC.cxx @@ -43,7 +43,6 @@ #include #include #include -#include #include #include #include @@ -327,11 +326,6 @@ void Extrema_ExtCC::Points(const Standard_Integer N, Extrema_POnCurv& P1, Extrema_POnCurv& P2) const { - if (IsParallel()) - { - throw StdFail_InfiniteSolutions(); - } - if (N < 1 || N > NbExt()) { throw Standard_OutOfRange(); diff --git a/src/Extrema/Extrema_ExtCC.hxx b/src/Extrema/Extrema_ExtCC.hxx index d8d17f123c..d2ee29c0f5 100644 --- a/src/Extrema/Extrema_ExtCC.hxx +++ b/src/Extrema/Extrema_ExtCC.hxx @@ -29,9 +29,7 @@ #include #include #include -class StdFail_InfiniteSolutions; -class StdFail_NotDone; -class Standard_OutOfRange; + class Adaptor3d_Curve; class Extrema_POnCurv; class gp_Pnt; diff --git a/src/Extrema/Extrema_ExtCC2d.cxx b/src/Extrema/Extrema_ExtCC2d.cxx index ba2b88053c..eee89c65ba 100644 --- a/src/Extrema/Extrema_ExtCC2d.cxx +++ b/src/Extrema/Extrema_ExtCC2d.cxx @@ -34,10 +34,7 @@ #include #include #include -#include -#include #include -#include #include Extrema_ExtCC2d::Extrema_ExtCC2d() diff --git a/src/Extrema/Extrema_ExtCC2d.hxx b/src/Extrema/Extrema_ExtCC2d.hxx index fe7bc96efb..43267b29f7 100644 --- a/src/Extrema/Extrema_ExtCC2d.hxx +++ b/src/Extrema/Extrema_ExtCC2d.hxx @@ -28,9 +28,7 @@ #include #include #include -class StdFail_InfiniteSolutions; -class StdFail_NotDone; -class Standard_OutOfRange; + class Adaptor2d_Curve2d; class Extrema_POnCurv2d; class gp_Pnt2d; diff --git a/src/Extrema/Extrema_ExtCS.cxx b/src/Extrema/Extrema_ExtCS.cxx index 05b65eaa45..c50a6b28c3 100644 --- a/src/Extrema/Extrema_ExtCS.cxx +++ b/src/Extrema/Extrema_ExtCS.cxx @@ -36,10 +36,7 @@ #include #include #include -#include #include -#include -#include #include #include @@ -497,11 +494,6 @@ void Extrema_ExtCS::Points(const Standard_Integer N, Extrema_POnCurv& P1, Extrema_POnSurf& P2) const { - if (IsParallel()) - { - throw StdFail_InfiniteSolutions(); - } - if (N < 1 || N > NbExt()) { throw Standard_OutOfRange(); diff --git a/src/Extrema/Extrema_ExtElC.cxx b/src/Extrema/Extrema_ExtElC.cxx index c3d08e2a98..b1e0a8f644 100644 --- a/src/Extrema/Extrema_ExtElC.cxx +++ b/src/Extrema/Extrema_ExtElC.cxx @@ -36,9 +36,7 @@ #include #include #include -#include #include -#include #include #include @@ -1100,11 +1098,6 @@ void Extrema_ExtElC::Points (const Standard_Integer N, Extrema_POnCurv& P1, Extrema_POnCurv& P2) const { - if (IsParallel()) - { - throw StdFail_InfiniteSolutions(); - } - if (N < 1 || N > NbExt()) { throw Standard_OutOfRange(); diff --git a/src/Extrema/Extrema_ExtElC.hxx b/src/Extrema/Extrema_ExtElC.hxx index c6e720cec2..28d1e28fef 100644 --- a/src/Extrema/Extrema_ExtElC.hxx +++ b/src/Extrema/Extrema_ExtElC.hxx @@ -25,9 +25,7 @@ #include #include #include -class StdFail_InfiniteSolutions; -class StdFail_NotDone; -class Standard_OutOfRange; + class gp_Lin; class gp_Circ; class gp_Elips; diff --git a/src/Extrema/Extrema_ExtElC2d.cxx b/src/Extrema/Extrema_ExtElC2d.cxx index 99274b745b..4a13690369 100644 --- a/src/Extrema/Extrema_ExtElC2d.cxx +++ b/src/Extrema/Extrema_ExtElC2d.cxx @@ -27,9 +27,7 @@ #include #include #include -#include #include -#include #include //======================================================================= @@ -459,11 +457,6 @@ void Extrema_ExtElC2d::Points (const Standard_Integer N, Extrema_POnCurv2d& P1, Extrema_POnCurv2d& P2) const { - if (IsParallel()) - { - throw StdFail_InfiniteSolutions(); - } - if (N < 1 || N > NbExt()) { throw Standard_OutOfRange(); } P1 = myPoint[N-1][0]; P2 = myPoint[N-1][1]; diff --git a/src/Extrema/Extrema_ExtElC2d.hxx b/src/Extrema/Extrema_ExtElC2d.hxx index 708149b9bc..891e0b6ed3 100644 --- a/src/Extrema/Extrema_ExtElC2d.hxx +++ b/src/Extrema/Extrema_ExtElC2d.hxx @@ -25,9 +25,7 @@ #include #include #include -class StdFail_InfiniteSolutions; -class StdFail_NotDone; -class Standard_OutOfRange; + class gp_Lin2d; class gp_Circ2d; class gp_Elips2d; diff --git a/src/Extrema/Extrema_ExtElCS.cxx b/src/Extrema/Extrema_ExtElCS.cxx index 63d0a917a3..937f7c3bad 100644 --- a/src/Extrema/Extrema_ExtElCS.cxx +++ b/src/Extrema/Extrema_ExtElCS.cxx @@ -37,7 +37,6 @@ #include #include #include -#include #include #include @@ -827,11 +826,6 @@ void Extrema_ExtElCS::Points(const Standard_Integer N, Extrema_POnCurv& P1, Extrema_POnSurf& P2) const { - if (IsParallel()) - { - throw StdFail_InfiniteSolutions(); - } - if (N < 1 || N > NbExt()) { throw Standard_OutOfRange(); diff --git a/src/Extrema/Extrema_ExtElCS.hxx b/src/Extrema/Extrema_ExtElCS.hxx index a28c8d59bc..fe61099cf0 100644 --- a/src/Extrema/Extrema_ExtElCS.hxx +++ b/src/Extrema/Extrema_ExtElCS.hxx @@ -27,9 +27,7 @@ #include #include #include -class StdFail_InfiniteSolutions; -class StdFail_NotDone; -class Standard_OutOfRange; + class gp_Lin; class gp_Pln; class gp_Cylinder; diff --git a/src/Extrema/Extrema_ExtElSS.cxx b/src/Extrema/Extrema_ExtElSS.cxx index 4aad73f56a..e4fe6b1170 100644 --- a/src/Extrema/Extrema_ExtElSS.cxx +++ b/src/Extrema/Extrema_ExtElSS.cxx @@ -24,7 +24,6 @@ #include #include #include -#include #include Extrema_ExtElSS::Extrema_ExtElSS() @@ -165,11 +164,6 @@ void Extrema_ExtElSS::Points(const Standard_Integer N, Extrema_POnSurf& P1, Extrema_POnSurf& P2) const { - if (IsParallel()) - { - throw StdFail_InfiniteSolutions(); - } - if (N < 1 || N > NbExt()) { throw Standard_OutOfRange(); diff --git a/src/Extrema/Extrema_ExtElSS.hxx b/src/Extrema/Extrema_ExtElSS.hxx index c34405760b..2cb990eeaa 100644 --- a/src/Extrema/Extrema_ExtElSS.hxx +++ b/src/Extrema/Extrema_ExtElSS.hxx @@ -26,9 +26,7 @@ #include #include #include -class StdFail_InfiniteSolutions; -class StdFail_NotDone; -class Standard_OutOfRange; + class gp_Pln; class gp_Sphere; class gp_Cylinder; diff --git a/src/Extrema/Extrema_ExtSS.cxx b/src/Extrema/Extrema_ExtSS.cxx index 8675df6cdc..d1bfc113b5 100644 --- a/src/Extrema/Extrema_ExtSS.cxx +++ b/src/Extrema/Extrema_ExtSS.cxx @@ -24,10 +24,7 @@ #include #include #include -#include #include -#include -#include #include Extrema_ExtSS::Extrema_ExtSS() @@ -263,11 +260,6 @@ void Extrema_ExtSS::Points(const Standard_Integer N, Extrema_POnSurf& P1, Extrema_POnSurf& P2) const { - if (IsParallel()) - { - throw StdFail_InfiniteSolutions(); - } - if (N < 1 || N > NbExt()) { throw Standard_OutOfRange(); diff --git a/src/Extrema/Extrema_GenExtCC.gxx b/src/Extrema/Extrema_GenExtCC.gxx index 2c7767eca2..969a5b85ae 100644 --- a/src/Extrema/Extrema_GenExtCC.gxx +++ b/src/Extrema/Extrema_GenExtCC.gxx @@ -658,11 +658,6 @@ void Extrema_GenExtCC::Points(const Standard_Integer N, POnC& P1, POnC& P2) const { - if (IsParallel()) - { - throw StdFail_InfiniteSolutions(); - } - if (N < 1 || N > NbExt()) { throw Standard_OutOfRange(); diff --git a/tests/bugs/modalg_7/bug30778 b/tests/bugs/modalg_7/bug30778 new file mode 100644 index 0000000000..31713609c5 --- /dev/null +++ b/tests/bugs/modalg_7/bug30778 @@ -0,0 +1,17 @@ +puts "========" +puts "0030778: \[Regression to 7.3.0\] Extrema raises excep-tion StdFail_InfiniteSolutions" +puts "========" +puts "" + +restore [locate_data_file bug30778.brep] a +explode a +pcurve c1 a_1 a_3 +pcurve c2 a_2 a_3 +trim c1 c1 0.0833292423088664 1 +trim c2 c2 0 0.91666977216245 + +set out [2dextrema c1 c2] + +regexp {distance = ([0-9+-.eE]*)} $out full dist + +checkreal distance $dist 0 1e-9 0