]> SALOME platform Git repositories - modules/shaper.git/blob - src/SketchPlugin/SketchPlugin_ConstraintMiddle.cpp
Salome HOME
Revert change for MacroArc attribute names
[modules/shaper.git] / src / SketchPlugin / SketchPlugin_ConstraintMiddle.cpp
1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D -->
2
3 // File:    SketchPlugin_ConstraintMiddle.cpp
4 // Created: 26 May 2014
5 // Author:  Artem ZHIDKOV
6
7 #include "SketchPlugin_ConstraintMiddle.h"
8
9 #include "SketcherPrs_Factory.h"
10
11 SketchPlugin_ConstraintMiddle::SketchPlugin_ConstraintMiddle()
12 {
13 }
14
15 void SketchPlugin_ConstraintMiddle::initAttributes()
16 {
17   data()->addAttribute(SketchPlugin_Constraint::ENTITY_A(), ModelAPI_AttributeRefAttr::typeId());
18   data()->addAttribute(SketchPlugin_Constraint::ENTITY_B(), ModelAPI_AttributeRefAttr::typeId());
19 }
20
21 void SketchPlugin_ConstraintMiddle::execute()
22 {
23 }
24
25 AISObjectPtr SketchPlugin_ConstraintMiddle::getAISObject(AISObjectPtr thePrevious)
26 {
27   if (!sketch())
28     return thePrevious;
29
30   AISObjectPtr anAIS = SketcherPrs_Factory::middleConstraint(this, sketch()->coordinatePlane(),
31                                                              thePrevious);
32   return anAIS;
33 }
34
35