]> SALOME platform Git repositories - modules/shaper.git/blob - src/SketchPlugin/SketchPlugin_ConstraintParallel.cpp
Salome HOME
Fixed validators for Boolean and Intersection
[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   //data()->addAttribute(SketchPlugin_Constraint::FLYOUT_VALUE_PNT(), GeomDataAPI_Point2D::typeId());
35 }
36
37 void SketchPlugin_ConstraintParallel::execute()
38 {
39 }
40
41 AISObjectPtr SketchPlugin_ConstraintParallel::getAISObject(AISObjectPtr thePrevious)
42 {
43   if (!sketch())
44     return thePrevious;
45
46   AISObjectPtr anAIS = SketcherPrs_Factory::parallelConstraint(this, sketch()->coordinatePlane(),
47                                                                thePrevious);
48   return anAIS;
49 }
50
51