File indexing completed on 2025-01-18 10:03:25
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 DEFINE_STANDARD_HANDLE(DrawTrSurf_Curve2d, DrawTrSurf_Drawable)
0027
0028
0029
0030 class DrawTrSurf_Curve2d : public DrawTrSurf_Drawable
0031 {
0032 DEFINE_STANDARD_RTTIEXT(DrawTrSurf_Curve2d, DrawTrSurf_Drawable)
0033 Draw_Drawable3D_FACTORY
0034 public:
0035
0036
0037 Standard_EXPORT DrawTrSurf_Curve2d (const Handle(Geom2d_Curve)& C, const Standard_Boolean DispOrigin = Standard_True);
0038
0039 Standard_EXPORT DrawTrSurf_Curve2d (const Handle(Geom2d_Curve)& C,
0040 const Draw_Color& aColor, const Standard_Integer Discret,
0041 const Standard_Boolean DispOrigin = Standard_True, const Standard_Boolean DispCurvRadius = Standard_False,
0042 const Standard_Real RadiusMax = 1.0e3, const Standard_Real RatioOfRadius = 0.1);
0043
0044 Standard_EXPORT virtual void DrawOn (Draw_Display& dis) const Standard_OVERRIDE;
0045
0046 Handle(Geom2d_Curve) GetCurve() const { return curv; }
0047
0048 void SetColor (const Draw_Color& theColor) { look = theColor; }
0049
0050 void ShowCurvature() { dispcurvradius = Standard_True; }
0051
0052 void ClearCurvature() { dispcurvradius = Standard_False; }
0053
0054 void SetRadiusMax (const Standard_Real theRadius) { radiusmax = theRadius; }
0055
0056 void SetRadiusRatio (const Standard_Real theRatio) { radiusratio = theRatio; }
0057
0058 Draw_Color Color() const { return look; }
0059
0060 Standard_Real RadiusMax() const { return radiusmax; }
0061
0062 Standard_Real RadiusRatio() const { return radiusratio; }
0063
0064
0065 Standard_EXPORT virtual Handle(Draw_Drawable3D) Copy() const Standard_OVERRIDE;
0066
0067
0068 Standard_EXPORT virtual void Dump (Standard_OStream& S) const Standard_OVERRIDE;
0069
0070
0071 Standard_EXPORT virtual void Save (Standard_OStream& theStream) const Standard_OVERRIDE;
0072
0073
0074 Standard_EXPORT virtual Standard_Boolean Is3D() const Standard_OVERRIDE;
0075
0076
0077 Standard_EXPORT virtual void Whatis (Draw_Interpretor& I) const Standard_OVERRIDE;
0078
0079 protected:
0080
0081 Handle(Geom2d_Curve) curv;
0082 Draw_Color look;
0083 Standard_Boolean disporigin;
0084 Standard_Boolean dispcurvradius;
0085 Standard_Real radiusmax;
0086 Standard_Real radiusratio;
0087
0088 };
0089
0090 #endif