File indexing completed on 2026-10-05 09:21:11
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017 #ifndef _Approx_CurveOnSurface_HeaderFile
0018 #define _Approx_CurveOnSurface_HeaderFile
0019
0020 #include <Adaptor2d_Curve2d.hxx>
0021 #include <Adaptor3d_Surface.hxx>
0022 #include <GeomAbs_Shape.hxx>
0023
0024 class Geom_BSplineCurve;
0025 class Geom2d_BSplineCurve;
0026
0027
0028 class Approx_CurveOnSurface
0029 {
0030 public:
0031 DEFINE_STANDARD_ALLOC
0032
0033
0034 Standard_DEPRECATED(
0035 "This constructor is deprecated. Use other constructor and perform method instead.")
0036 Standard_EXPORT Approx_CurveOnSurface(const occ::handle<Adaptor2d_Curve2d>& C2D,
0037 const occ::handle<Adaptor3d_Surface>& Surf,
0038 const double First,
0039 const double Last,
0040 const double Tol,
0041 const GeomAbs_Shape Continuity,
0042 const int MaxDegree,
0043 const int MaxSegments,
0044 const bool Only3d = false,
0045 const bool Only2d = false);
0046
0047
0048
0049
0050
0051
0052
0053 Standard_EXPORT Approx_CurveOnSurface(const occ::handle<Adaptor2d_Curve2d>& theC2D,
0054 const occ::handle<Adaptor3d_Surface>& theSurf,
0055 const double theFirst,
0056 const double theLast,
0057 const double theTol);
0058
0059 Standard_EXPORT bool IsDone() const;
0060
0061 Standard_EXPORT bool HasResult() const;
0062
0063 Standard_EXPORT occ::handle<Geom_BSplineCurve> Curve3d() const;
0064
0065 Standard_EXPORT double MaxError3d() const;
0066
0067 Standard_EXPORT occ::handle<Geom2d_BSplineCurve> Curve2d() const;
0068
0069 Standard_EXPORT double MaxError2dU() const;
0070
0071
0072
0073 Standard_EXPORT double MaxError2dV() const;
0074
0075
0076
0077
0078
0079
0080
0081
0082 Standard_EXPORT void Perform(const int theMaxSegments,
0083 const int theMaxDegree,
0084 const GeomAbs_Shape theContinuity,
0085 const bool theOnly3d = false,
0086 const bool theOnly2d = false);
0087
0088 protected:
0089
0090
0091
0092
0093
0094
0095
0096 bool isIsoLine(const occ::handle<Adaptor2d_Curve2d>& theC2D,
0097 bool& theIsU,
0098 double& theParam,
0099 bool& theIsForward) const;
0100
0101
0102
0103
0104
0105
0106
0107
0108 bool buildC3dOnIsoLine(const occ::handle<Adaptor2d_Curve2d>& theC2D,
0109 const bool theIsU,
0110 const double theParam,
0111 const bool theIsForward);
0112
0113 private:
0114 Approx_CurveOnSurface& operator=(const Approx_CurveOnSurface&) = delete;
0115
0116 private:
0117
0118 const occ::handle<Adaptor2d_Curve2d> myC2D;
0119
0120
0121 const occ::handle<Adaptor3d_Surface> mySurf;
0122
0123
0124 const double myFirst;
0125
0126
0127 const double myLast;
0128
0129
0130 double myTol;
0131
0132 occ::handle<Geom2d_BSplineCurve> myCurve2d;
0133 occ::handle<Geom_BSplineCurve> myCurve3d;
0134 bool myIsDone;
0135 bool myHasResult;
0136 double myError3d;
0137 double myError2dU;
0138 double myError2dV;
0139 };
0140
0141 #endif