]> SALOME platform Git repositories - modules/shaper.git/blob - src/SketchPlugin/SketchPlugin_ConstraintLength.cpp
Salome HOME
b5fe8fca3e3d126c2b837017d352ced5e515f2e1
[modules/shaper.git] / src / SketchPlugin / SketchPlugin_ConstraintLength.cpp
1 // File:    SketchPlugin_ConstraintLength.cpp
2 // Created: 30 May 2014
3 // Author:  Artem ZHIDKOV
4
5 #include "SketchPlugin_ConstraintLength.h"
6
7 #include <ModelAPI_AttributeDouble.h>
8 #include <ModelAPI_Data.h>
9
10 SketchPlugin_ConstraintLength::SketchPlugin_ConstraintLength()
11 {
12 }
13
14 void SketchPlugin_ConstraintLength::initAttributes()
15 {
16   data()->addAttribute(CONSTRAINT_ATTR_VALUE,    ModelAPI_AttributeDouble::type());
17   data()->addAttribute(CONSTRAINT_ATTR_FLYOUT_VALUE, ModelAPI_AttributeDouble::type());
18   data()->addAttribute(CONSTRAINT_ATTR_ENTITY_A, ModelAPI_AttributeRefAttr::type());
19 }
20
21 void SketchPlugin_ConstraintLength::execute()
22 {
23 }
24
25 const boost::shared_ptr<GeomAPI_Shape>&  SketchPlugin_ConstraintLength::preview()
26 {
27   /// \todo Preview for distance constraint
28   return getPreview();
29 }
30