]> SALOME platform Git repositories - modules/shaper.git/blob - src/PartSet/PartSet_CenterPrs.h
Salome HOME
Implementation of a task "Show centers of external circular objects in current sketcher"
[modules/shaper.git] / src / PartSet / PartSet_CenterPrs.h
1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
2
3 // File:        PartSet_CenterPrs.h
4 // Created:     25 April 2017
5 // Author:      Vitaly SMETANNIKOV
6
7 #ifndef PartSet_CenterPrs_H
8 #define PartSet_CenterPrs_H
9
10 #include <ModelAPI_Object.h>
11 #include <ModelAPI_AttributeSelection.h>
12 #include <GeomAPI_Edge.h>
13
14 #include <AIS_Point.hxx>
15 #include <Standard_DefineHandle.hxx>
16 #include <gp_Pnt.hxx>
17
18 DEFINE_STANDARD_HANDLE(PartSet_CenterPrs, AIS_Point)
19
20 /**
21 * \ingroup GUI
22 * A presentation class for displaying of centers of external curcular objects in a sketch
23 */
24 class PartSet_CenterPrs: public AIS_Point
25 {
26 public:
27   /// Constructor
28   /// \param theObject an object with circular edge
29   /// \param theEdge a circular edge
30   /// \param theCenter a center point of the circular edge
31   /// \param theType a type of the center
32   Standard_EXPORT PartSet_CenterPrs(const ObjectPtr& theObject,
33                                     const GeomEdgePtr& theEdge,
34                                     const gp_Pnt& theCenter,
35                                     ModelAPI_AttributeSelection::CenterType theType);
36
37   /// Returns an Object which contains the circular edge
38   ObjectPtr object() const { return myObject; }
39
40   /// Returns a circular edge shape
41   GeomEdgePtr edge() const { return myEdge; }
42
43   /// Returns type of the center
44   ModelAPI_AttributeSelection::CenterType centerType() const { return myCenterType; }
45
46   DEFINE_STANDARD_RTTIEXT(PartSet_CenterPrs, AIS_Point)
47
48 private:
49   ObjectPtr myObject;
50   GeomEdgePtr myEdge;
51   ModelAPI_AttributeSelection::CenterType myCenterType;
52 };
53
54 #endif