1 // Name : SketchAPI_Sketch.cpp
5 // 07/06/16 - Sergey POKHODENKO - Creation of the file
7 //--------------------------------------------------------------------------------------
8 #include "SketchAPI_Sketch.h"
9 //--------------------------------------------------------------------------------------
10 #include <SketchPlugin_Constraint.h>
11 #include <SketchPlugin_ConstraintAngle.h>
12 #include <SketchPlugin_ConstraintCoincidence.h>
13 #include <SketchPlugin_ConstraintCollinear.h>
14 #include <SketchPlugin_ConstraintDistance.h>
15 #include <SketchPlugin_ConstraintEqual.h>
16 #include <SketchPlugin_ConstraintFillet.h>
17 #include <SketchPlugin_ConstraintHorizontal.h>
18 #include <SketchPlugin_ConstraintLength.h>
19 #include <SketchPlugin_ConstraintMiddle.h>
20 #include <SketchPlugin_ConstraintMirror.h>
21 #include <SketchPlugin_ConstraintParallel.h>
22 #include <SketchPlugin_ConstraintPerpendicular.h>
23 #include <SketchPlugin_ConstraintRadius.h>
24 #include <SketchPlugin_ConstraintRigid.h>
25 #include <SketchPlugin_ConstraintTangent.h>
26 #include <SketchPlugin_ConstraintVertical.h>
27 //--------------------------------------------------------------------------------------
28 #include <ModelAPI_CompositeFeature.h>
29 #include <ModelAPI_ResultConstruction.h>
30 #include <ModelHighAPI_RefAttr.h>
31 #include <ModelHighAPI_Selection.h>
32 #include <ModelHighAPI_Tools.h>
33 //--------------------------------------------------------------------------------------
34 #include "SketchAPI_Arc.h"
35 #include "SketchAPI_Circle.h"
36 #include "SketchAPI_Line.h"
37 #include "SketchAPI_Mirror.h"
38 #include "SketchAPI_Point.h"
39 //--------------------------------------------------------------------------------------
40 SketchAPI_Sketch::SketchAPI_Sketch(
41 const std::shared_ptr<ModelAPI_Feature> & theFeature)
42 : ModelHighAPI_Interface(theFeature)
47 SketchAPI_Sketch::SketchAPI_Sketch(
48 const std::shared_ptr<ModelAPI_Feature> & theFeature,
49 const std::shared_ptr<GeomAPI_Ax3> & thePlane)
50 : ModelHighAPI_Interface(theFeature)
57 SketchAPI_Sketch::SketchAPI_Sketch(
58 const std::shared_ptr<ModelAPI_Feature> & theFeature,
59 const ModelHighAPI_Selection & theExternal)
60 : ModelHighAPI_Interface(theFeature)
63 setExternal(theExternal);
67 SketchAPI_Sketch::~SketchAPI_Sketch()
72 //--------------------------------------------------------------------------------------
73 std::shared_ptr<ModelAPI_CompositeFeature> SketchAPI_Sketch::compositeFeature() const
75 return std::dynamic_pointer_cast<ModelAPI_CompositeFeature>(feature());
78 //--------------------------------------------------------------------------------------
79 void SketchAPI_Sketch::setPlane(const std::shared_ptr<GeomAPI_Ax3> & thePlane)
81 fillAttribute(thePlane->origin(), myorigin);
82 fillAttribute(thePlane->dirX(), mydirX);
83 fillAttribute(thePlane->normal(), mynormal);
88 void SketchAPI_Sketch::setExternal(const ModelHighAPI_Selection & theExternal)
90 fillAttribute(theExternal, myexternal);
95 //--------------------------------------------------------------------------------------
96 void SketchAPI_Sketch::setValue(
97 const std::shared_ptr<ModelAPI_Feature> & theConstraint,
98 const ModelHighAPI_Double & theValue)
100 // TODO(spo): check somehow that the feature is a constraint or eliminate crash if the feature have no real attribute VALUE
101 fillAttribute(theValue, theConstraint->real(SketchPlugin_Constraint::VALUE()));
103 // theConstraint->execute();
106 //--------------------------------------------------------------------------------------
107 std::list<ModelHighAPI_Selection> SketchAPI_Sketch::selectFace() const
109 const_cast<SketchAPI_Sketch*>(this)->execute();
111 std::list<ModelHighAPI_Selection> aSelectionList;
113 ResultConstructionPtr aResultConstruction =
114 std::dynamic_pointer_cast<ModelAPI_ResultConstruction>(feature()->firstResult());
115 if (aResultConstruction.get() == NULL)
116 return aSelectionList;
118 for (int anIndex = 0; anIndex < aResultConstruction->facesNum(); ++anIndex) {
119 aSelectionList.push_back(
120 ModelHighAPI_Selection(aResultConstruction,
121 aResultConstruction->face(anIndex)));
124 return aSelectionList;
127 //--------------------------------------------------------------------------------------
128 SketchPtr addSketch(const std::shared_ptr<ModelAPI_Document> & thePart,
129 const std::shared_ptr<GeomAPI_Ax3> & thePlane)
131 // TODO(spo): check that thePart is not empty
132 std::shared_ptr<ModelAPI_Feature> aFeature = thePart->addFeature(SketchAPI_Sketch::ID());
133 return SketchPtr(new SketchAPI_Sketch(aFeature, thePlane));
136 SketchPtr addSketch(const std::shared_ptr<ModelAPI_Document> & thePart,
137 const ModelHighAPI_Selection & theExternal)
139 // TODO(spo): check that thePart is not empty
140 std::shared_ptr<ModelAPI_Feature> aFeature = thePart->addFeature(SketchAPI_Sketch::ID());
141 return SketchPtr(new SketchAPI_Sketch(aFeature, theExternal));
144 SketchPtr addSketch(const std::shared_ptr<ModelAPI_Document> & thePart,
145 const std::string & theExternalName)
147 // TODO(spo): check that thePart is not empty
148 std::shared_ptr<ModelAPI_Feature> aFeature = thePart->addFeature(SketchAPI_Sketch::ID());
149 return SketchPtr(new SketchAPI_Sketch(aFeature, ModelHighAPI_Selection("FACE", theExternalName)));
152 //--------------------------------------------------------------------------------------
153 std::shared_ptr<SketchAPI_Point> SketchAPI_Sketch::addPoint(
154 double theX, double theY)
156 std::shared_ptr<ModelAPI_Feature> aFeature = compositeFeature()->addFeature(SketchPlugin_Point::ID());
157 return PointPtr(new SketchAPI_Point(aFeature, theX, theY));
159 std::shared_ptr<SketchAPI_Point> SketchAPI_Sketch::addPoint(
160 const std::shared_ptr<GeomAPI_Pnt2d> & thePoint)
162 std::shared_ptr<ModelAPI_Feature> aFeature = compositeFeature()->addFeature(SketchPlugin_Point::ID());
163 return PointPtr(new SketchAPI_Point(aFeature, thePoint));
165 std::shared_ptr<SketchAPI_Point> SketchAPI_Sketch::addPoint(const ModelHighAPI_Selection & theExternal)
167 std::shared_ptr<ModelAPI_Feature> aFeature = compositeFeature()->addFeature(SketchPlugin_Point::ID());
168 return PointPtr(new SketchAPI_Point(aFeature, theExternal));
170 std::shared_ptr<SketchAPI_Point> SketchAPI_Sketch::addPoint(const std::string & theExternalName)
172 std::shared_ptr<ModelAPI_Feature> aFeature = compositeFeature()->addFeature(SketchPlugin_Point::ID());
173 return PointPtr(new SketchAPI_Point(aFeature, theExternalName));
176 //--------------------------------------------------------------------------------------
177 std::shared_ptr<SketchAPI_Line> SketchAPI_Sketch::addLine(double theX1, double theY1, double theX2, double theY2)
179 std::shared_ptr<ModelAPI_Feature> aFeature = compositeFeature()->addFeature(SketchPlugin_Line::ID());
180 return LinePtr(new SketchAPI_Line(aFeature, theX1, theY1, theX2, theY2));
182 std::shared_ptr<SketchAPI_Line> SketchAPI_Sketch::addLine(
183 const std::shared_ptr<GeomAPI_Pnt2d> & theStartPoint,
184 const std::shared_ptr<GeomAPI_Pnt2d> & theEndPoint)
186 std::shared_ptr<ModelAPI_Feature> aFeature = compositeFeature()->addFeature(SketchPlugin_Line::ID());
187 return LinePtr(new SketchAPI_Line(aFeature, theStartPoint, theEndPoint));
189 std::shared_ptr<SketchAPI_Line> SketchAPI_Sketch::addLine(const ModelHighAPI_Selection & theExternal)
191 std::shared_ptr<ModelAPI_Feature> aFeature = compositeFeature()->addFeature(SketchPlugin_Line::ID());
192 return LinePtr(new SketchAPI_Line(aFeature, theExternal));
194 std::shared_ptr<SketchAPI_Line> SketchAPI_Sketch::addLine(const std::string & theExternalName)
196 // TODO(spo): Add constraint SketchConstraintRigid like in PythonAPI. Is it necessary?
197 std::shared_ptr<ModelAPI_Feature> aFeature = compositeFeature()->addFeature(SketchPlugin_Line::ID());
198 return LinePtr(new SketchAPI_Line(aFeature, theExternalName));
201 //--------------------------------------------------------------------------------------
202 std::shared_ptr<SketchAPI_Circle> SketchAPI_Sketch::addCircle(double theCenterX,
206 std::shared_ptr<ModelAPI_Feature> aFeature = compositeFeature()->addFeature(SketchPlugin_Circle::ID());
207 return CirclePtr(new SketchAPI_Circle(aFeature, theCenterX, theCenterY, theRadius));
210 std::shared_ptr<SketchAPI_Circle> SketchAPI_Sketch::addCircle(const std::shared_ptr<GeomAPI_Pnt2d>& theCenter,
213 std::shared_ptr<ModelAPI_Feature> aFeature = compositeFeature()->addFeature(SketchPlugin_Circle::ID());
214 return CirclePtr(new SketchAPI_Circle(aFeature, theCenter, theRadius));
217 std::shared_ptr<SketchAPI_Circle> SketchAPI_Sketch::addCircle(double theX1, double theY1,
218 double theX2, double theY2,
219 double theX3, double theY3)
221 std::shared_ptr<ModelAPI_Feature> aFeature = compositeFeature()->addFeature(SketchPlugin_Circle::ID());
222 return CirclePtr(new SketchAPI_Circle(aFeature, theX1, theY1, theX2, theY2, theX3, theY3));
225 std::shared_ptr<SketchAPI_Circle> SketchAPI_Sketch::addCircle(const std::shared_ptr<GeomAPI_Pnt2d>& thePoint1,
226 const std::shared_ptr<GeomAPI_Pnt2d>& thePoint2,
227 const std::shared_ptr<GeomAPI_Pnt2d>& thePoint3)
229 std::shared_ptr<ModelAPI_Feature> aFeature = compositeFeature()->addFeature(SketchPlugin_Circle::ID());
230 return CirclePtr(new SketchAPI_Circle(aFeature, thePoint1, thePoint2, thePoint3));
233 std::shared_ptr<SketchAPI_Circle> SketchAPI_Sketch::addCircle(const ModelHighAPI_Selection & theExternal)
235 std::shared_ptr<ModelAPI_Feature> aFeature = compositeFeature()->addFeature(SketchPlugin_Circle::ID());
236 return CirclePtr(new SketchAPI_Circle(aFeature, theExternal));
239 std::shared_ptr<SketchAPI_Circle> SketchAPI_Sketch::addCircle(const std::string & theExternalName)
241 // TODO(spo): Add constraint SketchConstraintRigid like in PythonAPI. Is it necessary?
242 std::shared_ptr<ModelAPI_Feature> aFeature = compositeFeature()->addFeature(SketchPlugin_Circle::ID());
243 return CirclePtr(new SketchAPI_Circle(aFeature, theExternalName));
246 //--------------------------------------------------------------------------------------
247 std::shared_ptr<SketchAPI_Arc> SketchAPI_Sketch::addArc(double theCenterX, double theCenterY,
248 double theStartX, double theStartY,
249 double theEndX, double theEndY,
252 std::shared_ptr<ModelAPI_Feature> aFeature = compositeFeature()->addFeature(SketchPlugin_Arc::ID());
253 return ArcPtr(new SketchAPI_Arc(aFeature,
254 theCenterX, theCenterY,
255 theStartX, theStartY,
260 std::shared_ptr<SketchAPI_Arc> SketchAPI_Sketch::addArc(const std::shared_ptr<GeomAPI_Pnt2d>& theCenter,
261 const std::shared_ptr<GeomAPI_Pnt2d>& theStart,
262 const std::shared_ptr<GeomAPI_Pnt2d>& theEnd,
265 std::shared_ptr<ModelAPI_Feature> aFeature = compositeFeature()->addFeature(SketchPlugin_Arc::ID());
266 return ArcPtr(new SketchAPI_Arc(aFeature, theCenter, theStart, theEnd, theInversed));
269 std::shared_ptr<SketchAPI_Arc> SketchAPI_Sketch::addArc(double theStartX, double theStartY,
270 double theEndX, double theEndY,
271 double thePassedX, double thePassedY)
273 std::shared_ptr<ModelAPI_Feature> aFeature = compositeFeature()->addFeature(SketchPlugin_Arc::ID());
274 return ArcPtr(new SketchAPI_Arc(aFeature,
275 theStartX, theStartY,
277 thePassedX, thePassedY));
280 std::shared_ptr<SketchAPI_Arc> SketchAPI_Sketch::addArc(const std::shared_ptr<GeomAPI_Pnt2d>& theStart,
281 const std::shared_ptr<GeomAPI_Pnt2d>& theEnd,
282 const std::shared_ptr<GeomAPI_Pnt2d>& thePassed)
284 std::shared_ptr<ModelAPI_Feature> aFeature = compositeFeature()->addFeature(SketchPlugin_Arc::ID());
285 return ArcPtr(new SketchAPI_Arc(aFeature, theStart, theEnd, thePassed));
288 std::shared_ptr<SketchAPI_Arc> SketchAPI_Sketch::addArc(const ModelHighAPI_RefAttr& theTangentPoint,
289 double theEndX, double theEndY,
292 std::shared_ptr<ModelAPI_Feature> aFeature = compositeFeature()->addFeature(SketchPlugin_Arc::ID());
293 return ArcPtr(new SketchAPI_Arc(aFeature, theTangentPoint, theEndX, theEndY, theInversed));
296 std::shared_ptr<SketchAPI_Arc> SketchAPI_Sketch::addArc(const ModelHighAPI_RefAttr& theTangentPoint,
297 const std::shared_ptr<GeomAPI_Pnt2d>& theEnd,
300 std::shared_ptr<ModelAPI_Feature> aFeature = compositeFeature()->addFeature(SketchPlugin_Arc::ID());
301 return ArcPtr(new SketchAPI_Arc(aFeature, theTangentPoint, theEnd, theInversed));
304 std::shared_ptr<SketchAPI_Arc> SketchAPI_Sketch::addArc(const ModelHighAPI_Selection & theExternal)
306 std::shared_ptr<ModelAPI_Feature> aFeature = compositeFeature()->addFeature(SketchPlugin_Arc::ID());
307 return ArcPtr(new SketchAPI_Arc(aFeature, theExternal));
310 std::shared_ptr<SketchAPI_Arc> SketchAPI_Sketch::addArc(const std::string & theExternalName)
312 // TODO(spo): Add constraint SketchConstraintRigid like in PythonAPI. Is it necessary?
313 std::shared_ptr<ModelAPI_Feature> aFeature = compositeFeature()->addFeature(SketchPlugin_Arc::ID());
314 return ArcPtr(new SketchAPI_Arc(aFeature, theExternalName));
317 //--------------------------------------------------------------------------------------
318 std::shared_ptr<SketchAPI_Mirror> SketchAPI_Sketch::addMirror(
319 const ModelHighAPI_RefAttr & theMirrorLine,
320 const std::list<std::shared_ptr<ModelAPI_Object> > & theObjects)
322 std::shared_ptr<ModelAPI_Feature> aFeature = compositeFeature()->addFeature(SketchPlugin_ConstraintMirror::ID());
323 return MirrorPtr(new SketchAPI_Mirror(aFeature, theMirrorLine, theObjects));
326 //--------------------------------------------------------------------------------------
327 std::shared_ptr<ModelAPI_Feature> SketchAPI_Sketch::setAngle(
328 const ModelHighAPI_RefAttr & theLine1,
329 const ModelHighAPI_RefAttr & theLine2,
330 const ModelHighAPI_Double & theValue)
332 // TODO(spo): is support of angle type necessary?
333 std::shared_ptr<ModelAPI_Feature> aFeature =
334 compositeFeature()->addFeature(SketchPlugin_ConstraintAngle::ID());
335 fillAttribute(theLine1, aFeature->refattr(SketchPlugin_Constraint::ENTITY_A()));
336 fillAttribute(theLine2, aFeature->refattr(SketchPlugin_Constraint::ENTITY_B()));
337 fillAttribute(theValue, aFeature->real(SketchPlugin_Constraint::VALUE()));
342 std::shared_ptr<ModelAPI_Feature> SketchAPI_Sketch::setCoincident(
343 const ModelHighAPI_RefAttr & thePoint1,
344 const ModelHighAPI_RefAttr & thePoint2)
346 std::shared_ptr<ModelAPI_Feature> aFeature =
347 compositeFeature()->addFeature(SketchPlugin_ConstraintCoincidence::ID());
348 fillAttribute(thePoint1, aFeature->refattr(SketchPlugin_Constraint::ENTITY_A()));
349 fillAttribute(thePoint2, aFeature->refattr(SketchPlugin_Constraint::ENTITY_B()));
354 std::shared_ptr<ModelAPI_Feature> SketchAPI_Sketch::setCollinear(
355 const ModelHighAPI_RefAttr & theLine1,
356 const ModelHighAPI_RefAttr & theLine2)
358 std::shared_ptr<ModelAPI_Feature> aFeature =
359 compositeFeature()->addFeature(SketchPlugin_ConstraintCollinear::ID());
360 fillAttribute(theLine1, aFeature->refattr(SketchPlugin_Constraint::ENTITY_A()));
361 fillAttribute(theLine2, aFeature->refattr(SketchPlugin_Constraint::ENTITY_B()));
366 std::shared_ptr<ModelAPI_Feature> SketchAPI_Sketch::setDistance(
367 const ModelHighAPI_RefAttr & thePoint,
368 const ModelHighAPI_RefAttr & thePointOrLine,
369 const ModelHighAPI_Double & theValue)
371 std::shared_ptr<ModelAPI_Feature> aFeature =
372 compositeFeature()->addFeature(SketchPlugin_ConstraintDistance::ID());
373 fillAttribute(thePoint, aFeature->refattr(SketchPlugin_Constraint::ENTITY_A()));
374 fillAttribute(thePointOrLine, aFeature->refattr(SketchPlugin_Constraint::ENTITY_B()));
375 fillAttribute(theValue, aFeature->real(SketchPlugin_Constraint::VALUE()));
380 std::shared_ptr<ModelAPI_Feature> SketchAPI_Sketch::setEqual(
381 const ModelHighAPI_RefAttr & theObject1,
382 const ModelHighAPI_RefAttr & theObject2)
384 std::shared_ptr<ModelAPI_Feature> aFeature =
385 compositeFeature()->addFeature(SketchPlugin_ConstraintEqual::ID());
386 fillAttribute(theObject1, aFeature->refattr(SketchPlugin_Constraint::ENTITY_A()));
387 fillAttribute(theObject2, aFeature->refattr(SketchPlugin_Constraint::ENTITY_B()));
392 std::shared_ptr<ModelAPI_Feature> SketchAPI_Sketch::setFillet(
393 const std::list<ModelHighAPI_RefAttr> & thePoints,
394 const ModelHighAPI_Double & theRadius)
396 std::shared_ptr<ModelAPI_Feature> aFeature =
397 compositeFeature()->addFeature(SketchPlugin_ConstraintFillet::ID());
398 fillAttribute(thePoints, aFeature->data()->refattrlist(SketchPlugin_Constraint::ENTITY_A()));
399 fillAttribute(theRadius, aFeature->real(SketchPlugin_Constraint::VALUE()));
404 std::shared_ptr<ModelAPI_Feature> SketchAPI_Sketch::setHorizontal(
405 const ModelHighAPI_RefAttr & theLine)
407 std::shared_ptr<ModelAPI_Feature> aFeature =
408 compositeFeature()->addFeature(SketchPlugin_ConstraintHorizontal::ID());
409 fillAttribute(theLine, aFeature->refattr(SketchPlugin_Constraint::ENTITY_A()));
414 std::shared_ptr<ModelAPI_Feature> SketchAPI_Sketch::setLength(
415 const ModelHighAPI_RefAttr & theLine,
416 const ModelHighAPI_Double & theValue)
418 std::shared_ptr<ModelAPI_Feature> aFeature =
419 compositeFeature()->addFeature(SketchPlugin_ConstraintLength::ID());
420 fillAttribute(theLine, aFeature->refattr(SketchPlugin_Constraint::ENTITY_A()));
421 fillAttribute(theValue, aFeature->real(SketchPlugin_Constraint::VALUE()));
426 std::shared_ptr<ModelAPI_Feature> SketchAPI_Sketch::setMiddlePoint(
427 const ModelHighAPI_RefAttr & thePoint,
428 const ModelHighAPI_RefAttr & theLine)
430 std::shared_ptr<ModelAPI_Feature> aFeature =
431 compositeFeature()->addFeature(SketchPlugin_ConstraintMiddle::ID());
432 fillAttribute(thePoint, aFeature->refattr(SketchPlugin_Constraint::ENTITY_A()));
433 fillAttribute(theLine, aFeature->refattr(SketchPlugin_Constraint::ENTITY_B()));
438 std::shared_ptr<ModelAPI_Feature> SketchAPI_Sketch::setParallel(
439 const ModelHighAPI_RefAttr & theLine1,
440 const ModelHighAPI_RefAttr & theLine2)
442 std::shared_ptr<ModelAPI_Feature> aFeature =
443 compositeFeature()->addFeature(SketchPlugin_ConstraintParallel::ID());
444 fillAttribute(theLine1, aFeature->refattr(SketchPlugin_Constraint::ENTITY_A()));
445 fillAttribute(theLine2, aFeature->refattr(SketchPlugin_Constraint::ENTITY_B()));
450 std::shared_ptr<ModelAPI_Feature> SketchAPI_Sketch::setPerpendicular(
451 const ModelHighAPI_RefAttr & theLine1,
452 const ModelHighAPI_RefAttr & theLine2)
454 std::shared_ptr<ModelAPI_Feature> aFeature =
455 compositeFeature()->addFeature(SketchPlugin_ConstraintPerpendicular::ID());
456 fillAttribute(theLine1, aFeature->refattr(SketchPlugin_Constraint::ENTITY_A()));
457 fillAttribute(theLine2, aFeature->refattr(SketchPlugin_Constraint::ENTITY_B()));
462 std::shared_ptr<ModelAPI_Feature> SketchAPI_Sketch::setRadius(
463 const ModelHighAPI_RefAttr & theCircleOrArc,
464 const ModelHighAPI_Double & theValue)
466 std::shared_ptr<ModelAPI_Feature> aFeature =
467 compositeFeature()->addFeature(SketchPlugin_ConstraintRadius::ID());
468 fillAttribute(theCircleOrArc, aFeature->refattr(SketchPlugin_Constraint::ENTITY_A()));
469 fillAttribute(theValue, aFeature->real(SketchPlugin_Constraint::VALUE()));
474 std::shared_ptr<ModelAPI_Feature> SketchAPI_Sketch::setRigid(
475 const ModelHighAPI_RefAttr & theObject)
477 // TODO(spo): should it be renamed to Fixed?
478 std::shared_ptr<ModelAPI_Feature> aFeature =
479 compositeFeature()->addFeature(SketchPlugin_ConstraintRigid::ID());
480 fillAttribute(theObject, aFeature->refattr(SketchPlugin_Constraint::ENTITY_A()));
485 std::shared_ptr<ModelAPI_Feature> SketchAPI_Sketch::setTangent(
486 const ModelHighAPI_RefAttr & theLine,
487 const ModelHighAPI_RefAttr & theCircle)
489 std::shared_ptr<ModelAPI_Feature> aFeature =
490 compositeFeature()->addFeature(SketchPlugin_ConstraintTangent::ID());
491 fillAttribute(theLine, aFeature->refattr(SketchPlugin_Constraint::ENTITY_A()));
492 fillAttribute(theCircle, aFeature->refattr(SketchPlugin_Constraint::ENTITY_B()));
497 std::shared_ptr<ModelAPI_Feature> SketchAPI_Sketch::setVertical(
498 const ModelHighAPI_RefAttr & theLine)
500 std::shared_ptr<ModelAPI_Feature> aFeature =
501 compositeFeature()->addFeature(SketchPlugin_ConstraintVertical::ID());
502 fillAttribute(theLine, aFeature->refattr(SketchPlugin_Constraint::ENTITY_A()));
507 //--------------------------------------------------------------------------------------