0031642: Visualization - crash in Graphic3d_Structure::SetVisual() on redisplaying...
[occt.git] / src / GeometryTest / GeometryTest_DrawableQualifiedCurve2d.hxx
1 // Created on: 2017-06-16
2 // Created by: Natalia ERMOLAEVA
3 // Copyright (c) 2017 OPEN CASCADE SAS
4 //
5 // This file is part of Open CASCADE Technology software library.
6 //
7 // This library is free software; you can redistribute it and/or modify it under
8 // the terms of the GNU Lesser General Public License version 2.1 as published
9 // by the Free Software Foundation, with special exception defined in the file
10 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
11 // distribution for complete text of the license and disclaimer of any warranty.
12 //
13 // Alternatively, this file may be used under the terms of Open CASCADE
14 // commercial license or contractual agreement.
15
16 #ifndef _GeometryTest_DrawableQualifiedCirc_HeaderFile
17 #define _GeometryTest_DrawableQualifiedCirc_HeaderFile
18
19 #include <Standard.hxx>
20 #include <DrawTrSurf_Curve2d.hxx>
21 #include <GccEnt_Position.hxx>
22
23 class Geom2d_Curve;
24
25 class GeometryTest_DrawableQualifiedCurve2d;
26 DEFINE_STANDARD_HANDLE(GeometryTest_DrawableQualifiedCurve2d, DrawTrSurf_Curve)
27
28 //! Create geom curve drawable presentation with the position of a solution of a construction algorithm.
29 class GeometryTest_DrawableQualifiedCurve2d : public DrawTrSurf_Curve2d
30 {
31
32 public:
33
34
35   //! Creates a drawable curve from a curve of package Geom.
36   Standard_EXPORT GeometryTest_DrawableQualifiedCurve2d (const Handle(Geom2d_Curve)& theCurve,
37                                                          const GccEnt_Position thePosition,
38                                                          const Standard_Boolean theDispOrigin = Standard_True);
39   
40   //! Creates a drawable curve from a curve of package Geom.
41   Standard_EXPORT GeometryTest_DrawableQualifiedCurve2d (const Handle(Geom2d_Curve)& theCurve,
42                                                          const Draw_Color& theColor,
43                                                          const Standard_Integer theDiscret,
44                                                          const GccEnt_Position thePosition,
45                                                          const Standard_Boolean theDispOrigin = Standard_True,
46                                                          const Standard_Boolean theDispCurvRadius = Standard_False,
47                                                          const Standard_Real theRadiusMax = 1.0e3,
48                                                          const Standard_Real theRatioOfRadius = 0.1);
49
50   //! \returns position of a solution
51   GccEnt_Position GetPosition() const { return myPosition; }
52   
53   //! Sets position of a solution
54   //! \param thePosition the value
55   void SetPosition (const GccEnt_Position thePosition) { myPosition = thePosition; }
56
57   //! Paints the drawable presentation in given display
58   //! \param theDisplay
59   Standard_EXPORT void DrawOn (Draw_Display& theDisplay) const Standard_OVERRIDE;
60
61   //! For variable dump.
62   Standard_EXPORT virtual void Dump (Standard_OStream& S) const Standard_OVERRIDE;
63
64   //! For variable whatis command. Set  as a result  the
65   //! type of the variable.
66   Standard_EXPORT virtual void Whatis (Draw_Interpretor& I) const Standard_OVERRIDE;
67
68   DEFINE_STANDARD_RTTIEXT(GeometryTest_DrawableQualifiedCurve2d, DrawTrSurf_Curve2d)
69
70 protected:
71
72
73
74
75 private:
76
77
78   GccEnt_Position myPosition;
79
80 };
81
82
83
84
85
86
87
88 #endif // _GeometryTest_DrawableQualifiedCirc_HeaderFile