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