diff --git a/src/Extrema/Extrema_ExtPElC.cdl b/src/Extrema/Extrema_ExtPElC.cdl index 06db9e9b70..0e2750bf47 100755 --- a/src/Extrema/Extrema_ExtPElC.cdl +++ b/src/Extrema/Extrema_ExtPElC.cdl @@ -138,6 +138,7 @@ is is static; Point (me; N: Integer) returns POnCurv + ---C++: return const & ---Purpose: Returns the point of the Nth extremum distance. raises NotDone from StdFail, -- if IsDone(me)=False. diff --git a/src/Extrema/Extrema_ExtPElC.cxx b/src/Extrema/Extrema_ExtPElC.cxx index 685c7c004c..5eca62834c 100755 --- a/src/Extrema/Extrema_ExtPElC.cxx +++ b/src/Extrema/Extrema_ExtPElC.cxx @@ -444,7 +444,7 @@ Standard_Boolean Extrema_ExtPElC::IsMin (const Standard_Integer N) const } //============================================================================= -Extrema_POnCurv Extrema_ExtPElC::Point (const Standard_Integer N) const +const Extrema_POnCurv& Extrema_ExtPElC::Point (const Standard_Integer N) const { if ((N < 1) || (N > NbExt())) { Standard_OutOfRange::Raise(); } return myPoint[N-1]; diff --git a/src/Extrema/Extrema_ExtPElC2d.cdl b/src/Extrema/Extrema_ExtPElC2d.cdl index 06cf926dce..40083548ac 100755 --- a/src/Extrema/Extrema_ExtPElC2d.cdl +++ b/src/Extrema/Extrema_ExtPElC2d.cdl @@ -142,6 +142,7 @@ is is static; Point (me; N: Integer) returns POnCurv2d + ---C++: return const & ---Purpose: Returns the point of the Nth extremum distance. raises NotDone from StdFail, -- if IsDone(me)=False. diff --git a/src/Extrema/Extrema_ExtPElC2d.cxx b/src/Extrema/Extrema_ExtPElC2d.cxx index bf9a8e6d3c..96dfd41393 100755 --- a/src/Extrema/Extrema_ExtPElC2d.cxx +++ b/src/Extrema/Extrema_ExtPElC2d.cxx @@ -328,7 +328,7 @@ Standard_Boolean Extrema_ExtPElC2d::IsMin (const Standard_Integer N) const } //============================================================================= -Extrema_POnCurv2d Extrema_ExtPElC2d::Point (const Standard_Integer N) const +const Extrema_POnCurv2d& Extrema_ExtPElC2d::Point (const Standard_Integer N) const { if ((N < 1) || (N > NbExt())) { Standard_OutOfRange::Raise(); } return myPoint[N-1]; diff --git a/src/Extrema/Extrema_ExtPElS.cdl b/src/Extrema/Extrema_ExtPElS.cdl index e5bc527b07..19a36a1088 100755 --- a/src/Extrema/Extrema_ExtPElS.cdl +++ b/src/Extrema/Extrema_ExtPElS.cdl @@ -101,6 +101,7 @@ is is static; Point (me; N: Integer) returns POnSurf + ---C++: return const & ---Purpose: Returns the point of the Nth resulting distance. raises NotDone from StdFail, -- if IsDone(me)=False. diff --git a/src/Extrema/Extrema_ExtPElS.cxx b/src/Extrema/Extrema_ExtPElS.cxx index 63586dd6d1..16d8313e88 100755 --- a/src/Extrema/Extrema_ExtPElS.cxx +++ b/src/Extrema/Extrema_ExtPElS.cxx @@ -408,7 +408,7 @@ Standard_Real Extrema_ExtPElS::SquareDistance (const Standard_Integer N) const } //============================================================================= -Extrema_POnSurf Extrema_ExtPElS::Point (const Standard_Integer N) const +const Extrema_POnSurf& Extrema_ExtPElS::Point (const Standard_Integer N) const { if (!IsDone()) { StdFail_NotDone::Raise(); } if ((N < 1) || (N > myNbExt)) { Standard_OutOfRange::Raise(); } diff --git a/src/Extrema/Extrema_ExtPExtS.cdl b/src/Extrema/Extrema_ExtPExtS.cdl index 2e8bc89cef..06f087bc11 100755 --- a/src/Extrema/Extrema_ExtPExtS.cdl +++ b/src/Extrema/Extrema_ExtPExtS.cdl @@ -88,6 +88,7 @@ is is static; Point (me; N: Integer) returns POnSurf + ---C++: return const & ---Purpose: Returns the point of the Nth resulting distance. raises NotDone from StdFail, -- if IsDone(me)=False. diff --git a/src/Extrema/Extrema_ExtPExtS.cxx b/src/Extrema/Extrema_ExtPExtS.cxx index 76c4e42daa..77184e4816 100755 --- a/src/Extrema/Extrema_ExtPExtS.cxx +++ b/src/Extrema/Extrema_ExtPExtS.cxx @@ -416,7 +416,7 @@ Standard_Real Extrema_ExtPExtS::SquareDistance (const Standard_Integer N) const } //============================================================================= -Extrema_POnSurf Extrema_ExtPExtS::Point (const Standard_Integer N) const +const Extrema_POnSurf& Extrema_ExtPExtS::Point (const Standard_Integer N) const { if (!IsDone()) { StdFail_NotDone::Raise(); } if ((N < 1) || (N > myNbExt)) { Standard_OutOfRange::Raise(); } diff --git a/src/Extrema/Extrema_ExtPRevS.cdl b/src/Extrema/Extrema_ExtPRevS.cdl index 1f4bedad8b..a1782b3e8c 100755 --- a/src/Extrema/Extrema_ExtPRevS.cdl +++ b/src/Extrema/Extrema_ExtPRevS.cdl @@ -85,6 +85,7 @@ is is static; Point (me; N: Integer) returns POnSurf + ---C++: return const & ---Purpose: Returns the point of the Nth resulting distance. raises NotDone from StdFail, -- if IsDone(me)=False. diff --git a/src/Extrema/Extrema_ExtPRevS.cxx b/src/Extrema/Extrema_ExtPRevS.cxx index 203726c333..443396cd6e 100755 --- a/src/Extrema/Extrema_ExtPRevS.cxx +++ b/src/Extrema/Extrema_ExtPRevS.cxx @@ -528,7 +528,7 @@ Standard_Real Extrema_ExtPRevS::SquareDistance(const Standard_Integer N) const //purpose : //======================================================================= -Extrema_POnSurf Extrema_ExtPRevS::Point(const Standard_Integer N) const +const Extrema_POnSurf& Extrema_ExtPRevS::Point(const Standard_Integer N) const { if (!IsDone()) { StdFail_NotDone::Raise(); } if ((N < 1) || (N > myNbExt)) { Standard_OutOfRange::Raise(); } diff --git a/src/Extrema/Extrema_ExtPS.cdl b/src/Extrema/Extrema_ExtPS.cdl index 866e68d9d9..361f79c3d1 100755 --- a/src/Extrema/Extrema_ExtPS.cdl +++ b/src/Extrema/Extrema_ExtPS.cdl @@ -116,6 +116,7 @@ is is static; Point (me; N: Integer) returns POnSurf + ---C++: return const & ---Purpose: Returns the point of the Nth resulting distance. raises NotDone from StdFail, -- if IsDone(me)=False. diff --git a/src/Extrema/Extrema_ExtPS.cxx b/src/Extrema/Extrema_ExtPS.cxx index cfcf009a5b..61ab55ac93 100755 --- a/src/Extrema/Extrema_ExtPS.cxx +++ b/src/Extrema/Extrema_ExtPS.cxx @@ -332,7 +332,7 @@ Standard_Integer Extrema_ExtPS::NbExt() const -Extrema_POnSurf Extrema_ExtPS::Point(const Standard_Integer N) const +const Extrema_POnSurf& Extrema_ExtPS::Point(const Standard_Integer N) const { if(!myDone) StdFail_NotDone::Raise(); return myPoints.Value(N); diff --git a/src/Extrema/Extrema_ExtPSOfRev.cdl b/src/Extrema/Extrema_ExtPSOfRev.cdl index 6b05f96bb3..5548632f0e 100755 --- a/src/Extrema/Extrema_ExtPSOfRev.cdl +++ b/src/Extrema/Extrema_ExtPSOfRev.cdl @@ -66,6 +66,7 @@ is is static; Point (me; N: Integer) returns POnSurf + ---C++: return const & ---Purpose: Returns the point of the Nth resulting distance. raises NotDone from StdFail, -- if IsDone(me)=False. diff --git a/src/Extrema/Extrema_ExtPSOfRev.gxx b/src/Extrema/Extrema_ExtPSOfRev.gxx index b2ca56185e..01cc292b64 100755 --- a/src/Extrema/Extrema_ExtPSOfRev.gxx +++ b/src/Extrema/Extrema_ExtPSOfRev.gxx @@ -102,7 +102,7 @@ Standard_Real Extrema_ExtPSOfRev::SquareDistance (const Standard_Integer N) cons } //============================================================================= -Extrema_POnSurf Extrema_ExtPSOfRev::Point (const Standard_Integer N) const +const Extrema_POnSurf& Extrema_ExtPSOfRev::Point (const Standard_Integer N) const { if (!IsDone()) { StdFail_NotDone::Raise(); } return myPoint.Value(N); diff --git a/src/Extrema/Extrema_FuncExtPC.cdl b/src/Extrema/Extrema_FuncExtPC.cdl index 6a7f9be3d2..f73b0776d3 100755 --- a/src/Extrema/Extrema_FuncExtPC.cdl +++ b/src/Extrema/Extrema_FuncExtPC.cdl @@ -89,6 +89,7 @@ is -- if N < 1 or N > NbExt(me). Point (me; N: Integer) returns POnC + ---C++: return const & ---Purpose: Returns the Nth extremum. raises OutOfRange from Standard, TypeMismatch from Standard; diff --git a/src/Extrema/Extrema_FuncExtPC.gxx b/src/Extrema/Extrema_FuncExtPC.gxx index 1f9753985c..b10ba260ee 100755 --- a/src/Extrema/Extrema_FuncExtPC.gxx +++ b/src/Extrema/Extrema_FuncExtPC.gxx @@ -411,7 +411,7 @@ Standard_Boolean Extrema_FuncExtPC::IsMin (const Standard_Integer N) const return (myIsMin.Value(N) == 1); } //============================================================================= -POnC Extrema_FuncExtPC::Point (const Standard_Integer N) const +const POnC & Extrema_FuncExtPC::Point (const Standard_Integer N) const { if (!myPinit || !myCinit) Standard_TypeMismatch::Raise(); return myPoint.Value(N); diff --git a/src/Extrema/Extrema_FuncExtPS.cdl b/src/Extrema/Extrema_FuncExtPS.cdl index 1303a74cec..d3e803bc4d 100755 --- a/src/Extrema/Extrema_FuncExtPS.cdl +++ b/src/Extrema/Extrema_FuncExtPS.cdl @@ -105,6 +105,7 @@ is -- if N < 1 or N > NbExt(me). Point (me; N: Integer) returns POnSurf + ---C++: return const & ---Purpose: Returns the Nth extremum. raises OutOfRange; -- if N < 1 or N > NbExt(me). diff --git a/src/Extrema/Extrema_FuncExtPS.cxx b/src/Extrema/Extrema_FuncExtPS.cxx index f80d35e8d8..01524031c2 100755 --- a/src/Extrema/Extrema_FuncExtPS.cxx +++ b/src/Extrema/Extrema_FuncExtPS.cxx @@ -160,7 +160,7 @@ Standard_Real Extrema_FuncExtPS::SquareDistance (const Standard_Integer N) const } //============================================================================= -Extrema_POnSurf Extrema_FuncExtPS::Point (const Standard_Integer N) const +const Extrema_POnSurf& Extrema_FuncExtPS::Point (const Standard_Integer N) const { if (!myPinit || !mySinit) Standard_TypeMismatch::Raise(); return myPoint.Value(N); diff --git a/src/Extrema/Extrema_FuncExtSS.cdl b/src/Extrema/Extrema_FuncExtSS.cdl index 948567ee4a..9bf7db2379 100755 --- a/src/Extrema/Extrema_FuncExtSS.cdl +++ b/src/Extrema/Extrema_FuncExtSS.cdl @@ -78,11 +78,13 @@ is -- if N < 1 or N > NbExt(me). PointOnS1 (me; N: Integer) returns POnSurf + ---C++: return const & ---Purpose: Return the Nth extremum on S1. raises OutOfRange; -- if N < 1 or N > NbExt(me). PointOnS2 (me; N: Integer) returns POnSurf + ---C++: return const & ---Purpose: Renvoie le Nieme extremum sur S2. raises OutOfRange; -- si N < 1 ou N > NbExt(me). diff --git a/src/Extrema/Extrema_FuncExtSS.cxx b/src/Extrema/Extrema_FuncExtSS.cxx index 75874346e7..6da12fc7c1 100755 --- a/src/Extrema/Extrema_FuncExtSS.cxx +++ b/src/Extrema/Extrema_FuncExtSS.cxx @@ -257,7 +257,7 @@ Standard_Real Extrema_FuncExtSS::SquareDistance (const Standard_Integer N) const //purpose : //======================================================================= -Extrema_POnSurf Extrema_FuncExtSS::PointOnS1 (const Standard_Integer N) const +const Extrema_POnSurf& Extrema_FuncExtSS::PointOnS1 (const Standard_Integer N) const { if (!myS1init || !myS2init) Standard_TypeMismatch::Raise(); return myPoint1.Value(N); @@ -267,7 +267,7 @@ Extrema_POnSurf Extrema_FuncExtSS::PointOnS1 (const Standard_Integer N) const //purpose : //======================================================================= -Extrema_POnSurf Extrema_FuncExtSS::PointOnS2 (const Standard_Integer N) const +const Extrema_POnSurf& Extrema_FuncExtSS::PointOnS2 (const Standard_Integer N) const { if (!myS1init || !myS2init) Standard_TypeMismatch::Raise(); return myPoint2.Value(N); diff --git a/src/Extrema/Extrema_GExtPC.cdl b/src/Extrema/Extrema_GExtPC.cdl index 98e45380c8..a397868679 100755 --- a/src/Extrema/Extrema_GExtPC.cdl +++ b/src/Extrema/Extrema_GExtPC.cdl @@ -118,6 +118,7 @@ is is static; Point(me; N: Integer from Standard) returns ThePOnC + ---C++: return const & ---Purpose: Returns the point of the th extremum distance. raises NotDone from StdFail, OutOfRange from Standard diff --git a/src/Extrema/Extrema_GExtPC.gxx b/src/Extrema/Extrema_GExtPC.gxx index e27e64382c..6250bcf10d 100755 --- a/src/Extrema/Extrema_GExtPC.gxx +++ b/src/Extrema/Extrema_GExtPC.gxx @@ -337,7 +337,7 @@ Standard_Boolean Extrema_GExtPC::IsMin(const Standard_Integer N) const //purpose : //======================================================================= -ThePOnC Extrema_GExtPC::Point(const Standard_Integer N) const +const ThePOnC & Extrema_GExtPC::Point(const Standard_Integer N) const { if(!mydone) StdFail_NotDone::Raise(); if ((N < 1) || (N > mySqDist.Length())) Standard_OutOfRange::Raise(); diff --git a/src/Extrema/Extrema_GLocateExtPC.cdl b/src/Extrema/Extrema_GLocateExtPC.cdl index 6eb07f6bbd..35bf17fc97 100755 --- a/src/Extrema/Extrema_GLocateExtPC.cdl +++ b/src/Extrema/Extrema_GLocateExtPC.cdl @@ -119,6 +119,7 @@ is is static; Point (me) returns ThePOnC + ---C++: return const & ---Purpose: Returns the point of the extremum distance. raises NotDone from StdFail -- if IsDone(me)=False. diff --git a/src/Extrema/Extrema_GLocateExtPC.gxx b/src/Extrema/Extrema_GLocateExtPC.gxx index 21c0055262..35e0d596c1 100755 --- a/src/Extrema/Extrema_GLocateExtPC.gxx +++ b/src/Extrema/Extrema_GLocateExtPC.gxx @@ -330,20 +330,14 @@ Standard_Boolean Extrema_GLocateExtPC::IsMin () const //purpose : //======================================================================= -ThePOnC Extrema_GLocateExtPC::Point () const +const ThePOnC & Extrema_GLocateExtPC::Point () const { if (!myDone) { StdFail_NotDone::Raise(); } - ThePOnC P; if (type == GeomAbs_BezierCurve) { - P = myLocExtPC.Point(); + return myLocExtPC.Point(); } else if(type == GeomAbs_BSplineCurve || type == GeomAbs_OtherCurve) { - P = mypp; + return mypp; } - else { - if (numberext != 0) { - P = myExtremPC.Point(numberext); - } - } - return P; + return myExtremPC.Point(numberext); } diff --git a/src/Extrema/Extrema_GenExtPC.cdl b/src/Extrema/Extrema_GenExtPC.cdl index 35a5863016..cf832357b1 100755 --- a/src/Extrema/Extrema_GenExtPC.cdl +++ b/src/Extrema/Extrema_GenExtPC.cdl @@ -133,6 +133,7 @@ is Point (me; N: Integer) returns POnC + ---C++: return const & ---Purpose: Returns the point of the Nth extremum distance. raises TypeMismatch from Standard, NotDone from StdFail, diff --git a/src/Extrema/Extrema_GenExtPC.gxx b/src/Extrema/Extrema_GenExtPC.gxx index 2d5a3b929b..7227024a46 100755 --- a/src/Extrema/Extrema_GenExtPC.gxx +++ b/src/Extrema/Extrema_GenExtPC.gxx @@ -235,7 +235,7 @@ Standard_Boolean Extrema_GenExtPC::IsMin (const Standard_Integer N) const { //purpose : //======================================================================= -POnC Extrema_GenExtPC::Point (const Standard_Integer N) const +const POnC & Extrema_GenExtPC::Point (const Standard_Integer N) const { if (!IsDone()) { StdFail_NotDone::Raise(); } return myF.Point(N); diff --git a/src/Extrema/Extrema_GenExtPS.cdl b/src/Extrema/Extrema_GenExtPS.cdl index e5eaf180ef..86c4477cd6 100755 --- a/src/Extrema/Extrema_GenExtPS.cdl +++ b/src/Extrema/Extrema_GenExtPS.cdl @@ -126,6 +126,7 @@ is is static; Point (me; N: Integer) returns POnSurf + ---C++: return const & ---Purpose: Returns the point of the Nth resulting distance. raises NotDone from StdFail, -- if IsDone(me)=False. diff --git a/src/Extrema/Extrema_GenExtPS.cxx b/src/Extrema/Extrema_GenExtPS.cxx index 82982b6d49..37181864d3 100755 --- a/src/Extrema/Extrema_GenExtPS.cxx +++ b/src/Extrema/Extrema_GenExtPS.cxx @@ -953,7 +953,7 @@ Standard_Real Extrema_GenExtPS::SquareDistance (const Standard_Integer N) const } //============================================================================= -Extrema_POnSurf Extrema_GenExtPS::Point (const Standard_Integer N) const +const Extrema_POnSurf& Extrema_GenExtPS::Point (const Standard_Integer N) const { if (!IsDone()) { StdFail_NotDone::Raise(); } return myF.Point(N); diff --git a/src/Extrema/Extrema_GenExtSS.cdl b/src/Extrema/Extrema_GenExtSS.cdl index 28835155e6..22c5e5825e 100755 --- a/src/Extrema/Extrema_GenExtSS.cdl +++ b/src/Extrema/Extrema_GenExtSS.cdl @@ -111,6 +111,7 @@ is is static; PointOnS1 (me; N: Integer) returns POnSurf + ---C++: return const & ---Purpose: Returns the point of the Nth resulting distance. raises NotDone from StdFail, -- if IsDone(me)=False. @@ -119,6 +120,7 @@ is is static; PointOnS2 (me; N: Integer) returns POnSurf + ---C++: return const & ---Purpose: Returns the point of the Nth resulting distance. raises NotDone from StdFail, -- if IsDone(me)=False. diff --git a/src/Extrema/Extrema_GenExtSS.cxx b/src/Extrema/Extrema_GenExtSS.cxx index e0e29c9681..876d7d9ae0 100755 --- a/src/Extrema/Extrema_GenExtSS.cxx +++ b/src/Extrema/Extrema_GenExtSS.cxx @@ -321,7 +321,7 @@ Standard_Real Extrema_GenExtSS::SquareDistance(const Standard_Integer N) const //purpose : //======================================================================= -Extrema_POnSurf Extrema_GenExtSS::PointOnS1(const Standard_Integer N) const +const Extrema_POnSurf& Extrema_GenExtSS::PointOnS1(const Standard_Integer N) const { if (!IsDone()) { StdFail_NotDone::Raise(); } return myF.PointOnS1(N); @@ -332,7 +332,7 @@ Extrema_POnSurf Extrema_GenExtSS::PointOnS1(const Standard_Integer N) const //purpose : //======================================================================= -Extrema_POnSurf Extrema_GenExtSS::PointOnS2(const Standard_Integer N) const +const Extrema_POnSurf& Extrema_GenExtSS::PointOnS2(const Standard_Integer N) const { if (!IsDone()) { StdFail_NotDone::Raise(); } return myF.PointOnS2(N); diff --git a/src/Extrema/Extrema_GenLocateExtPC.cdl b/src/Extrema/Extrema_GenLocateExtPC.cdl index 82107cfff4..252fbd9df3 100755 --- a/src/Extrema/Extrema_GenLocateExtPC.cdl +++ b/src/Extrema/Extrema_GenLocateExtPC.cdl @@ -102,6 +102,7 @@ is is static; Point (me) returns POnC + ---C++: return const & ---Purpose: Returns the point of the extremum distance. raises NotDone from StdFail -- if IsDone(me)=False. diff --git a/src/Extrema/Extrema_GenLocateExtPC.gxx b/src/Extrema/Extrema_GenLocateExtPC.gxx index b245e32ef5..5e2953313f 100755 --- a/src/Extrema/Extrema_GenLocateExtPC.gxx +++ b/src/Extrema/Extrema_GenLocateExtPC.gxx @@ -167,7 +167,7 @@ Standard_Boolean Extrema_GenLocateExtPC::IsMin () const //purpose : //======================================================================= -POnC Extrema_GenLocateExtPC::Point () const +const POnC & Extrema_GenLocateExtPC::Point () const { if (!myDone) { StdFail_NotDone::Raise(); } return myF.Point(1); diff --git a/src/Extrema/Extrema_GenLocateExtPS.cdl b/src/Extrema/Extrema_GenLocateExtPS.cdl index 172ad500d5..5409f27148 100755 --- a/src/Extrema/Extrema_GenLocateExtPS.cdl +++ b/src/Extrema/Extrema_GenLocateExtPS.cdl @@ -60,6 +60,7 @@ is is static; Point (me) returns POnSurf + ---C++: return const & ---Purpose: Returns the point of the extremum distance. raises NotDone from StdFail -- if IsDone(me)=False. diff --git a/src/Extrema/Extrema_GenLocateExtPS.cxx b/src/Extrema/Extrema_GenLocateExtPS.cxx index c47c38c21e..41e7900881 100755 --- a/src/Extrema/Extrema_GenLocateExtPS.cxx +++ b/src/Extrema/Extrema_GenLocateExtPS.cxx @@ -101,7 +101,7 @@ Standard_Real Extrema_GenLocateExtPS::SquareDistance () const } //============================================================================= -Extrema_POnSurf Extrema_GenLocateExtPS::Point () const +const Extrema_POnSurf& Extrema_GenLocateExtPS::Point () const { if (!IsDone()) { StdFail_NotDone::Raise(); } return myPoint;