File indexing completed on 2025-01-18 10:03:38
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015 #ifndef _GeomEvaluator_OffsetCurve_HeaderFile
0016 #define _GeomEvaluator_OffsetCurve_HeaderFile
0017
0018 #include <GeomAdaptor_Curve.hxx>
0019 #include <GeomEvaluator_Curve.hxx>
0020 #include <gp_Dir.hxx>
0021
0022
0023 class GeomEvaluator_OffsetCurve : public GeomEvaluator_Curve
0024 {
0025 public:
0026
0027 Standard_EXPORT GeomEvaluator_OffsetCurve(
0028 const Handle(Geom_Curve)& theBase,
0029 const Standard_Real theOffset,
0030 const gp_Dir& theDirection);
0031
0032 Standard_EXPORT GeomEvaluator_OffsetCurve(
0033 const Handle(GeomAdaptor_Curve)& theBase,
0034 const Standard_Real theOffset,
0035 const gp_Dir& theDirection);
0036
0037
0038 void SetOffsetValue(Standard_Real theOffset)
0039 { myOffset = theOffset; }
0040
0041 void SetOffsetDirection(const gp_Dir& theDirection)
0042 { myOffsetDir = theDirection; }
0043
0044
0045 Standard_EXPORT void D0(const Standard_Real theU,
0046 gp_Pnt& theValue) const Standard_OVERRIDE;
0047
0048 Standard_EXPORT void D1(const Standard_Real theU,
0049 gp_Pnt& theValue, gp_Vec& theD1) const Standard_OVERRIDE;
0050
0051 Standard_EXPORT void D2(const Standard_Real theU,
0052 gp_Pnt& theValue, gp_Vec& theD1, gp_Vec& theD2) const Standard_OVERRIDE;
0053
0054 Standard_EXPORT void D3(const Standard_Real theU,
0055 gp_Pnt& theValue, gp_Vec& theD1,
0056 gp_Vec& theD2, gp_Vec& theD3) const Standard_OVERRIDE;
0057
0058 Standard_EXPORT gp_Vec DN(const Standard_Real theU,
0059 const Standard_Integer theDeriv) const Standard_OVERRIDE;
0060
0061 Standard_EXPORT virtual Handle(GeomEvaluator_Curve) ShallowCopy() const Standard_OVERRIDE;
0062
0063 DEFINE_STANDARD_RTTIEXT(GeomEvaluator_OffsetCurve,GeomEvaluator_Curve)
0064
0065 private:
0066
0067 void CalculateD0( gp_Pnt& theValue,
0068 const gp_Vec& theD1) const;
0069
0070 void CalculateD1( gp_Pnt& theValue,
0071 gp_Vec& theD1,
0072 const gp_Vec& theD2) const;
0073
0074 void CalculateD2( gp_Pnt& theValue,
0075 gp_Vec& theD1,
0076 gp_Vec& theD2,
0077 const gp_Vec& theD3,
0078 const Standard_Boolean theIsDirChange) const;
0079
0080 void CalculateD3( gp_Pnt& theValue,
0081 gp_Vec& theD1,
0082 gp_Vec& theD2,
0083 gp_Vec& theD3,
0084 const gp_Vec& theD4,
0085 const Standard_Boolean theIsDirChange) const;
0086
0087
0088 void BaseD0(const Standard_Real theU, gp_Pnt& theValue) const;
0089
0090 void BaseD1(const Standard_Real theU,
0091 gp_Pnt& theValue, gp_Vec& theD1) const;
0092
0093 void BaseD2(const Standard_Real theU,
0094 gp_Pnt& theValue, gp_Vec& theD1, gp_Vec& theD2) const;
0095
0096 void BaseD3(const Standard_Real theU,
0097 gp_Pnt& theValue, gp_Vec& theD1, gp_Vec& theD2, gp_Vec& theD3) const;
0098
0099 void BaseD4(const Standard_Real theU,
0100 gp_Pnt& theValue, gp_Vec& theD1, gp_Vec& theD2, gp_Vec& theD3, gp_Vec& theD4) const;
0101
0102 gp_Vec BaseDN(const Standard_Real theU, const Standard_Integer theDeriv) const;
0103
0104
0105
0106 Standard_Boolean AdjustDerivative(const Standard_Integer theMaxDerivative,
0107 const Standard_Real theU,
0108 gp_Vec& theD1,
0109 gp_Vec& theD2,
0110 gp_Vec& theD3,
0111 gp_Vec& theD4) const;
0112
0113 private:
0114 Handle(Geom_Curve) myBaseCurve;
0115 Handle(GeomAdaptor_Curve) myBaseAdaptor;
0116
0117 Standard_Real myOffset;
0118 gp_Dir myOffsetDir;
0119 };
0120
0121 DEFINE_STANDARD_HANDLE(GeomEvaluator_OffsetCurve, GeomEvaluator_Curve)
0122
0123
0124 #endif