File indexing completed on 2026-09-20 09:17:21
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017 #ifndef _DrawTrSurf_BSplineSurface_HeaderFile
0018 #define _DrawTrSurf_BSplineSurface_HeaderFile
0019
0020 #include <Draw_MarkerShape.hxx>
0021 #include <Draw_Color.hxx>
0022 #include <DrawTrSurf_Surface.hxx>
0023
0024 class Geom_BSplineSurface;
0025
0026
0027
0028
0029
0030
0031 class DrawTrSurf_BSplineSurface : public DrawTrSurf_Surface
0032 {
0033 DEFINE_STANDARD_RTTIEXT(DrawTrSurf_BSplineSurface, DrawTrSurf_Surface)
0034 Draw_Drawable3D_FACTORY
0035 public:
0036
0037
0038
0039
0040
0041 Standard_EXPORT DrawTrSurf_BSplineSurface(const occ::handle<Geom_BSplineSurface>& S);
0042
0043
0044 Standard_EXPORT DrawTrSurf_BSplineSurface(const occ::handle<Geom_BSplineSurface>& S,
0045 const Draw_Color& BoundsColor,
0046 const Draw_Color& IsosColor,
0047 const Draw_Color& PolesColor,
0048 const Draw_Color& KnotsColor,
0049 const Draw_MarkerShape KnotsShape,
0050 const int KnotsSize,
0051 const bool ShowPoles,
0052 const bool ShowKnots,
0053 const int Discret,
0054 const double Deflection,
0055 const int DrawMode);
0056
0057
0058 Standard_EXPORT DrawTrSurf_BSplineSurface(const occ::handle<Geom_BSplineSurface>& S,
0059 const int NbUIsos,
0060 const int NbVIsos,
0061 const Draw_Color& BoundsColor,
0062 const Draw_Color& IsosColor,
0063 const Draw_Color& PolesColor,
0064 const Draw_Color& KnotsColor,
0065 const Draw_MarkerShape KnotsShape,
0066 const int KnotsSize,
0067 const bool ShowPoles,
0068 const bool ShowKnots,
0069 const int Discret,
0070 const double Deflection,
0071 const int DrawMode);
0072
0073 Standard_EXPORT void DrawOn(Draw_Display& dis) const override;
0074
0075 void ShowPoles() { drawPoles = true; }
0076
0077 void ShowKnots() { drawKnots = true; }
0078
0079
0080 Standard_EXPORT void ShowIsos(const int Nu, const int Nv) override;
0081
0082
0083 Standard_EXPORT void ShowKnotsIsos();
0084
0085
0086 Standard_EXPORT void ClearIsos() override;
0087
0088 void ClearPoles() { drawPoles = false; }
0089
0090 void ClearKnots() { drawKnots = false; }
0091
0092 Standard_EXPORT void FindPole(const double X,
0093 const double Y,
0094 const Draw_Display& D,
0095 const double Prec,
0096 int& UIndex,
0097 int& VIndex) const;
0098
0099 Standard_EXPORT void FindUKnot(const double X,
0100 const double Y,
0101 const Draw_Display& D,
0102 const double Prec,
0103 int& UIndex) const;
0104
0105 Standard_EXPORT void FindVKnot(const double X,
0106 const double Y,
0107 const Draw_Display& D,
0108 const double Prec,
0109 int& VIndex) const;
0110
0111 void SetPolesColor(const Draw_Color& theColor) { polesLook = theColor; }
0112
0113 void SetKnotsColor(const Draw_Color& theColor) { knotsLook = theColor; }
0114
0115 void SetKnotsShape(const Draw_MarkerShape theShape) { knotsForm = theShape; }
0116
0117 Draw_MarkerShape KnotsShape() const { return knotsForm; }
0118
0119 Draw_Color KnotsColor() const { return knotsLook; }
0120
0121 Draw_Color PolesColor() const { return polesLook; }
0122
0123
0124 Standard_EXPORT occ::handle<Draw_Drawable3D> Copy() const override;
0125
0126 private:
0127 bool drawPoles;
0128 bool drawKnots;
0129 bool knotsIsos;
0130 Draw_MarkerShape knotsForm;
0131 Draw_Color knotsLook;
0132 int knotsDim;
0133 Draw_Color polesLook;
0134 };
0135
0136 #endif