File indexing completed on 2026-09-15 09:16:09
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015 #ifndef _IntCurveSurface_TheHCurveTool_HeaderFile
0016 #define _IntCurveSurface_TheHCurveTool_HeaderFile
0017
0018 #include <Adaptor3d_Curve.hxx>
0019 #include <GeomAbs_CurveType.hxx>
0020 #include <GeomAbs_Shape.hxx>
0021 #include <Geom_BSplineCurve.hxx>
0022 #include <Geom_BezierCurve.hxx>
0023 #include <NCollection_Array1.hxx>
0024 #include <NCollection_HArray1.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
0033 class Standard_OutOfRange;
0034 class Standard_NoSuchObject;
0035 class Standard_DomainError;
0036 class gp_Pnt;
0037 class gp_Vec;
0038 class Geom_BezierCurve;
0039 class Geom_BSplineCurve;
0040
0041 class IntCurveSurface_TheHCurveTool
0042 {
0043 public:
0044 DEFINE_STANDARD_ALLOC
0045
0046 static double FirstParameter(const occ::handle<Adaptor3d_Curve>& C)
0047 {
0048 return C->FirstParameter();
0049 }
0050
0051 static double LastParameter(const occ::handle<Adaptor3d_Curve>& C) { return C->LastParameter(); }
0052
0053 static GeomAbs_Shape Continuity(const occ::handle<Adaptor3d_Curve>& C) { return C->Continuity(); }
0054
0055
0056
0057 static int NbIntervals(const occ::handle<Adaptor3d_Curve>& C, const GeomAbs_Shape S)
0058 {
0059 return C->NbIntervals(S);
0060 }
0061
0062
0063
0064
0065
0066
0067 static void Intervals(const occ::handle<Adaptor3d_Curve>& C,
0068 NCollection_Array1<double>& T,
0069 const GeomAbs_Shape S)
0070 {
0071 C->Intervals(T, S);
0072 }
0073
0074 static bool IsClosed(const occ::handle<Adaptor3d_Curve>& C) { return C->IsClosed(); }
0075
0076 static bool IsPeriodic(const occ::handle<Adaptor3d_Curve>& C) { return C->IsPeriodic(); }
0077
0078 static double Period(const occ::handle<Adaptor3d_Curve>& C) { return C->Period(); }
0079
0080
0081 static gp_Pnt Value(const occ::handle<Adaptor3d_Curve>& C, const double U) { return C->Value(U); }
0082
0083
0084 static void D0(const occ::handle<Adaptor3d_Curve>& C, const double U, gp_Pnt& P) { C->D0(U, P); }
0085
0086
0087
0088
0089
0090 static void D1(const occ::handle<Adaptor3d_Curve>& C, const double U, gp_Pnt& P, gp_Vec& V)
0091 {
0092 C->D1(U, P, V);
0093 }
0094
0095
0096
0097
0098
0099 static void D2(const occ::handle<Adaptor3d_Curve>& C,
0100 const double U,
0101 gp_Pnt& P,
0102 gp_Vec& V1,
0103 gp_Vec& V2)
0104 {
0105 C->D2(U, P, V1, V2);
0106 }
0107
0108
0109
0110
0111
0112 static void D3(const occ::handle<Adaptor3d_Curve>& C,
0113 const double U,
0114 gp_Pnt& P,
0115 gp_Vec& V1,
0116 gp_Vec& V2,
0117 gp_Vec& V3)
0118 {
0119 C->D3(U, P, V1, V2, V3);
0120 }
0121
0122
0123
0124
0125
0126
0127 static gp_Vec DN(const occ::handle<Adaptor3d_Curve>& C, const double U, const int N)
0128 {
0129 return C->DN(U, N);
0130 }
0131
0132
0133
0134 static double Resolution(const occ::handle<Adaptor3d_Curve>& C, const double R3d)
0135 {
0136 return C->Resolution(R3d);
0137 }
0138
0139
0140
0141
0142 static GeomAbs_CurveType GetType(const occ::handle<Adaptor3d_Curve>& C) { return C->GetType(); }
0143
0144 static gp_Lin Line(const occ::handle<Adaptor3d_Curve>& C) { return C->Line(); }
0145
0146 static gp_Circ Circle(const occ::handle<Adaptor3d_Curve>& C) { return C->Circle(); }
0147
0148 static gp_Elips Ellipse(const occ::handle<Adaptor3d_Curve>& C) { return C->Ellipse(); }
0149
0150 static gp_Hypr Hyperbola(const occ::handle<Adaptor3d_Curve>& C) { return C->Hyperbola(); }
0151
0152 static gp_Parab Parabola(const occ::handle<Adaptor3d_Curve>& C) { return C->Parabola(); }
0153
0154 static occ::handle<Geom_BezierCurve> Bezier(const occ::handle<Adaptor3d_Curve>& C)
0155 {
0156 return C->Bezier();
0157 }
0158
0159 static occ::handle<Geom_BSplineCurve> BSpline(const occ::handle<Adaptor3d_Curve>& C)
0160 {
0161 return C->BSpline();
0162 }
0163
0164 Standard_EXPORT static int NbSamples(const occ::handle<Adaptor3d_Curve>& C,
0165 const double U0,
0166 const double U1);
0167
0168
0169
0170
0171
0172
0173
0174
0175
0176 [[nodiscard]] Standard_EXPORT static occ::handle<NCollection_HArray1<double>> SamplePars(
0177 const occ::handle<Adaptor3d_Curve>& C,
0178 const double U0,
0179 const double U1,
0180 const double Defl,
0181 const int NbMin);
0182
0183
0184 Standard_DEPRECATED("Use SamplePars() returning handle by value instead")
0185 Standard_EXPORT static void SamplePars(const occ::handle<Adaptor3d_Curve>& C,
0186 const double U0,
0187 const double U1,
0188 const double Defl,
0189 const int NbMin,
0190 occ::handle<NCollection_HArray1<double>>& Pars);
0191 };
0192
0193 #endif