Coding - Method guard iterative update (#674)

- Standardizes comment formatting by replacing detailed comment blocks with a uniform "//=================================================================================================" separator
- Removes redundant "function:" and "purpose:" fields that often contained minimal or no useful information
- Maintains code functionality while improving visual consistency across the codebase
This commit is contained in:
Pasukhin Dmitry
2025-08-15 17:14:53 +01:00
committed by GitHub
parent 02f6fa7be2
commit ae4de70f98
365 changed files with 3229 additions and 9377 deletions
@@ -184,10 +184,8 @@ static void DUMP(const AppParCurves_MultiBSpCurve& C)
//=======================================================================
//function : FirstTangencyVector
//purpose :
//=======================================================================
//=================================================================================================
void Approx_BSplComputeLine::FirstTangencyVector(const MultiLine& Line,
const Standard_Integer index,
math_Vector& V)
@@ -265,10 +263,8 @@ void Approx_BSplComputeLine::FirstTangencyVector(const MultiLine& Line,
}
//=======================================================================
//function : LastTangencyVector
//purpose :
//=======================================================================
//=================================================================================================
void Approx_BSplComputeLine::LastTangencyVector(const MultiLine& Line,
const Standard_Integer index,
math_Vector& V)
@@ -347,10 +343,8 @@ void Approx_BSplComputeLine::LastTangencyVector(const MultiLine& Line,
//=======================================================================
//function : SearchFirstLambda
//purpose :
//=======================================================================
//=================================================================================================
Standard_Real Approx_BSplComputeLine::
SearchFirstLambda(const MultiLine& Line,
const math_Vector& aPar,
@@ -407,10 +401,8 @@ SearchFirstLambda(const MultiLine& Line,
}
//=======================================================================
//function : SearchLastLambda
//purpose :
//=======================================================================
//=================================================================================================
Standard_Real Approx_BSplComputeLine::
SearchLastLambda(const MultiLine& Line,
const math_Vector& aPar,
@@ -468,10 +460,8 @@ SearchLastLambda(const MultiLine& Line,
//=======================================================================
//function : Approx_BSplComputeLine
//purpose :
//=======================================================================
//=================================================================================================
Approx_BSplComputeLine::Approx_BSplComputeLine
(const MultiLine& Line,
const math_Vector& Parameters,
@@ -510,10 +500,8 @@ Approx_BSplComputeLine::Approx_BSplComputeLine
}
//=======================================================================
//function : Approx_BSplComputeLine
//purpose :
//=======================================================================
//=================================================================================================
Approx_BSplComputeLine::Approx_BSplComputeLine
(const math_Vector& Parameters,
const Standard_Integer degreemin,
@@ -549,10 +537,8 @@ Approx_BSplComputeLine::Approx_BSplComputeLine
tolreached = Standard_False;
}
//=======================================================================
//function : Approx_BSplComputeLine
//purpose :
//=======================================================================
//=================================================================================================
Approx_BSplComputeLine::Approx_BSplComputeLine
(const Standard_Integer degreemin,
const Standard_Integer degreemax,
@@ -584,10 +570,8 @@ Approx_BSplComputeLine::Approx_BSplComputeLine
}
//=======================================================================
//function : Approx_BSplComputeLine
//purpose :
//=======================================================================
//=================================================================================================
Approx_BSplComputeLine::Approx_BSplComputeLine
(const MultiLine& Line,
const Standard_Integer degreemin,
@@ -622,10 +606,8 @@ Approx_BSplComputeLine::Approx_BSplComputeLine
//=======================================================================
//function : Perform
//purpose :
//=======================================================================
//=================================================================================================
void Approx_BSplComputeLine::Perform(const MultiLine& Line)
{
@@ -764,10 +746,8 @@ void Approx_BSplComputeLine::Perform(const MultiLine& Line)
//=======================================================================
//function : Parameters
//purpose :
//=======================================================================
//=================================================================================================
const TColStd_Array1OfReal& Approx_BSplComputeLine::Parameters() const
{
return myParameters->Array1();
@@ -775,28 +755,22 @@ const TColStd_Array1OfReal& Approx_BSplComputeLine::Parameters() const
//=======================================================================
//function : Value
//purpose :
//=======================================================================
//=================================================================================================
const AppParCurves_MultiBSpCurve& Approx_BSplComputeLine::Value() const
{
return TheMultiBSpCurve;
}
//=======================================================================
//function : ChangeValue
//purpose :
//=======================================================================
//=================================================================================================
AppParCurves_MultiBSpCurve& Approx_BSplComputeLine::ChangeValue()
{
return TheMultiBSpCurve;
}
//=======================================================================
//function : Parameters
//purpose :
//=======================================================================
//=================================================================================================
void Approx_BSplComputeLine::Parameters(const MultiLine& Line,
const Standard_Integer firstP,
@@ -874,10 +848,8 @@ void Approx_BSplComputeLine::Parameters(const MultiLine& Line,
}
//=======================================================================
//function : Compute
//purpose :
//=======================================================================
//=================================================================================================
Standard_Boolean Approx_BSplComputeLine::Compute(const MultiLine& Line,
const Standard_Integer fpt,
const Standard_Integer lpt,
@@ -1023,10 +995,8 @@ Standard_Boolean Approx_BSplComputeLine::Compute(const MultiLine& Line,
//=======================================================================
//function : SetParameters
//purpose :
//=======================================================================
//=================================================================================================
void Approx_BSplComputeLine::SetParameters(const math_Vector& ThePar)
{
myfirstParam = new TColStd_HArray1OfReal(ThePar.Lower(),
@@ -1037,10 +1007,8 @@ void Approx_BSplComputeLine::SetParameters(const math_Vector& ThePar)
}
//=======================================================================
//function : SetKnots
//purpose :
//=======================================================================
//=================================================================================================
void Approx_BSplComputeLine::SetKnots(const TColStd_Array1OfReal& Knots)
{
myhasknots = Standard_True;
@@ -1051,10 +1019,8 @@ void Approx_BSplComputeLine::SetKnots(const TColStd_Array1OfReal& Knots)
}
//=======================================================================
//function : SetKnotsAndMultiplicities
//purpose :
//=======================================================================
//=================================================================================================
void Approx_BSplComputeLine::SetKnotsAndMultiplicities
(const TColStd_Array1OfReal& Knots,
const TColStd_Array1OfInteger& Mults)
@@ -1072,10 +1038,8 @@ void Approx_BSplComputeLine::SetKnotsAndMultiplicities
}
}
//=======================================================================
//function : Init
//purpose :
//=======================================================================
//=================================================================================================
void Approx_BSplComputeLine::Init(const Standard_Integer degreemin,
const Standard_Integer degreemax,
const Standard_Real Tolerance3d,
@@ -1097,10 +1061,8 @@ void Approx_BSplComputeLine::Init(const Standard_Integer degreemin,
//=======================================================================
//function : SetDegrees
//purpose :
//=======================================================================
//=================================================================================================
void Approx_BSplComputeLine::SetDegrees(const Standard_Integer degreemin,
const Standard_Integer degreemax)
{
@@ -1109,10 +1071,8 @@ void Approx_BSplComputeLine::SetDegrees(const Standard_Integer degreemin,
}
//=======================================================================
//function : SetTolerances
//purpose :
//=======================================================================
//=================================================================================================
void Approx_BSplComputeLine::SetTolerances(const Standard_Real Tolerance3d,
const Standard_Real Tolerance2d)
{
@@ -1121,10 +1081,8 @@ void Approx_BSplComputeLine::SetTolerances(const Standard_Real Tolerance3d,
}
//=======================================================================
//function : SetConstraints
//purpose :
//=======================================================================
//=================================================================================================
void Approx_BSplComputeLine::SetConstraints(const AppParCurves_Constraint FirstC,
const AppParCurves_Constraint LastC)
{
@@ -1132,38 +1090,30 @@ void Approx_BSplComputeLine::SetConstraints(const AppParCurves_Constraint FirstC
mylastC = LastC;
}
//=======================================================================
//function : SetPeriodic
//purpose :
//=======================================================================
//=================================================================================================
void Approx_BSplComputeLine::SetPeriodic(const Standard_Boolean thePeriodic)
{
myPeriodic = thePeriodic;
}
//=======================================================================
//function : IsAllApproximated
//purpose :
//=======================================================================
//=================================================================================================
Standard_Boolean Approx_BSplComputeLine::IsAllApproximated() const
{
return alldone;
}
//=======================================================================
//function : IsToleranceReached
//purpose :
//=======================================================================
//=================================================================================================
Standard_Boolean Approx_BSplComputeLine::IsToleranceReached() const
{
return tolreached;
}
//=======================================================================
//function : Error
//purpose :
//=======================================================================
//=================================================================================================
void Approx_BSplComputeLine::Error(Standard_Real& tol3d,
Standard_Real& tol2d) const
{
@@ -1173,10 +1123,8 @@ void Approx_BSplComputeLine::Error(Standard_Real& tol3d,
//=======================================================================
//function : SetContinuity
//purpose :
//=======================================================================
//=================================================================================================
void Approx_BSplComputeLine::SetContinuity(const Standard_Integer C)
{
mycont = C;
@@ -1184,10 +1132,8 @@ void Approx_BSplComputeLine::SetContinuity(const Standard_Integer C)
//=======================================================================
//function : FindRealConstraints
//purpose :
//=======================================================================
//=================================================================================================
void Approx_BSplComputeLine::FindRealConstraints(const MultiLine& Line)
{
realfirstC = myfirstC;
@@ -1259,10 +1205,8 @@ void Approx_BSplComputeLine::FindRealConstraints(const MultiLine& Line)
//=======================================================================
//function : Interpol
//purpose :
//=======================================================================
//=================================================================================================
void Approx_BSplComputeLine::Interpol(const MultiLine& Line)
{
Standard_Integer i, Thefirstpt, Thelastpt, deg = 3;
@@ -1400,10 +1344,8 @@ void Approx_BSplComputeLine::Interpol(const MultiLine& Line)
}
//=======================================================================
//function : TangencyVector
//purpose :
//=======================================================================
//=================================================================================================
void Approx_BSplComputeLine::TangencyVector(
const MultiLine& Line,
const AppParCurves_MultiCurve& C,
@@ -441,19 +441,15 @@ void Approx_ComputeCLine::SetMaxSegments(const Standard_Integer theMaxSegments)
myMaxSegments = theMaxSegments;
}
//=======================================================================
//function : SetInvOrder
//purpose :
//=======================================================================
//=================================================================================================
void Approx_ComputeCLine::SetInvOrder(const Standard_Boolean theInvOrder)
{
myInvOrder = theInvOrder;
}
//=======================================================================
//function : SetHangChecking
//purpose :
//=======================================================================
//=================================================================================================
void Approx_ComputeCLine::SetHangChecking(const Standard_Boolean theHangChecking)
{
myHangChecking = theHangChecking;
@@ -14,20 +14,14 @@
#include <StdFail_NotDone.hxx>
//=======================================================================
// function : IsDone
// purpose :
//=======================================================================
//=================================================================================================
inline Standard_Boolean CPnts_AbscissaPoint::IsDone() const
{
return myDone;
}
//=======================================================================
// function : Parameter
// purpose :
//=======================================================================
//=================================================================================================
inline Standard_Real CPnts_AbscissaPoint::Parameter() const
{
@@ -35,10 +29,7 @@ inline Standard_Real CPnts_AbscissaPoint::Parameter() const
return myParam;
}
//=======================================================================
// function : SetParameter
// purpose :
//=======================================================================
//=================================================================================================
inline void CPnts_AbscissaPoint::SetParameter(const Standard_Real P)
{
@@ -15,20 +15,14 @@
#include <StdFail_NotDone.hxx>
#include <Standard_OutOfRange.hxx>
//=======================================================================
// function : IsAllDone
// purpose :
//=======================================================================
//=================================================================================================
inline Standard_Boolean CPnts_UniformDeflection::IsAllDone() const
{
return myDone;
}
//=======================================================================
// function : Next
// purpose :
//=======================================================================
//=================================================================================================
inline void CPnts_UniformDeflection::Next()
{
@@ -37,10 +31,7 @@ inline void CPnts_UniformDeflection::Next()
myIPoint++;
}
//=======================================================================
// function : Value
// purpose :
//=======================================================================
//=================================================================================================
inline Standard_Real CPnts_UniformDeflection::Value() const
{
@@ -48,10 +39,7 @@ inline Standard_Real CPnts_UniformDeflection::Value() const
return myParams[myIPoint + 1];
}
//=======================================================================
// function : Point
// purpose :
//=======================================================================
//=================================================================================================
inline gp_Pnt CPnts_UniformDeflection::Point() const
{
@@ -23,40 +23,28 @@
#include <Geom2d_BSplineCurve.hxx>
#include <Adaptor2d_Curve2d.hxx>
//=======================================================================
// function : FirstParameter
// purpose :
//=======================================================================
//=================================================================================================
inline Standard_Real Extrema_Curve2dTool::FirstParameter(const Adaptor2d_Curve2d& C)
{
return C.FirstParameter();
}
//=======================================================================
// function : LastParameter
// purpose :
//=======================================================================
//=================================================================================================
inline Standard_Real Extrema_Curve2dTool::LastParameter(const Adaptor2d_Curve2d& C)
{
return C.LastParameter();
}
//=======================================================================
// function : Continuity
// purpose :
//=======================================================================
//=================================================================================================
inline GeomAbs_Shape Extrema_Curve2dTool::Continuity(const Adaptor2d_Curve2d& C)
{
return C.Continuity();
}
//=======================================================================
// function : NbIntervals
// purpose :
//=======================================================================
//=================================================================================================
inline Standard_Integer Extrema_Curve2dTool::NbIntervals(const Adaptor2d_Curve2d& C,
const GeomAbs_Shape S)
@@ -64,10 +52,7 @@ inline Standard_Integer Extrema_Curve2dTool::NbIntervals(const Adaptor2d_Curve2d
return C.NbIntervals(S);
}
//=======================================================================
// function : Intervals
// purpose :
//=======================================================================
//=================================================================================================
inline void Extrema_Curve2dTool::Intervals(const Adaptor2d_Curve2d& C,
TColStd_Array1OfReal& T,
@@ -76,60 +61,42 @@ inline void Extrema_Curve2dTool::Intervals(const Adaptor2d_Curve2d& C,
C.Intervals(T, S);
}
//=======================================================================
// function : IsClosed
// purpose :
//=======================================================================
//=================================================================================================
inline Standard_Boolean Extrema_Curve2dTool::IsClosed(const Adaptor2d_Curve2d& C)
{
return C.IsClosed();
}
//=======================================================================
// function : IsPeriodic
// purpose :
//=======================================================================
//=================================================================================================
inline Standard_Boolean Extrema_Curve2dTool::IsPeriodic(const Adaptor2d_Curve2d& C)
{
return C.IsPeriodic();
}
//=======================================================================
// function : Period
// purpose :
//=======================================================================
//=================================================================================================
inline Standard_Real Extrema_Curve2dTool::Period(const Adaptor2d_Curve2d& C)
{
return C.Period();
}
//=======================================================================
// function : Value
// purpose :
//=======================================================================
//=================================================================================================
inline gp_Pnt2d Extrema_Curve2dTool::Value(const Adaptor2d_Curve2d& C, const Standard_Real U)
{
return C.Value(U);
}
//=======================================================================
// function : D0
// purpose :
//=======================================================================
//=================================================================================================
inline void Extrema_Curve2dTool::D0(const Adaptor2d_Curve2d& C, const Standard_Real U, gp_Pnt2d& P)
{
C.D0(U, P);
}
//=======================================================================
// function : D1
// purpose :
//=======================================================================
//=================================================================================================
inline void Extrema_Curve2dTool::D1(const Adaptor2d_Curve2d& C,
const Standard_Real U,
@@ -139,10 +106,7 @@ inline void Extrema_Curve2dTool::D1(const Adaptor2d_Curve2d& C,
C.D1(U, P, V);
}
//=======================================================================
// function : D2
// purpose :
//=======================================================================
//=================================================================================================
inline void Extrema_Curve2dTool::D2(const Adaptor2d_Curve2d& C,
const Standard_Real U,
@@ -153,10 +117,7 @@ inline void Extrema_Curve2dTool::D2(const Adaptor2d_Curve2d& C,
C.D2(U, P, V1, V2);
}
//=======================================================================
// function : D3
// purpose :
//=======================================================================
//=================================================================================================
inline void Extrema_Curve2dTool::D3(const Adaptor2d_Curve2d& C,
const Standard_Real U,
@@ -168,10 +129,7 @@ inline void Extrema_Curve2dTool::D3(const Adaptor2d_Curve2d& C,
C.D3(U, P, V1, V2, V3);
}
//=======================================================================
// function : DN
// purpose :
//=======================================================================
//=================================================================================================
inline gp_Vec2d Extrema_Curve2dTool::DN(const Adaptor2d_Curve2d& C,
const Standard_Real U,
@@ -180,10 +138,7 @@ inline gp_Vec2d Extrema_Curve2dTool::DN(const Adaptor2d_Curve2d& C,
return C.DN(U, N);
}
//=======================================================================
// function : Resolution
// purpose :
//=======================================================================
//=================================================================================================
inline Standard_Real Extrema_Curve2dTool::Resolution(const Adaptor2d_Curve2d& C,
const Standard_Real R3d)
@@ -191,120 +146,84 @@ inline Standard_Real Extrema_Curve2dTool::Resolution(const Adaptor2d_Curve2d& C,
return C.Resolution(R3d);
}
//=======================================================================
// function : GetType
// purpose :
//=======================================================================
//=================================================================================================
inline GeomAbs_CurveType Extrema_Curve2dTool::GetType(const Adaptor2d_Curve2d& C)
{
return C.GetType();
}
//=======================================================================
// function : Line
// purpose :
//=======================================================================
//=================================================================================================
inline gp_Lin2d Extrema_Curve2dTool::Line(const Adaptor2d_Curve2d& C)
{
return C.Line();
}
//=======================================================================
// function : Circle
// purpose :
//=======================================================================
//=================================================================================================
inline gp_Circ2d Extrema_Curve2dTool::Circle(const Adaptor2d_Curve2d& C)
{
return C.Circle();
}
//=======================================================================
// function : Ellipse
// purpose :
//=======================================================================
//=================================================================================================
inline gp_Elips2d Extrema_Curve2dTool::Ellipse(const Adaptor2d_Curve2d& C)
{
return C.Ellipse();
}
//=======================================================================
// function : Hyperbola
// purpose :
//=======================================================================
//=================================================================================================
inline gp_Hypr2d Extrema_Curve2dTool::Hyperbola(const Adaptor2d_Curve2d& C)
{
return C.Hyperbola();
}
//=======================================================================
// function : Parabola
// purpose :
//=======================================================================
//=================================================================================================
inline gp_Parab2d Extrema_Curve2dTool::Parabola(const Adaptor2d_Curve2d& C)
{
return C.Parabola();
}
//=======================================================================
// function : NbPoles
// purpose :
//=======================================================================
//=================================================================================================
inline Standard_Integer Extrema_Curve2dTool::NbPoles(const Adaptor2d_Curve2d& C)
{
return C.NbPoles();
}
//=======================================================================
// function : Degree
// purpose :
//=======================================================================
//=================================================================================================
inline Standard_Integer Extrema_Curve2dTool::Degree(const Adaptor2d_Curve2d& C)
{
return C.Degree();
}
//=======================================================================
// function : IsRational
// purpose :
//=======================================================================
//=================================================================================================
inline Standard_Boolean Extrema_Curve2dTool::IsRational(const Adaptor2d_Curve2d& C)
{
return C.Degree() != 0;
}
//=======================================================================
// function : NbKnots
// purpose :
//=======================================================================
//=================================================================================================
inline Standard_Integer Extrema_Curve2dTool::NbKnots(const Adaptor2d_Curve2d& C)
{
return C.NbKnots();
}
//=======================================================================
// function : Bezier
// purpose :
//=======================================================================
//=================================================================================================
inline Handle(Geom2d_BezierCurve) Extrema_Curve2dTool::Bezier(const Adaptor2d_Curve2d& C)
{
return C.Bezier();
}
//=======================================================================
// function : BSpline
// purpose :
//=======================================================================
//=================================================================================================
inline Handle(Geom2d_BSplineCurve) Extrema_Curve2dTool::BSpline(const Adaptor2d_Curve2d& C)
{
@@ -25,50 +25,35 @@
#include <Geom_BSplineCurve.hxx>
#include <Adaptor3d_Curve.hxx>
//=======================================================================
// function : FirstParameter
// purpose :
//=======================================================================
//=================================================================================================
inline Standard_Real Extrema_CurveTool::FirstParameter(const Adaptor3d_Curve& C)
{
return C.FirstParameter();
}
//=======================================================================
// function : LastParameter
// purpose :
//=======================================================================
//=================================================================================================
inline Standard_Real Extrema_CurveTool::LastParameter(const Adaptor3d_Curve& C)
{
return C.LastParameter();
}
//=======================================================================
// function : Value
// purpose :
//=======================================================================
//=================================================================================================
inline gp_Pnt Extrema_CurveTool::Value(const Adaptor3d_Curve& C, const Standard_Real U)
{
return C.Value(U);
}
//=======================================================================
// function : D0
// purpose :
//=======================================================================
//=================================================================================================
inline void Extrema_CurveTool::D0(const Adaptor3d_Curve& C, const Standard_Real U, gp_Pnt& P)
{
C.D0(U, P);
}
//=======================================================================
// function : D1
// purpose :
//=======================================================================
//=================================================================================================
inline void Extrema_CurveTool::D1(const Adaptor3d_Curve& C,
const Standard_Real U,
@@ -78,10 +63,7 @@ inline void Extrema_CurveTool::D1(const Adaptor3d_Curve& C,
C.D1(U, P, V);
}
//=======================================================================
// function : D2
// purpose :
//=======================================================================
//=================================================================================================
inline void Extrema_CurveTool::D2(const Adaptor3d_Curve& C,
const Standard_Real U,
@@ -92,10 +74,7 @@ inline void Extrema_CurveTool::D2(const Adaptor3d_Curve& C,
C.D2(U, P, V1, V2);
}
//=======================================================================
// function : D3
// purpose :
//=======================================================================
//=================================================================================================
inline void Extrema_CurveTool::D3(const Adaptor3d_Curve& C,
const Standard_Real U,
@@ -107,10 +86,8 @@ inline void Extrema_CurveTool::D3(const Adaptor3d_Curve& C,
C.D3(U, P, V1, V2, V3);
}
//=======================================================================
// function : DN
// purpose :
//=======================================================================
//=================================================================================================
inline gp_Vec Extrema_CurveTool::DN(const Adaptor3d_Curve& C,
const Standard_Real U,
const Standard_Integer N)
@@ -118,30 +95,21 @@ inline gp_Vec Extrema_CurveTool::DN(const Adaptor3d_Curve& C,
return C.DN(U, N);
}
//=======================================================================
// function : Continuity
// purpose :
//=======================================================================
//=================================================================================================
inline GeomAbs_Shape Extrema_CurveTool::Continuity(const Adaptor3d_Curve& C)
{
return C.Continuity();
}
//=======================================================================
// function : NbIntervals
// purpose :
//=======================================================================
//=================================================================================================
inline Standard_Integer Extrema_CurveTool::NbIntervals(Adaptor3d_Curve& C, const GeomAbs_Shape S)
{
return C.NbIntervals(S);
}
//=======================================================================
// function : Intervals
// purpose :
//=======================================================================
//=================================================================================================
inline void Extrema_CurveTool::Intervals(Adaptor3d_Curve& C,
TColStd_Array1OfReal& T,
@@ -150,140 +118,98 @@ inline void Extrema_CurveTool::Intervals(Adaptor3d_Curve& C,
C.Intervals(T, S);
}
//=======================================================================
// function : Period
// purpose :
//=======================================================================
//=================================================================================================
inline Standard_Real Extrema_CurveTool::Period(const Adaptor3d_Curve& C)
{
return C.Period();
}
//=======================================================================
// function : GetType
// purpose :
//=======================================================================
//=================================================================================================
inline GeomAbs_CurveType Extrema_CurveTool::GetType(const Adaptor3d_Curve& C)
{
return C.GetType();
}
//=======================================================================
// function : Line
// purpose :
//=======================================================================
//=================================================================================================
inline gp_Lin Extrema_CurveTool::Line(const Adaptor3d_Curve& C)
{
return C.Line();
}
//=======================================================================
// function : Circle
// purpose :
//=======================================================================
//=================================================================================================
inline gp_Circ Extrema_CurveTool::Circle(const Adaptor3d_Curve& C)
{
return C.Circle();
}
//=======================================================================
// function : Ellipse
// purpose :
//=======================================================================
//=================================================================================================
inline gp_Elips Extrema_CurveTool::Ellipse(const Adaptor3d_Curve& C)
{
return C.Ellipse();
}
//=======================================================================
// function : Hyperbola
// purpose :
//=======================================================================
//=================================================================================================
inline gp_Hypr Extrema_CurveTool::Hyperbola(const Adaptor3d_Curve& C)
{
return C.Hyperbola();
}
//=======================================================================
// function : Parabola
// purpose :
//=======================================================================
//=================================================================================================
inline gp_Parab Extrema_CurveTool::Parabola(const Adaptor3d_Curve& C)
{
return C.Parabola();
}
//=======================================================================
// function : NbPoles
// purpose :
//=======================================================================
//=================================================================================================
inline Standard_Integer Extrema_CurveTool::NbPoles(const Adaptor3d_Curve& C)
{
return C.NbPoles();
}
//=======================================================================
// function : Degree
// purpose :
//=======================================================================
//=================================================================================================
inline Standard_Integer Extrema_CurveTool::Degree(const Adaptor3d_Curve& C)
{
return C.Degree();
}
//=======================================================================
// function : IsRational
// purpose :
//=======================================================================
//=================================================================================================
inline Standard_Boolean Extrema_CurveTool::IsRational(const Adaptor3d_Curve& C)
{
return C.IsRational();
}
//=======================================================================
// function : NbKnots
// purpose :
//=======================================================================
//=================================================================================================
inline Standard_Integer Extrema_CurveTool::NbKnots(const Adaptor3d_Curve& C)
{
return C.NbKnots();
}
//=======================================================================
// function : Bezier
// purpose :
//=======================================================================
//=================================================================================================
inline Handle(Geom_BezierCurve) Extrema_CurveTool::Bezier(const Adaptor3d_Curve& C)
{
return C.Bezier();
}
//=======================================================================
// function : BSpline
// purpose :
//=======================================================================
//=================================================================================================
inline Handle(Geom_BSplineCurve) Extrema_CurveTool::BSpline(const Adaptor3d_Curve& C)
{
return C.BSpline();
}
//=======================================================================
// function : Resolution
// purpose :
//=======================================================================
//=================================================================================================
inline Standard_Real Extrema_CurveTool::Resolution(const Adaptor3d_Curve& C,
const Standard_Real R3d)
@@ -32,10 +32,8 @@
#include <NCollection_Array1.hxx>
//=======================================================================
//function : Perform
//purpose :
//=======================================================================
//=================================================================================================
void Extrema_GExtPC::Perform(const ThePoint& P)
{
mySqDist.Clear();
@@ -484,10 +482,8 @@ void Extrema_GExtPC::Perform(const ThePoint& P)
}
//=======================================================================
//function : Initialize
//purpose :
//=======================================================================
//=================================================================================================
void Extrema_GExtPC::Initialize(const TheCurve& C,
const Standard_Real Uinf,
@@ -507,10 +503,8 @@ void Extrema_GExtPC::Initialize(const TheCurve& C,
}
//=======================================================================
//function : IntervalPerform
//purpose :
//=======================================================================
//=================================================================================================
void Extrema_GExtPC::IntervalPerform(const ThePoint& P)
{
@@ -542,10 +536,8 @@ void Extrema_GExtPC::IntervalPerform(const ThePoint& P)
}
//=======================================================================
//function : AddSol
//purpose :
//=======================================================================
//=================================================================================================
void Extrema_GExtPC::AddSol(const Standard_Real theU, const ThePoint& theP,
const Standard_Real theSqDist,
@@ -568,10 +560,8 @@ void Extrema_GExtPC::AddSol(const Standard_Real theU, const ThePoint& theP,
}
//=======================================================================
//function : Extrema_GExtPC
//purpose :
//=======================================================================
//=================================================================================================
Extrema_GExtPC::Extrema_GExtPC()
{
@@ -586,10 +576,8 @@ Extrema_GExtPC::Extrema_GExtPC()
type = GeomAbs_OtherCurve;
}
//=======================================================================
//function : Extrema_GExtPC
//purpose :
//=======================================================================
//=================================================================================================
Extrema_GExtPC::Extrema_GExtPC(const ThePoint& P,
const TheCurve& C,
@@ -601,10 +589,8 @@ Extrema_GExtPC::Extrema_GExtPC(const ThePoint& P,
Perform(P);
}
//=======================================================================
//function : Extrema_GExtPC
//purpose :
//=======================================================================
//=================================================================================================
Extrema_GExtPC::Extrema_GExtPC(const ThePoint& P,
const TheCurve& C,
@@ -616,10 +602,8 @@ Extrema_GExtPC::Extrema_GExtPC(const ThePoint& P,
}
//=======================================================================
//function : IsDone
//purpose :
//=======================================================================
//=================================================================================================
Standard_Boolean Extrema_GExtPC::IsDone() const
{
@@ -627,10 +611,8 @@ Standard_Boolean Extrema_GExtPC::IsDone() const
}
//=======================================================================
//function : Value
//purpose :
//=======================================================================
//=================================================================================================
Standard_Real Extrema_GExtPC::SquareDistance(const Standard_Integer N) const
{
@@ -639,10 +621,8 @@ Standard_Real Extrema_GExtPC::SquareDistance(const Standard_Integer N) const
}
//=======================================================================
//function : NbExt
//purpose :
//=======================================================================
//=================================================================================================
Standard_Integer Extrema_GExtPC::NbExt() const
{
@@ -651,10 +631,8 @@ Standard_Integer Extrema_GExtPC::NbExt() const
}
//=======================================================================
//function : IsMin
//purpose :
//=======================================================================
//=================================================================================================
Standard_Boolean Extrema_GExtPC::IsMin(const Standard_Integer N) const
{
@@ -664,10 +642,8 @@ Standard_Boolean Extrema_GExtPC::IsMin(const Standard_Integer N) const
//=======================================================================
//function : Point
//purpose :
//=======================================================================
//=================================================================================================
const ThePOnC & Extrema_GExtPC::Point(const Standard_Integer N) const
{
@@ -676,10 +652,8 @@ const ThePOnC & Extrema_GExtPC::Point(const Standard_Integer N) const
}
//=======================================================================
//function : TrimmedDistances
//purpose :
//=======================================================================
//=================================================================================================
void Extrema_GExtPC::TrimmedSquareDistances(Standard_Real& dist1,
Standard_Real& dist2,
@@ -31,10 +31,8 @@
#include <TColStd_Array1OfReal.hxx>
//=======================================================================
//function : Extrema_GLocateExtPC
//purpose :
//=======================================================================
//=================================================================================================
Extrema_GLocateExtPC::Extrema_GLocateExtPC()
: myC(NULL),
@@ -50,10 +48,8 @@ Extrema_GLocateExtPC::Extrema_GLocateExtPC()
}
//=======================================================================
//function : Extrema_GLocateExtPC
//purpose :
//=======================================================================
//=================================================================================================
Extrema_GLocateExtPC::Extrema_GLocateExtPC (const ThePoint& P,
const TheCurve& C,
@@ -64,10 +60,8 @@ Extrema_GLocateExtPC::Extrema_GLocateExtPC (const ThePoint& P,
Perform(P, U0);
}
//=======================================================================
//function : Extrema_GLocateExtPC
//purpose :
//=======================================================================
//=================================================================================================
Extrema_GLocateExtPC::Extrema_GLocateExtPC (const ThePoint& P,
const TheCurve& C,
@@ -82,10 +76,8 @@ Extrema_GLocateExtPC::Extrema_GLocateExtPC (const ThePoint& P,
//=======================================================================
//function : Initialize
//purpose :
//=======================================================================
//=================================================================================================
void Extrema_GLocateExtPC::Initialize(const TheCurve& C,
const Standard_Real Umin,
@@ -113,10 +105,8 @@ void Extrema_GLocateExtPC::Initialize(const TheCurve& C,
//=======================================================================
//function : Perform
//purpose :
//=======================================================================
//=================================================================================================
void Extrema_GLocateExtPC::Perform(const ThePoint& P,
const Standard_Real U0)
@@ -310,10 +300,8 @@ void Extrema_GLocateExtPC::Perform(const ThePoint& P,
//=======================================================================
//function : IsDone
//purpose :
//=======================================================================
//=================================================================================================
Standard_Boolean Extrema_GLocateExtPC::IsDone () const
{
@@ -321,10 +309,8 @@ Standard_Boolean Extrema_GLocateExtPC::IsDone () const
}
//=======================================================================
//function : Value
//purpose :
//=======================================================================
//=================================================================================================
Standard_Real Extrema_GLocateExtPC::SquareDistance () const
{
@@ -350,10 +336,8 @@ Standard_Real Extrema_GLocateExtPC::SquareDistance () const
}
//=======================================================================
//function : IsMin
//purpose :
//=======================================================================
//=================================================================================================
Standard_Boolean Extrema_GLocateExtPC::IsMin () const
{
@@ -379,10 +363,8 @@ Standard_Boolean Extrema_GLocateExtPC::IsMin () const
}
//=======================================================================
//function : Point
//purpose :
//=======================================================================
//=================================================================================================
const ThePOnC & Extrema_GLocateExtPC::Point () const
{
@@ -167,10 +167,8 @@ static Standard_Real ProjPOnC(const Pnt& theP,
return aDist;
}
//=======================================================================
//function : Extrema_GenExtCC
//purpose :
//=======================================================================
//=================================================================================================
Extrema_GenExtCC::Extrema_GenExtCC()
: myIsFindSingleSolution(Standard_False),
myParallel(Standard_False),
@@ -182,10 +180,8 @@ Extrema_GenExtCC::Extrema_GenExtCC()
myC[0] = myC[1] = 0;
}
//=======================================================================
//function : Extrema_GenExtCC
//purpose :
//=======================================================================
//=================================================================================================
Extrema_GenExtCC::Extrema_GenExtCC(const Curve1& C1,
const Curve2& C2)
: myIsFindSingleSolution(Standard_False),
@@ -203,10 +199,8 @@ Extrema_GenExtCC::Extrema_GenExtCC(const Curve1& C1,
myUppBorder(2) = C2.LastParameter();
}
//=======================================================================
//function : Extrema_GenExtCC
//purpose :
//=======================================================================
//=================================================================================================
Extrema_GenExtCC::Extrema_GenExtCC(const Curve1& C1,
const Curve2& C2,
const Standard_Real Uinf,
@@ -228,10 +222,8 @@ Extrema_GenExtCC::Extrema_GenExtCC(const Curve1& C1,
myUppBorder(2) = Vsup;
}
//=======================================================================
//function : SetParams
//purpose :
//=======================================================================
//=================================================================================================
void Extrema_GenExtCC::SetParams(const Curve1& C1,
const Curve2& C2,
const Standard_Real Uinf,
@@ -247,19 +239,15 @@ void Extrema_GenExtCC::SetParams(const Curve1& C1,
myUppBorder(2) = Vsup;
}
//=======================================================================
//function : SetTolerance
//purpose :
//=======================================================================
//=================================================================================================
void Extrema_GenExtCC::SetTolerance(Standard_Real theTol)
{
myCurveMinTol = theTol;
}
//=======================================================================
//function : Perform
//purpose :
//=======================================================================
//=================================================================================================
void Extrema_GenExtCC::Perform()
{
myDone = Standard_False;
@@ -652,39 +640,31 @@ void Extrema_GenExtCC::Perform()
}
}
//=======================================================================
//function : IsDone
//purpose :
//=======================================================================
//=================================================================================================
Standard_Boolean Extrema_GenExtCC::IsDone() const
{
return myDone;
}
//=======================================================================
//function : IsParallel
//purpose :
//=======================================================================
//=================================================================================================
Standard_Boolean Extrema_GenExtCC::IsParallel() const
{
if (!IsDone()) throw StdFail_NotDone();
return myParallel;
}
//=======================================================================
//function : NbExt
//purpose :
//=======================================================================
//=================================================================================================
Standard_Integer Extrema_GenExtCC::NbExt() const
{
if (!IsDone()) throw StdFail_NotDone();
return myPoints1.Length();
}
//=======================================================================
//function : SquareDistance
//purpose :
//=======================================================================
//=================================================================================================
Standard_Real Extrema_GenExtCC::SquareDistance(const Standard_Integer N) const
{
if (N < 1 || N > NbExt())
@@ -695,10 +675,8 @@ Standard_Real Extrema_GenExtCC::SquareDistance(const Standard_Integer N) const
return Tool1::Value(*((Curve1*)myC[0]), myPoints1(N)).SquareDistance(Tool2::Value(*((Curve2*)myC[1]), myPoints2(N)));
}
//=======================================================================
//function : Points
//purpose :
//=======================================================================
//=================================================================================================
void Extrema_GenExtCC::Points(const Standard_Integer N,
POnC& P1,
POnC& P2) const
@@ -712,19 +690,15 @@ void Extrema_GenExtCC::Points(const Standard_Integer N,
P2.SetValues(myPoints2(N), Tool2::Value(*((Curve2*)myC[1]), myPoints2(N)));
}
//=======================================================================
//function : SetSingleSolutionFlag
//purpose :
//=======================================================================
//=================================================================================================
void Extrema_GenExtCC::SetSingleSolutionFlag(const Standard_Boolean theFlag)
{
myIsFindSingleSolution = theFlag;
}
//=======================================================================
//function : GetSingleSolutionFlag
//purpose :
//=======================================================================
//=================================================================================================
Standard_Boolean Extrema_GenExtCC::GetSingleSolutionFlag() const
{
return myIsFindSingleSolution;
@@ -21,10 +21,8 @@
#include <Standard_NotImplemented.hxx>
//=======================================================================
//function : Extrema_GenExtPC
//purpose :
//=======================================================================
//=================================================================================================
Extrema_GenExtPC::Extrema_GenExtPC ()
: myDone(Standard_False),
@@ -39,10 +37,8 @@ Extrema_GenExtPC::Extrema_GenExtPC ()
//=======================================================================
//function : Extrema_GenExtPC
//purpose :
//=======================================================================
//=================================================================================================
Extrema_GenExtPC::Extrema_GenExtPC (const Pnt& P,
const Curve& C,
@@ -55,10 +51,8 @@ Extrema_GenExtPC::Extrema_GenExtPC (const Pnt& P,
}
//=======================================================================
//function : Extrema_GenExtPC
//purpose :
//=======================================================================
//=================================================================================================
Extrema_GenExtPC::Extrema_GenExtPC (const Pnt& P,
const Curve& C,
@@ -73,10 +67,8 @@ Extrema_GenExtPC::Extrema_GenExtPC (const Pnt& P,
}
//=======================================================================
//function : Initialize
//purpose :
//=======================================================================
//=================================================================================================
void Extrema_GenExtPC::Initialize(const Curve& C,
const Standard_Integer NbU,
@@ -92,10 +84,8 @@ void Extrema_GenExtPC::Initialize(const Curve& C,
myusup = Tool::LastParameter(C);
}
//=======================================================================
//function : Initialize
//purpose :
//=======================================================================
//=================================================================================================
void Extrema_GenExtPC::Initialize(const Curve& C,
const Standard_Integer NbU,
@@ -114,10 +104,8 @@ void Extrema_GenExtPC::Initialize(const Curve& C,
}
//=======================================================================
//function : Initialize
//purpose :
//=======================================================================
//=================================================================================================
void Extrema_GenExtPC::Initialize(const Standard_Integer NbU,
const Standard_Real Umin,
@@ -132,10 +120,8 @@ void Extrema_GenExtPC::Initialize(const Standard_Integer NbU,
myusup = Usup;
}
//=======================================================================
//function : Initialize
//purpose :
//=======================================================================
//=================================================================================================
void Extrema_GenExtPC::Initialize(const Curve& C)
{
@@ -144,10 +130,8 @@ void Extrema_GenExtPC::Initialize(const Curve& C)
//=======================================================================
//function : Perform
//purpose :
//=======================================================================
//=================================================================================================
void Extrema_GenExtPC::Perform(const Pnt& P)
/*-----------------------------------------------------------------------------
@@ -183,10 +167,8 @@ Methode:
//=======================================================================
//function : IsDone
//purpose :
//=======================================================================
//=================================================================================================
Standard_Boolean Extrema_GenExtPC::IsDone () const {
@@ -194,10 +176,8 @@ Standard_Boolean Extrema_GenExtPC::IsDone () const {
}
//=======================================================================
//function : NbExt
//purpose :
//=======================================================================
//=================================================================================================
Standard_Integer Extrema_GenExtPC::NbExt () const {
@@ -206,10 +186,8 @@ Standard_Integer Extrema_GenExtPC::NbExt () const {
}
//=======================================================================
//function : Value
//purpose :
//=======================================================================
//=================================================================================================
Standard_Real Extrema_GenExtPC::SquareDistance (const Standard_Integer N) const
{
@@ -222,10 +200,8 @@ Standard_Real Extrema_GenExtPC::SquareDistance (const Standard_Integer N) const
}
//=======================================================================
//function : IsMin
//purpose :
//=======================================================================
//=================================================================================================
Standard_Boolean Extrema_GenExtPC::IsMin (const Standard_Integer N) const {
@@ -238,10 +214,8 @@ Standard_Boolean Extrema_GenExtPC::IsMin (const Standard_Integer N) const {
}
//=======================================================================
//function : Point
//purpose :
//=======================================================================
//=================================================================================================
const POnC & Extrema_GenExtPC::Point (const Standard_Integer N) const
{
@@ -18,10 +18,8 @@
#include <Standard_DomainError.hxx>
#include <math_FunctionRoot.hxx>
//=======================================================================
//function : Extrema_GenLocateExtPC
//purpose :
//=======================================================================
//=================================================================================================
Extrema_GenLocateExtPC::Extrema_GenLocateExtPC()
: myDone(Standard_False),
@@ -32,10 +30,8 @@ Extrema_GenLocateExtPC::Extrema_GenLocateExtPC()
}
//=======================================================================
//function : Extrema_GenLocateExtPC
//purpose :
//=======================================================================
//=================================================================================================
Extrema_GenLocateExtPC::Extrema_GenLocateExtPC (const Pnt& P,
const Curve& C,
@@ -47,10 +43,8 @@ Extrema_GenLocateExtPC::Extrema_GenLocateExtPC (const Pnt& P,
}
//=======================================================================
//function : Extrema_GenLocateExtPC
//purpose :
//=======================================================================
//=================================================================================================
Extrema_GenLocateExtPC::Extrema_GenLocateExtPC (const Pnt& P,
const Curve& C,
@@ -64,10 +58,8 @@ Extrema_GenLocateExtPC::Extrema_GenLocateExtPC (const Pnt& P,
}
//=======================================================================
//function : Initialize
//purpose :
//=======================================================================
//=================================================================================================
void Extrema_GenLocateExtPC::Initialize(const Curve& C,
const Standard_Real Umin,
@@ -82,10 +74,8 @@ void Extrema_GenLocateExtPC::Initialize(const Curve& C,
}
//=======================================================================
//function : Perform
//purpose :
//=======================================================================
//=================================================================================================
void Extrema_GenLocateExtPC::Perform(const Pnt& P,
const Standard_Real U0)
@@ -124,10 +114,8 @@ Methode:
}
}
//=======================================================================
//function : IsDone
//purpose :
//=======================================================================
//=================================================================================================
Standard_Boolean Extrema_GenLocateExtPC::IsDone () const
{
@@ -135,10 +123,8 @@ Standard_Boolean Extrema_GenLocateExtPC::IsDone () const
}
//=======================================================================
//function : Value
//purpose :
//=======================================================================
//=================================================================================================
Standard_Real Extrema_GenLocateExtPC::SquareDistance() const
{
@@ -150,10 +136,8 @@ Standard_Real Extrema_GenLocateExtPC::SquareDistance() const
}
//=======================================================================
//function : IsMin
//purpose :
//=======================================================================
//=================================================================================================
Standard_Boolean Extrema_GenLocateExtPC::IsMin () const
{
@@ -165,10 +149,8 @@ Standard_Boolean Extrema_GenLocateExtPC::IsMin () const
}
//=======================================================================
//function : Point
//purpose :
//=======================================================================
//=================================================================================================
const POnC & Extrema_GenLocateExtPC::Point () const
{
@@ -14,20 +14,14 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
//=======================================================================
// function : IsDone
// purpose :
//=======================================================================
//=================================================================================================
inline Standard_Boolean GeomLib_Interpolate::IsDone() const
{
return myIsDone;
}
//=======================================================================
// function : Error
// purpose :
//=======================================================================
//=================================================================================================
inline GeomLib_InterpolationErrors GeomLib_Interpolate::Error() const
{
@@ -14,10 +14,7 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
//=======================================================================
// function : IsDone
// purpose :
//=======================================================================
//=================================================================================================
inline Standard_Boolean GeomLib_MakeCurvefromApprox::IsDone() const
{
@@ -2844,10 +2844,8 @@ gp_Parab IntAna_QuadQuadGeo::Parabola(const Standard_Integer n) const
return (gp_Parab(gp_Ax2(pt1, dir1, dir2), param1));
}
//=======================================================================
// function : Hyperbola
// purpose : Returns a Hyperbola
//=======================================================================
//=================================================================================================
gp_Hypr IntAna_QuadQuadGeo::Hyperbola(const Standard_Integer n) const
{
if (!done)
@@ -942,10 +942,9 @@ static void Function_SetUVBounds(Standard_Real& myU1,
//
//
//=======================================================================
// classn : ProjLib_Function
// purpose :
//=======================================================================
//=================================================================================================
class ProjLib_Function : public AppCont_Function
{
Handle(Adaptor3d_Curve) myCurve;