Salome HOME
Make symbols of constraints with fixed distance
[modules/shaper.git] / src / SketcherPrs / SketcherPrs_Rigid.h
1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
2
3 // File:        SketcherPrs_Rigid.h
4 // Created:     16 February 2015
5 // Author:      Vitaly SMETANNIKOV
6
7 #ifndef SketcherPrs_Rigid_H
8 #define SketcherPrs_Rigid_H
9
10 #include "SketcherPrs_SymbolPrs.h"
11 #include <ModelAPI_Object.h>
12
13 class SketchPlugin_Constraint;
14 class SketchPlugin_Sketch;
15
16
17 DEFINE_STANDARD_HANDLE(SketcherPrs_Rigid, SketcherPrs_SymbolPrs)
18
19 /**
20 * \ingroup GUI
21 * A redefinition of standard AIS Interactive Object in order to provide  
22 * presentation of parallel constraint
23 */
24 class SketcherPrs_Rigid: public SketcherPrs_SymbolPrs
25 {
26 public:
27   /// Constructor
28   /// \param theConstraint a constraint feature
29   /// \param thePlane a coordinate plane of current sketch
30   Standard_EXPORT SketcherPrs_Rigid(SketchPlugin_Constraint* theConstraint, 
31                                        const std::shared_ptr<GeomAPI_Ax3>& thePlane);
32
33
34   DEFINE_STANDARD_RTTI(SketcherPrs_Rigid)
35 protected:
36   virtual const char* iconName() const { return "anchor.png"; }
37
38   /// Redefine this function in order to add additiona lines of constraint base
39   /// \param thePrs a presentation
40   /// \param theColor a color of additiona lines
41   virtual void drawLines(const Handle(Prs3d_Presentation)& thePrs, Quantity_Color theColor) const;
42
43   /// Update myPntArray according to presentation positions
44   /// \return true in case of success
45   virtual bool updatePoints(double theStep) const;
46
47 };
48
49 #endif