]> SALOME platform Git repositories - modules/shaper.git/blob - src/SketchPlugin/SketchPlugin_ConstraintParallel.cpp
Salome HOME
Revert change for MacroArc attribute names
[modules/shaper.git] / src / SketchPlugin / SketchPlugin_ConstraintParallel.cpp
1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D -->
2
3 // File:    SketchPlugin_ConstraintParallel.cpp
4 // Created: 26 May 2014
5 // Author:  Artem ZHIDKOV
6
7 #include "SketchPlugin_ConstraintParallel.h"
8
9 #include <ModelAPI_AttributeDouble.h>
10 #include <ModelAPI_Data.h>
11 #include <ModelAPI_ResultConstruction.h>
12
13 #include <SketchPlugin_Line.h>
14 #include <SketchPlugin_Sketch.h>
15
16 #include <SketcherPrs_Factory.h>
17
18 #include <GeomDataAPI_Point2D.h>
19 #include <GeomAPI_Pnt2d.h>
20 #include <GeomAPI_Pnt.h>
21 #include <GeomDataAPI_Dir.h>
22 #include <GeomDataAPI_Point.h>
23
24 #include <Config_PropManager.h>
25
26 SketchPlugin_ConstraintParallel::SketchPlugin_ConstraintParallel()
27 {
28 }
29
30 void SketchPlugin_ConstraintParallel::initAttributes()
31 {
32   data()->addAttribute(SketchPlugin_Constraint::ENTITY_A(), ModelAPI_AttributeRefAttr::typeId());
33   data()->addAttribute(SketchPlugin_Constraint::ENTITY_B(), ModelAPI_AttributeRefAttr::typeId());
34 }
35
36 void SketchPlugin_ConstraintParallel::execute()
37 {
38 }
39
40 AISObjectPtr SketchPlugin_ConstraintParallel::getAISObject(AISObjectPtr thePrevious)
41 {
42   if (!sketch())
43     return thePrevious;
44
45   AISObjectPtr anAIS = SketcherPrs_Factory::parallelConstraint(this, sketch()->coordinatePlane(),
46                                                                thePrevious);
47   return anAIS;
48 }
49
50