File indexing completed on 2025-01-18 10:04:11
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016 #ifndef _IntTools_Curve_HeaderFile
0017 #define _IntTools_Curve_HeaderFile
0018
0019 #include <Standard.hxx>
0020 #include <Standard_DefineAlloc.hxx>
0021 #include <Standard_Handle.hxx>
0022
0023 #include <Standard_Boolean.hxx>
0024 #include <Standard_Real.hxx>
0025 #include <GeomAbs_CurveType.hxx>
0026 class Geom_Curve;
0027 class Geom2d_Curve;
0028 class gp_Pnt;
0029
0030
0031
0032
0033
0034
0035
0036
0037
0038
0039 class IntTools_Curve
0040 {
0041 public:
0042
0043 DEFINE_STANDARD_ALLOC
0044
0045
0046 Standard_EXPORT IntTools_Curve();
0047
0048
0049 Standard_EXPORT IntTools_Curve(const Handle(Geom_Curve)& the3dCurve3d,
0050 const Handle(Geom2d_Curve)& the2dCurve1,
0051 const Handle(Geom2d_Curve)& the2dCurve2,
0052 const Standard_Real theTolerance = 0.0,
0053 const Standard_Real theTangentialTolerance = 0.0);
0054
0055
0056 void SetCurves(const Handle(Geom_Curve)& the3dCurve,
0057 const Handle(Geom2d_Curve)& the2dCurve1,
0058 const Handle(Geom2d_Curve)& the2dCurve2)
0059 {
0060 my3dCurve = the3dCurve;
0061 my2dCurve1 = the2dCurve1;
0062 my2dCurve2 = the2dCurve2;
0063 }
0064
0065
0066 void SetCurve(const Handle(Geom_Curve)& the3dCurve)
0067 {
0068 my3dCurve = the3dCurve;
0069 }
0070
0071
0072 void SetFirstCurve2d(const Handle(Geom2d_Curve)& the2dCurve1)
0073 {
0074 my2dCurve1 = the2dCurve1;
0075 }
0076
0077
0078 void SetSecondCurve2d(const Handle(Geom2d_Curve)& the2dCurve2)
0079 {
0080 my2dCurve2 = the2dCurve2;
0081 }
0082
0083
0084 void SetTolerance(const Standard_Real theTolerance)
0085 {
0086 myTolerance = theTolerance;
0087 }
0088
0089
0090 void SetTangentialTolerance(const Standard_Real theTangentialTolerance)
0091 {
0092 myTangentialTolerance = theTangentialTolerance;
0093 }
0094
0095
0096 const Handle(Geom_Curve)& Curve() const
0097 {
0098 return my3dCurve;
0099 }
0100
0101
0102 const Handle(Geom2d_Curve)& FirstCurve2d() const
0103 {
0104 return my2dCurve1;
0105 }
0106
0107
0108 const Handle(Geom2d_Curve)& SecondCurve2d() const
0109 {
0110 return my2dCurve2;
0111 }
0112
0113
0114 Standard_Real Tolerance() const
0115 {
0116 return myTolerance;
0117 }
0118
0119
0120 Standard_Real TangentialTolerance() const
0121 {
0122 return myTangentialTolerance;
0123 }
0124
0125
0126 Standard_EXPORT Standard_Boolean HasBounds() const;
0127
0128
0129
0130
0131
0132
0133 Standard_EXPORT Standard_Boolean Bounds(Standard_Real& theFirst,
0134 Standard_Real& theLast,
0135 gp_Pnt& theFirstPnt,
0136 gp_Pnt& theLastPnt) const;
0137
0138
0139
0140
0141
0142 Standard_EXPORT Standard_Boolean D0(const Standard_Real& thePar,
0143 gp_Pnt& thePnt) const;
0144
0145
0146 Standard_EXPORT GeomAbs_CurveType Type() const;
0147
0148 protected:
0149
0150 private:
0151
0152 Handle(Geom_Curve) my3dCurve;
0153 Handle(Geom2d_Curve) my2dCurve1;
0154 Handle(Geom2d_Curve) my2dCurve2;
0155 Standard_Real myTolerance;
0156 Standard_Real myTangentialTolerance;
0157 };
0158
0159 #endif