]> SALOME platform Git repositories - modules/shaper.git/blob - src/SketchPlugin/SketchPlugin_ConstraintCoincidence.cpp
Salome HOME
Fixed validators for Boolean and Intersection
[modules/shaper.git] / src / SketchPlugin / SketchPlugin_ConstraintCoincidence.cpp
1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D -->
2
3 // File:    SketchPlugin_ConstraintCoincidence.cpp
4 // Created: 08 May 2014
5 // Author:  Artem ZHIDKOV
6
7 #include "SketchPlugin_ConstraintCoincidence.h"
8
9 #include <SketcherPrs_Factory.h>
10
11 SketchPlugin_ConstraintCoincidence::SketchPlugin_ConstraintCoincidence()
12 {
13 }
14
15 void SketchPlugin_ConstraintCoincidence::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_ConstraintCoincidence::execute()
22 {
23 }
24
25 AISObjectPtr SketchPlugin_ConstraintCoincidence::getAISObject(AISObjectPtr thePrevious)
26 {
27   if (!sketch())
28     return thePrevious;
29
30   AISObjectPtr anAIS = SketcherPrs_Factory::coincidentConstraint(this, sketch()->coordinatePlane(),
31                                                                  thePrevious);
32   return anAIS;
33 }