File indexing completed on 2024-11-16 09:47:17
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017 #ifndef _HLRBRep_Curve_HeaderFile
0018 #define _HLRBRep_Curve_HeaderFile
0019
0020 #include <BRepAdaptor_Curve.hxx>
0021 #include <GeomAbs_Shape.hxx>
0022 #include <gp_Pnt.hxx>
0023 #include <gp_Pnt2d.hxx>
0024 #include <Standard.hxx>
0025 #include <Standard_DefineAlloc.hxx>
0026 #include <Standard_Handle.hxx>
0027 #include <Standard_Integer.hxx>
0028 #include <TColgp_Array1OfPnt2d.hxx>
0029 #include <TColStd_Array1OfInteger.hxx>
0030 #include <TColStd_Array1OfReal.hxx>
0031
0032 class TopoDS_Edge;
0033 class gp_Pnt;
0034 class gp_Vec;
0035 class gp_Pnt2d;
0036 class gp_Dir2d;
0037 class gp_Vec2d;
0038 class gp_Lin2d;
0039 class gp_Circ2d;
0040 class gp_Elips2d;
0041 class gp_Hypr2d;
0042 class gp_Parab2d;
0043 class Geom_BSplineCurve;
0044 class HLRAlgo_Projector;
0045
0046
0047
0048
0049
0050 class HLRBRep_Curve
0051 {
0052 public:
0053
0054 DEFINE_STANDARD_ALLOC
0055
0056
0057
0058 Standard_EXPORT HLRBRep_Curve();
0059
0060 void Projector (const HLRAlgo_Projector* Proj)
0061 {myProj = Proj;}
0062
0063
0064 BRepAdaptor_Curve& Curve();
0065
0066
0067 Standard_EXPORT void Curve (const TopoDS_Edge& E);
0068
0069
0070 const BRepAdaptor_Curve& GetCurve() const;
0071
0072
0073
0074 Standard_EXPORT Standard_Real Parameter2d (const Standard_Real P3d) const;
0075
0076
0077
0078 Standard_EXPORT Standard_Real Parameter3d (const Standard_Real P2d) const;
0079
0080
0081 Standard_EXPORT Standard_Real Update (Standard_Real TotMin[16], Standard_Real TotMax[16]);
0082
0083
0084 Standard_EXPORT Standard_Real UpdateMinMax (Standard_Real TotMin[16], Standard_Real TotMax[16]);
0085
0086
0087
0088 Standard_EXPORT Standard_Real Z (const Standard_Real U) const;
0089
0090
0091
0092 gp_Pnt Value3D (const Standard_Real U) const;
0093
0094
0095
0096 void D0 (const Standard_Real U, gp_Pnt& P) const;
0097
0098
0099
0100 void D1 (const Standard_Real U, gp_Pnt& P, gp_Vec& V) const;
0101
0102
0103
0104
0105
0106 Standard_EXPORT void Tangent (const Standard_Boolean AtStart, gp_Pnt2d& P, gp_Dir2d& D) const;
0107
0108 Standard_Real FirstParameter() const;
0109
0110 Standard_Real LastParameter() const;
0111
0112 GeomAbs_Shape Continuity() const;
0113
0114
0115
0116
0117 Standard_Integer NbIntervals (const GeomAbs_Shape S) const;
0118
0119
0120
0121
0122
0123
0124 void Intervals (TColStd_Array1OfReal& T, const GeomAbs_Shape S) const;
0125
0126 Standard_Boolean IsClosed() const;
0127
0128 Standard_Boolean IsPeriodic() const;
0129
0130 Standard_Real Period() const;
0131
0132
0133 gp_Pnt2d Value (const Standard_Real U) const;
0134
0135
0136 Standard_EXPORT void D0 (const Standard_Real U, gp_Pnt2d& P) const;
0137
0138
0139
0140
0141
0142 Standard_EXPORT void D1 (const Standard_Real U, gp_Pnt2d& P, gp_Vec2d& V) const;
0143
0144
0145
0146 Standard_EXPORT void D2 (const Standard_Real U, gp_Pnt2d& P, gp_Vec2d& V1, gp_Vec2d& V2) const;
0147
0148
0149
0150
0151
0152
0153 Standard_EXPORT void D3 (const Standard_Real U, gp_Pnt2d& P, gp_Vec2d& V1, gp_Vec2d& V2, gp_Vec2d& V3) const;
0154
0155
0156
0157
0158
0159
0160
0161 Standard_EXPORT gp_Vec2d DN (const Standard_Real U, const Standard_Integer N) const;
0162
0163
0164
0165 Standard_Real Resolution (const Standard_Real R3d) const;
0166
0167
0168
0169
0170 GeomAbs_CurveType GetType() const;
0171
0172 Standard_EXPORT gp_Lin2d Line() const;
0173
0174 Standard_EXPORT gp_Circ2d Circle() const;
0175
0176 Standard_EXPORT gp_Elips2d Ellipse() const;
0177
0178 Standard_EXPORT gp_Hypr2d Hyperbola() const;
0179
0180 Standard_EXPORT gp_Parab2d Parabola() const;
0181
0182 Standard_Boolean IsRational() const;
0183
0184 Standard_Integer Degree() const;
0185
0186 Standard_Integer NbPoles() const;
0187
0188 Standard_EXPORT void Poles (TColgp_Array1OfPnt2d& TP) const;
0189
0190 Standard_EXPORT void Poles (const Handle(Geom_BSplineCurve)& aCurve, TColgp_Array1OfPnt2d& TP) const;
0191
0192 Standard_EXPORT void PolesAndWeights (TColgp_Array1OfPnt2d& TP, TColStd_Array1OfReal& TW) const;
0193
0194 Standard_EXPORT void PolesAndWeights (const Handle(Geom_BSplineCurve)& aCurve, TColgp_Array1OfPnt2d& TP, TColStd_Array1OfReal& TW) const;
0195
0196 Standard_Integer NbKnots() const;
0197
0198 Standard_EXPORT void Knots (TColStd_Array1OfReal& kn) const;
0199
0200 Standard_EXPORT void Multiplicities (TColStd_Array1OfInteger& mu) const;
0201
0202
0203
0204
0205 protected:
0206
0207
0208
0209
0210
0211 private:
0212
0213
0214
0215 BRepAdaptor_Curve myCurve;
0216 GeomAbs_CurveType myType;
0217 const HLRAlgo_Projector* myProj;
0218 Standard_Real myOX;
0219 Standard_Real myOZ;
0220 Standard_Real myVX;
0221 Standard_Real myVZ;
0222 Standard_Real myOF;
0223
0224
0225 };
0226
0227
0228 #include <HLRBRep_Curve.lxx>
0229
0230
0231
0232
0233
0234 #endif