1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
3 // File: SketcherPrs_Factory.cpp
4 // Created: 13 February 2015
5 // Author: Vitaly SMETANNIKOV
7 #include "SketcherPrs_Factory.h"
9 #include <SketcherPrs_Coincident.h>
10 #include <SketcherPrs_Parallel.h>
11 #include <SketcherPrs_Perpendicular.h>
14 AISObjectPtr SketcherPrs_Factory::coincidentConstraint(SketchPlugin_Constraint* theConstraint,
15 const std::shared_ptr<GeomAPI_Ax3>& thePlane)
17 std::shared_ptr<GeomAPI_AISObject> aAISObj = AISObjectPtr(new GeomAPI_AISObject());
18 Handle(SketcherPrs_Coincident) aPrs = new SketcherPrs_Coincident(theConstraint, thePlane);
19 aAISObj->setImpl(new Handle(AIS_InteractiveObject)(aPrs));
24 AISObjectPtr SketcherPrs_Factory::parallelConstraint(SketchPlugin_Constraint* theConstraint,
25 const std::shared_ptr<GeomAPI_Ax3>& thePlane)
27 std::shared_ptr<GeomAPI_AISObject> aAISObj = AISObjectPtr(new GeomAPI_AISObject());
28 Handle(SketcherPrs_Parallel) aPrs = new SketcherPrs_Parallel(theConstraint, thePlane);
29 aAISObj->setImpl(new Handle(AIS_InteractiveObject)(aPrs));
33 AISObjectPtr SketcherPrs_Factory::perpendicularConstraint(SketchPlugin_Constraint* theConstraint,
34 const std::shared_ptr<GeomAPI_Ax3>& thePlane)
36 std::shared_ptr<GeomAPI_AISObject> aAISObj = AISObjectPtr(new GeomAPI_AISObject());
37 Handle(SketcherPrs_Perpendicular) aPrs = new SketcherPrs_Perpendicular(theConstraint, thePlane);
38 aAISObj->setImpl(new Handle(AIS_InteractiveObject)(aPrs));