File indexing completed on 2026-10-05 09:21:53
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017 #ifndef _DrawTrSurf_BSplineCurve_HeaderFile
0018 #define _DrawTrSurf_BSplineCurve_HeaderFile
0019
0020 #include <Draw_MarkerShape.hxx>
0021 #include <Draw_Color.hxx>
0022 #include <DrawTrSurf_Curve.hxx>
0023
0024 class Geom_BSplineCurve;
0025
0026 class DrawTrSurf_BSplineCurve : public DrawTrSurf_Curve
0027 {
0028 DEFINE_STANDARD_RTTIEXT(DrawTrSurf_BSplineCurve, DrawTrSurf_Curve)
0029 Draw_Drawable3D_FACTORY
0030 public:
0031
0032 Standard_EXPORT DrawTrSurf_BSplineCurve(const occ::handle<Geom_BSplineCurve>& C);
0033
0034
0035 Standard_EXPORT DrawTrSurf_BSplineCurve(const occ::handle<Geom_BSplineCurve>& C,
0036 const Draw_Color& CurvColor,
0037 const Draw_Color& PolesColor,
0038 const Draw_Color& KnotsColor,
0039 const Draw_MarkerShape KnotsShape,
0040 const int KnotsSize,
0041 const bool ShowPoles,
0042 const bool ShowKnots,
0043 const int Discret,
0044 const double Deflection,
0045 const int DrawMode);
0046
0047 Standard_EXPORT void DrawOn(Draw_Display& dis) const override;
0048
0049 Standard_EXPORT void DrawOn(Draw_Display& dis, const bool ShowPoles, const bool ShowKnots) const;
0050
0051 Standard_EXPORT void DrawOn(Draw_Display& dis,
0052 const double U1,
0053 const double U2,
0054 const int Pindex,
0055 const bool ShowPoles = true,
0056 const bool ShowKnots = true) const;
0057
0058 void ShowPoles() { drawPoles = true; }
0059
0060 void ShowKnots() { drawKnots = true; }
0061
0062 void ClearPoles() { drawPoles = false; }
0063
0064 void ClearKnots() { drawKnots = false; }
0065
0066
0067
0068
0069
0070
0071 Standard_EXPORT void FindPole(const double X,
0072 const double Y,
0073 const Draw_Display& D,
0074 const double Prec,
0075 int& Index) const;
0076
0077 Standard_EXPORT void FindKnot(const double X,
0078 const double Y,
0079 const Draw_Display& D,
0080 const double Prec,
0081 int& Index) const;
0082
0083 void SetPolesColor(const Draw_Color& theColor) { polesLook = theColor; }
0084
0085 void SetKnotsColor(const Draw_Color& theColor) { knotsLook = theColor; }
0086
0087 void SetKnotsShape(const Draw_MarkerShape theShape) { knotsForm = theShape; }
0088
0089 Draw_MarkerShape KnotsShape() const { return knotsForm; }
0090
0091 Draw_Color KnotsColor() const { return knotsLook; }
0092
0093 Draw_Color PolesColor() const { return polesLook; }
0094
0095
0096 Standard_EXPORT occ::handle<Draw_Drawable3D> Copy() const override;
0097
0098 private:
0099 bool drawPoles;
0100 bool drawKnots;
0101 Draw_MarkerShape knotsForm;
0102 Draw_Color knotsLook;
0103 int knotsDim;
0104 Draw_Color polesLook;
0105 };
0106
0107 #endif