Warning, /include/opencascade/Extrema_Curve2dTool.lxx is written in an unsupported language. File is not indexed.
0001 // Created on: 1995-07-18
0002 // Created by: Modelistation
0003 // Copyright (c) 1995-1999 Matra Datavision
0004 // Copyright (c) 1999-2014 OPEN CASCADE SAS
0005 //
0006 // This file is part of Open CASCADE Technology software library.
0007 //
0008 // This library is free software; you can redistribute it and/or modify it under
0009 // the terms of the GNU Lesser General Public License version 2.1 as published
0010 // by the Free Software Foundation, with special exception defined in the file
0011 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
0012 // distribution for complete text of the license and disclaimer of any warranty.
0013 //
0014 // Alternatively, this file may be used under the terms of Open CASCADE
0015 // commercial license or contractual agreement.
0016
0017 #include <gp_Lin2d.hxx>
0018 #include <gp_Elips2d.hxx>
0019 #include <gp_Circ2d.hxx>
0020 #include <gp_Hypr2d.hxx>
0021 #include <gp_Parab2d.hxx>
0022 #include <Geom2d_BezierCurve.hxx>
0023 #include <Geom2d_BSplineCurve.hxx>
0024 #include <Adaptor2d_Curve2d.hxx>
0025
0026 //=======================================================================
0027 //function : FirstParameter
0028 //purpose :
0029 //=======================================================================
0030
0031 inline Standard_Real Extrema_Curve2dTool::FirstParameter(const Adaptor2d_Curve2d& C)
0032 {
0033 return C.FirstParameter();
0034 }
0035
0036 //=======================================================================
0037 //function : LastParameter
0038 //purpose :
0039 //=======================================================================
0040
0041 inline Standard_Real Extrema_Curve2dTool::LastParameter(const Adaptor2d_Curve2d& C)
0042 {
0043 return C.LastParameter();
0044 }
0045
0046 //=======================================================================
0047 //function : Continuity
0048 //purpose :
0049 //=======================================================================
0050
0051 inline GeomAbs_Shape Extrema_Curve2dTool::Continuity(const Adaptor2d_Curve2d& C)
0052 {
0053 return C.Continuity();
0054 }
0055
0056 //=======================================================================
0057 //function : NbIntervals
0058 //purpose :
0059 //=======================================================================
0060
0061 inline Standard_Integer Extrema_Curve2dTool::NbIntervals(const Adaptor2d_Curve2d& C,
0062 const GeomAbs_Shape S)
0063 {
0064 return C.NbIntervals(S);
0065 }
0066
0067 //=======================================================================
0068 //function : Intervals
0069 //purpose :
0070 //=======================================================================
0071
0072 inline void Extrema_Curve2dTool::Intervals(const Adaptor2d_Curve2d& C,
0073 TColStd_Array1OfReal& T,
0074 const GeomAbs_Shape S)
0075 {
0076 C.Intervals(T, S);
0077 }
0078
0079 //=======================================================================
0080 //function : IsClosed
0081 //purpose :
0082 //=======================================================================
0083
0084 inline Standard_Boolean Extrema_Curve2dTool::IsClosed(const Adaptor2d_Curve2d& C)
0085 {
0086 return C.IsClosed();
0087 }
0088
0089 //=======================================================================
0090 //function : IsPeriodic
0091 //purpose :
0092 //=======================================================================
0093
0094 inline Standard_Boolean Extrema_Curve2dTool::IsPeriodic(const Adaptor2d_Curve2d& C)
0095 {
0096 return C.IsPeriodic();
0097 }
0098
0099 //=======================================================================
0100 //function : Period
0101 //purpose :
0102 //=======================================================================
0103
0104 inline Standard_Real Extrema_Curve2dTool::Period(const Adaptor2d_Curve2d& C)
0105 {
0106 return C.Period();
0107 }
0108
0109 //=======================================================================
0110 //function : Value
0111 //purpose :
0112 //=======================================================================
0113
0114 inline gp_Pnt2d Extrema_Curve2dTool::Value(const Adaptor2d_Curve2d& C,
0115 const Standard_Real U)
0116 {
0117 return C.Value(U);
0118 }
0119
0120 //=======================================================================
0121 //function : D0
0122 //purpose :
0123 //=======================================================================
0124
0125 inline void Extrema_Curve2dTool::D0(const Adaptor2d_Curve2d& C,
0126 const Standard_Real U,
0127 gp_Pnt2d& P)
0128 {
0129 C.D0(U, P);
0130 }
0131
0132 //=======================================================================
0133 //function : D1
0134 //purpose :
0135 //=======================================================================
0136
0137 inline void Extrema_Curve2dTool::D1(const Adaptor2d_Curve2d& C,
0138 const Standard_Real U,
0139 gp_Pnt2d& P,
0140 gp_Vec2d& V)
0141 {
0142 C.D1(U, P, V);
0143 }
0144
0145 //=======================================================================
0146 //function : D2
0147 //purpose :
0148 //=======================================================================
0149
0150 inline void Extrema_Curve2dTool::D2(const Adaptor2d_Curve2d& C,
0151 const Standard_Real U,
0152 gp_Pnt2d& P,
0153 gp_Vec2d& V1,
0154 gp_Vec2d& V2)
0155 {
0156 C.D2(U, P, V1, V2);
0157 }
0158
0159 //=======================================================================
0160 //function : D3
0161 //purpose :
0162 //=======================================================================
0163
0164 inline void Extrema_Curve2dTool::D3(const Adaptor2d_Curve2d& C,
0165 const Standard_Real U,
0166 gp_Pnt2d& P,
0167 gp_Vec2d& V1,
0168 gp_Vec2d& V2,
0169 gp_Vec2d& V3)
0170 {
0171 C.D3(U, P, V1, V2, V3);
0172 }
0173
0174 //=======================================================================
0175 //function : DN
0176 //purpose :
0177 //=======================================================================
0178
0179 inline gp_Vec2d Extrema_Curve2dTool::DN(const Adaptor2d_Curve2d& C,
0180 const Standard_Real U,
0181 const Standard_Integer N)
0182 {
0183 return C.DN(U, N);
0184 }
0185
0186 //=======================================================================
0187 //function : Resolution
0188 //purpose :
0189 //=======================================================================
0190
0191 inline Standard_Real Extrema_Curve2dTool::Resolution(const Adaptor2d_Curve2d& C,
0192 const Standard_Real R3d)
0193 {
0194 return C.Resolution(R3d);
0195 }
0196
0197 //=======================================================================
0198 //function : GetType
0199 //purpose :
0200 //=======================================================================
0201
0202 inline GeomAbs_CurveType Extrema_Curve2dTool::GetType(const Adaptor2d_Curve2d& C)
0203 {
0204 return C.GetType();
0205 }
0206
0207 //=======================================================================
0208 //function : Line
0209 //purpose :
0210 //=======================================================================
0211
0212 inline gp_Lin2d Extrema_Curve2dTool::Line(const Adaptor2d_Curve2d& C)
0213 {
0214 return C.Line();
0215 }
0216
0217 //=======================================================================
0218 //function : Circle
0219 //purpose :
0220 //=======================================================================
0221
0222 inline gp_Circ2d Extrema_Curve2dTool::Circle(const Adaptor2d_Curve2d& C)
0223 {
0224 return C.Circle();
0225 }
0226
0227 //=======================================================================
0228 //function : Ellipse
0229 //purpose :
0230 //=======================================================================
0231
0232 inline gp_Elips2d Extrema_Curve2dTool::Ellipse(const Adaptor2d_Curve2d& C)
0233 {
0234 return C.Ellipse();
0235 }
0236
0237 //=======================================================================
0238 //function : Hyperbola
0239 //purpose :
0240 //=======================================================================
0241
0242 inline gp_Hypr2d Extrema_Curve2dTool::Hyperbola(const Adaptor2d_Curve2d& C)
0243 {
0244 return C.Hyperbola();
0245 }
0246
0247 //=======================================================================
0248 //function : Parabola
0249 //purpose :
0250 //=======================================================================
0251
0252 inline gp_Parab2d Extrema_Curve2dTool::Parabola(const Adaptor2d_Curve2d& C)
0253 {
0254 return C.Parabola();
0255 }
0256
0257 //=======================================================================
0258 //function : NbPoles
0259 //purpose :
0260 //=======================================================================
0261
0262 inline Standard_Integer Extrema_Curve2dTool::NbPoles(const Adaptor2d_Curve2d& C)
0263 {
0264 return C.NbPoles();
0265 }
0266
0267 //=======================================================================
0268 //function : Degree
0269 //purpose :
0270 //=======================================================================
0271
0272 inline Standard_Integer Extrema_Curve2dTool::Degree(const Adaptor2d_Curve2d& C)
0273 {
0274 return C.Degree();
0275 }
0276
0277 //=======================================================================
0278 //function : IsRational
0279 //purpose :
0280 //=======================================================================
0281
0282 inline Standard_Boolean Extrema_Curve2dTool::IsRational(const Adaptor2d_Curve2d& C)
0283 {
0284 return C.Degree() != 0;
0285 }
0286
0287
0288 //=======================================================================
0289 //function : NbKnots
0290 //purpose :
0291 //=======================================================================
0292
0293 inline Standard_Integer Extrema_Curve2dTool::NbKnots(const Adaptor2d_Curve2d& C)
0294 {
0295 return C.NbKnots();
0296 }
0297
0298 //=======================================================================
0299 //function : Bezier
0300 //purpose :
0301 //=======================================================================
0302
0303 inline Handle(Geom2d_BezierCurve) Extrema_Curve2dTool::Bezier(const Adaptor2d_Curve2d& C)
0304 {
0305 return C.Bezier();
0306 }
0307
0308 //=======================================================================
0309 //function : BSpline
0310 //purpose :
0311 //=======================================================================
0312
0313 inline Handle(Geom2d_BSplineCurve) Extrema_Curve2dTool::BSpline(const Adaptor2d_Curve2d& C)
0314 {
0315 return C.BSpline();
0316 }
0317