File indexing completed on 2026-09-09 09:16:02
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
0040 class IntTools_Curve
0041 {
0042 public:
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) { my3dCurve = the3dCurve; }
0067
0068
0069 void SetFirstCurve2d(const Handle(Geom2d_Curve)& the2dCurve1) { my2dCurve1 = the2dCurve1; }
0070
0071
0072 void SetSecondCurve2d(const Handle(Geom2d_Curve)& the2dCurve2) { my2dCurve2 = the2dCurve2; }
0073
0074
0075 void SetTolerance(const Standard_Real theTolerance) { myTolerance = theTolerance; }
0076
0077
0078 void SetTangentialTolerance(const Standard_Real theTangentialTolerance)
0079 {
0080 myTangentialTolerance = theTangentialTolerance;
0081 }
0082
0083
0084 const Handle(Geom_Curve)& Curve() const { return my3dCurve; }
0085
0086
0087 const Handle(Geom2d_Curve)& FirstCurve2d() const { return my2dCurve1; }
0088
0089
0090 const Handle(Geom2d_Curve)& SecondCurve2d() const { return my2dCurve2; }
0091
0092
0093 Standard_Real Tolerance() const { return myTolerance; }
0094
0095
0096 Standard_Real TangentialTolerance() const { return myTangentialTolerance; }
0097
0098
0099 Standard_EXPORT Standard_Boolean HasBounds() const;
0100
0101
0102
0103
0104
0105
0106 Standard_EXPORT Standard_Boolean Bounds(Standard_Real& theFirst,
0107 Standard_Real& theLast,
0108 gp_Pnt& theFirstPnt,
0109 gp_Pnt& theLastPnt) const;
0110
0111
0112
0113
0114
0115 Standard_EXPORT Standard_Boolean D0(const Standard_Real& thePar, gp_Pnt& thePnt) const;
0116
0117
0118 Standard_EXPORT GeomAbs_CurveType Type() const;
0119
0120 protected:
0121 private:
0122 Handle(Geom_Curve) my3dCurve;
0123 Handle(Geom2d_Curve) my2dCurve1;
0124 Handle(Geom2d_Curve) my2dCurve2;
0125 Standard_Real myTolerance;
0126 Standard_Real myTangentialTolerance;
0127 };
0128
0129 #endif