File indexing completed on 2026-10-02 09:11:57
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017 #ifndef _DrawTrSurf_Curve2d_HeaderFile
0018 #define _DrawTrSurf_Curve2d_HeaderFile
0019
0020 #include <Draw_Color.hxx>
0021 #include <DrawTrSurf_Drawable.hxx>
0022 #include <Draw_Interpretor.hxx>
0023
0024 class Geom2d_Curve;
0025
0026
0027
0028 class DrawTrSurf_Curve2d : public DrawTrSurf_Drawable
0029 {
0030 DEFINE_STANDARD_RTTIEXT(DrawTrSurf_Curve2d, DrawTrSurf_Drawable)
0031 Draw_Drawable3D_FACTORY
0032 public:
0033
0034 Standard_EXPORT DrawTrSurf_Curve2d(const occ::handle<Geom2d_Curve>& C,
0035 const bool DispOrigin = true);
0036
0037 Standard_EXPORT DrawTrSurf_Curve2d(const occ::handle<Geom2d_Curve>& C,
0038 const Draw_Color& aColor,
0039 const int Discret,
0040 const bool DispOrigin = true,
0041 const bool DispCurvRadius = false,
0042 const double RadiusMax = 1.0e3,
0043 const double RatioOfRadius = 0.1);
0044
0045 Standard_EXPORT void DrawOn(Draw_Display& dis) const override;
0046
0047 occ::handle<Geom2d_Curve> GetCurve() const { return curv; }
0048
0049 void SetColor(const Draw_Color& theColor) { look = theColor; }
0050
0051 void ShowCurvature() { dispcurvradius = true; }
0052
0053 void ClearCurvature() { dispcurvradius = false; }
0054
0055 void SetRadiusMax(const double theRadius) { radiusmax = theRadius; }
0056
0057 void SetRadiusRatio(const double theRatio) { radiusratio = theRatio; }
0058
0059 Draw_Color Color() const { return look; }
0060
0061 double RadiusMax() const { return radiusmax; }
0062
0063 double RadiusRatio() const { return radiusratio; }
0064
0065
0066 Standard_EXPORT occ::handle<Draw_Drawable3D> Copy() const override;
0067
0068
0069 Standard_EXPORT void Dump(Standard_OStream& S) const override;
0070
0071
0072 Standard_EXPORT void Save(Standard_OStream& theStream) const override;
0073
0074
0075 Standard_EXPORT bool Is3D() const override;
0076
0077
0078 Standard_EXPORT void Whatis(Draw_Interpretor& I) const override;
0079
0080 protected:
0081 occ::handle<Geom2d_Curve> curv;
0082 Draw_Color look;
0083 bool disporigin;
0084 bool dispcurvradius;
0085 double radiusmax;
0086 double radiusratio;
0087 };
0088
0089 #endif