File indexing completed on 2026-09-13 09:16:11
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017 #ifndef _Extrema_CurveTool_HeaderFile
0018 #define _Extrema_CurveTool_HeaderFile
0019
0020 #include <Adaptor3d_Curve.hxx>
0021 #include <Geom_BezierCurve.hxx>
0022 #include <Geom_BSplineCurve.hxx>
0023 #include <GeomAbs_CurveType.hxx>
0024 #include <GeomAbs_Shape.hxx>
0025 #include <gp_Circ.hxx>
0026 #include <gp_Elips.hxx>
0027 #include <gp_Hypr.hxx>
0028 #include <gp_Lin.hxx>
0029 #include <gp_Parab.hxx>
0030 #include <gp_Pnt.hxx>
0031 #include <gp_Vec.hxx>
0032 #include <Standard.hxx>
0033 #include <Standard_DefineAlloc.hxx>
0034 #include <Standard_Handle.hxx>
0035 #include <NCollection_Array1.hxx>
0036 #include <NCollection_HArray1.hxx>
0037
0038 class Extrema_CurveTool
0039 {
0040 public:
0041 DEFINE_STANDARD_ALLOC
0042
0043 static double FirstParameter(const Adaptor3d_Curve& theC) { return theC.FirstParameter(); }
0044
0045 static double LastParameter(const Adaptor3d_Curve& theC) { return theC.LastParameter(); }
0046
0047 static GeomAbs_Shape Continuity(const Adaptor3d_Curve& theC) { return theC.Continuity(); }
0048
0049
0050
0051 static int NbIntervals(Adaptor3d_Curve& theC, const GeomAbs_Shape theS)
0052 {
0053 return theC.NbIntervals(theS);
0054 }
0055
0056
0057
0058
0059 static void Intervals(Adaptor3d_Curve& theC,
0060 NCollection_Array1<double>& theT,
0061 const GeomAbs_Shape theS)
0062 {
0063 theC.Intervals(theT, theS);
0064 }
0065
0066
0067
0068 Standard_EXPORT static occ::handle<NCollection_HArray1<double>> DeflCurvIntervals(
0069 const Adaptor3d_Curve& theC);
0070
0071 Standard_EXPORT static bool IsPeriodic(const Adaptor3d_Curve& theC);
0072
0073 static double Period(const Adaptor3d_Curve& theC) { return theC.Period(); }
0074
0075 static double Resolution(const Adaptor3d_Curve& theC, const double theR3d)
0076 {
0077 return theC.Resolution(theR3d);
0078 }
0079
0080 static GeomAbs_CurveType GetType(const Adaptor3d_Curve& theC) { return theC.GetType(); }
0081
0082 static gp_Pnt Value(const Adaptor3d_Curve& theC, const double theU) { return theC.Value(theU); }
0083
0084 static void D0(const Adaptor3d_Curve& theC, const double theU, gp_Pnt& theP)
0085 {
0086 theC.D0(theU, theP);
0087 }
0088
0089 static void D1(const Adaptor3d_Curve& theC, const double theU, gp_Pnt& theP, gp_Vec& theV)
0090 {
0091 theC.D1(theU, theP, theV);
0092 }
0093
0094 static void D2(const Adaptor3d_Curve& theC,
0095 const double theU,
0096 gp_Pnt& theP,
0097 gp_Vec& theV1,
0098 gp_Vec& theV2)
0099 {
0100 theC.D2(theU, theP, theV1, theV2);
0101 }
0102
0103 static void D3(const Adaptor3d_Curve& theC,
0104 const double theU,
0105 gp_Pnt& theP,
0106 gp_Vec& theV1,
0107 gp_Vec& theV2,
0108 gp_Vec& theV3)
0109 {
0110 theC.D3(theU, theP, theV1, theV2, theV3);
0111 }
0112
0113 static gp_Vec DN(const Adaptor3d_Curve& theC, const double theU, const int theN)
0114 {
0115 return theC.DN(theU, theN);
0116 }
0117
0118 static gp_Lin Line(const Adaptor3d_Curve& theC) { return theC.Line(); }
0119
0120 static gp_Circ Circle(const Adaptor3d_Curve& theC) { return theC.Circle(); }
0121
0122 static gp_Elips Ellipse(const Adaptor3d_Curve& theC) { return theC.Ellipse(); }
0123
0124 static gp_Hypr Hyperbola(const Adaptor3d_Curve& theC) { return theC.Hyperbola(); }
0125
0126 static gp_Parab Parabola(const Adaptor3d_Curve& theC) { return theC.Parabola(); }
0127
0128 static int Degree(const Adaptor3d_Curve& theC) { return theC.Degree(); }
0129
0130 static bool IsRational(const Adaptor3d_Curve& theC) { return theC.IsRational(); }
0131
0132 static int NbPoles(const Adaptor3d_Curve& theC) { return theC.NbPoles(); }
0133
0134 static int NbKnots(const Adaptor3d_Curve& theC) { return theC.NbKnots(); }
0135
0136 static occ::handle<Geom_BezierCurve> Bezier(const Adaptor3d_Curve& theC) { return theC.Bezier(); }
0137
0138 static occ::handle<Geom_BSplineCurve> BSpline(const Adaptor3d_Curve& theC)
0139 {
0140 return theC.BSpline();
0141 }
0142 };
0143
0144 #endif