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