1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D -->
3 // File: SketchPlugin_ConstraintPerpendicular.cpp
4 // Created: 26 May 2014
5 // Author: Artem ZHIDKOV
7 #include "SketchPlugin_ConstraintPerpendicular.h"
8 #include "SketchPlugin_ConstraintParallel.h"
10 #include <ModelAPI_AttributeDouble.h>
11 #include <ModelAPI_Data.h>
12 #include <ModelAPI_ResultConstruction.h>
14 #include <SketchPlugin_Line.h>
15 #include <SketchPlugin_Sketch.h>
17 #include <SketcherPrs_Factory.h>
19 #include <GeomDataAPI_Point2D.h>
20 #include <GeomAPI_Pnt2d.h>
21 #include <GeomAPI_Pnt.h>
23 #include <Config_PropManager.h>
25 SketchPlugin_ConstraintPerpendicular::SketchPlugin_ConstraintPerpendicular()
29 void SketchPlugin_ConstraintPerpendicular::initAttributes()
31 data()->addAttribute(SketchPlugin_Constraint::ENTITY_A(), ModelAPI_AttributeRefAttr::typeId());
32 data()->addAttribute(SketchPlugin_Constraint::ENTITY_B(), ModelAPI_AttributeRefAttr::typeId());
35 void SketchPlugin_ConstraintPerpendicular::execute()
39 AISObjectPtr SketchPlugin_ConstraintPerpendicular::getAISObject(AISObjectPtr thePrevious)
44 AISObjectPtr anAIS = SketcherPrs_Factory::perpendicularConstraint(this,
45 sketch()->coordinatePlane(), thePrevious);