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