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>
13 AISObjectPtr SketcherPrs_Factory::coincidentConstraint(SketchPlugin_Constraint* theConstraint,
14 const std::shared_ptr<GeomAPI_Ax3>& thePlane)
16 std::shared_ptr<GeomAPI_AISObject> aAISObj = AISObjectPtr(new GeomAPI_AISObject());
17 Handle(SketcherPrs_Coincident) aPrs = new SketcherPrs_Coincident(theConstraint, thePlane);
18 aAISObj->setImpl(new Handle(AIS_InteractiveObject)(aPrs));
23 AISObjectPtr SketcherPrs_Factory::parallelConstraint(SketchPlugin_Constraint* theConstraint,
24 const std::shared_ptr<GeomAPI_Ax3>& thePlane)
26 std::shared_ptr<GeomAPI_AISObject> aAISObj = AISObjectPtr(new GeomAPI_AISObject());
27 Handle(SketcherPrs_Parallel) aPrs = new SketcherPrs_Parallel(theConstraint, thePlane);
28 aAISObj->setImpl(new Handle(AIS_InteractiveObject)(aPrs));