1 // Copyright (C) 2007-2019 CEA/DEN, EDF R&D, OPEN CASCADE
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License, or (at your option) any later version.
8 // This library is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 // Lesser General Public License for more details.
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
21 // File : GeomSelectionTools.h
22 // Authors : Nicolas GEIMER (OCC)
25 #ifndef _GEOMSELECTIONTOOLS_H_
26 #define _GEOMSELECTIONTOOLS_H_
28 #include "SMESH_PluginUtils.h"
30 #include <SALOMEDSClient.hxx>
31 #include <SALOME_InteractiveObject.hxx>
32 #include <SALOME_ListIO.hxx>
33 #include <SalomeApp_Application.h>
35 #include <TopoDS_Shape.hxx>
36 #include <GeomAbs_SurfaceType.hxx>
38 class LightApp_SelectionMgr;
42 * The GeomSelectionTools class gives high level tools to select Geom (and other objects)
43 * A specific attention has been given to analyze selected GEOM objects.
45 * @param myStudy This class is specific to the study !
49 class PLUGINUTILS_EXPORT GeomSelectionTools
55 static SalomeApp_Application* GetSalomeApplication();
56 static LightApp_SelectionMgr* selectionMgr();
57 SALOME_ListIO* getSelectedSalomeObjects();
58 Handle(SALOME_InteractiveObject) getFirstSelectedSalomeObject();
59 std::string getFirstSelectedEntry();
60 std::string getEntryOfObject(Handle(SALOME_InteractiveObject));
61 std::string getNameFromEntry(std::string);
62 std::string getFirstSelectedComponentDataType();
63 TopAbs_ShapeEnum getFirstSelectedShapeType();
64 TopAbs_ShapeEnum entryToShapeType(std::string );
65 GeomAbs_SurfaceType getFaceInformation(TopoDS_Shape);
68 //////////////////////////////////////////
70 //////////////////////////////////////////
74 PLUGINUTILS_EXPORT QString PrintDoubleValue( double, int = 16 );
77 #endif // _GEOMSELECTIONTOOLS_H_