1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
3 // File: PartSet_ExternalPointsMgr.h
4 // Created: 26 April 2017
5 // Author: Vitaly SMETANNIKOV
7 #ifndef PartSet_ExternalPointsMgr_H
8 #define PartSet_ExternalPointsMgr_H
11 #include <ModelAPI_CompositeFeature.h>
12 #include <ModelAPI_Result.h>
13 #include <GeomAPI_Pln.h>
14 #include <GeomAPI_AISObject.h>
19 class ModuleBase_ViewerPrs;
20 class ModuleBase_IWorkshop;
25 * A class to manage display of presentations of center points of circular
26 * edges outside of a current sketcher
28 class PartSet_ExternalPointsMgr: public QObject
32 PartSet_ExternalPointsMgr(ModuleBase_IWorkshop* theWorkshop, const CompositeFeaturePtr& theSketch);
34 virtual ~PartSet_ExternalPointsMgr();
38 * A slot which processes display of object
39 * \param theObj the displayed object
40 * \param theAIS its presentation
42 void onDisplayObject(ObjectPtr theObj, AISObjectPtr theAIS);
45 * A slot which processes erase of object
46 * \param theObj the displayed object
47 * \param theAIS its presentation
49 void onEraseObject(ObjectPtr theObj, AISObjectPtr theAIS);
53 * Returns list of presentations which have displayed shapes with circular edges
54 * (circles, arcs) which are in pane of of the given sketch
55 * \param theSketch - the sketch
57 QList<std::shared_ptr<ModuleBase_ViewerPrs>> findCircularEdgesInPlane();
59 /// Creates presentations of centers
60 void updateCenterPresentations();
62 /// Returns plane of the current sketch
63 GeomPlanePtr plane() const;
65 bool isSketchObject(const ObjectPtr& theRes) const;
68 ModuleBase_IWorkshop* myWorkshop;
69 CompositeFeaturePtr mySketch;
71 typedef QList<AISObjectPtr> ListOfAIS;
73 QMap<ObjectPtr, ListOfAIS> myPresentations;