1 // File: SketchPlugin_ConstraintDistance.cpp
2 // Created: 23 May 2014
3 // Author: Artem ZHIDKOV
5 #include "SketchPlugin_ConstraintDistance.h"
7 #include "GeomDataAPI_Point2D.h"
9 #include <ModelAPI_AttributeDouble.h>
10 #include <ModelAPI_Data.h>
11 #include <SketchPlugin_Point.h>
13 SketchPlugin_ConstraintDistance::SketchPlugin_ConstraintDistance()
17 void SketchPlugin_ConstraintDistance::initAttributes()
19 data()->addAttribute(CONSTRAINT_ATTR_VALUE, ModelAPI_AttributeDouble::type());
20 data()->addAttribute(CONSTRAINT_ATTR_FLYOUT_VALUE_PNT, GeomDataAPI_Point2D::type());
21 data()->addAttribute(CONSTRAINT_ATTR_ENTITY_A, ModelAPI_AttributeRefAttr::type());
22 data()->addAttribute(CONSTRAINT_ATTR_ENTITY_B, ModelAPI_AttributeRefAttr::type());
25 void SketchPlugin_ConstraintDistance::execute()
29 const boost::shared_ptr<GeomAPI_Shape>& SketchPlugin_ConstraintDistance::preview()
31 /// \todo Preview for distance constraint