Salome HOME
#2309 Possibility to hide faces
[modules/shaper.git] / src / ModuleBase / ModuleBase_Tools.h
index 8a179c25adf1bc17ca09c83cd33f9a8590b34041..0cd2ed2dc815842b1185cb53b6e01cb8b30c24ac 100755 (executable)
@@ -45,9 +45,10 @@ class QWidget;
 class QLayout;
 class QDoubleSpinBox;
 class QAction;
+class ModuleBase_IWorkshop;
 class ModuleBase_ParamIntSpinBox;
 class ModuleBase_ParamSpinBox;
-class ModuleBase_IWorkshop;
+class ModuleBase_ViewerPrs;
 
 class GeomAPI_Shape;
 
@@ -212,6 +213,12 @@ MODULEBASE_EXPORT ObjectPtr getObject(const AttributePtr& theAttribute);
 /// \param theObj an object
 MODULEBASE_EXPORT TopAbs_ShapeEnum getCompoundSubType(const TopoDS_Shape& theShape);
 
+/// Returns either presentation shape or shape of BREP owner if it is casted to it
+/// \param thePrs selection presentation
+/// \return shape
+MODULEBASE_EXPORT TopoDS_Shape getSelectedShape(
+  const std::shared_ptr<ModuleBase_ViewerPrs>& thePrs);
+
 /// Returns list of parameters accessible in the active part and partset
 /// \theParameters a list of parameter names
 MODULEBASE_EXPORT void getParameters(QStringList& theParameters);