Version: 9.16.0
GeomSelectionTools Class Reference

The GeomSelectionTools class gives high level tools to select Geom (and other objects) A specific attention has been given to analyze selected GEOM objects. More...

#include <GeomSelectionTools.h>

Public Member Functions

 GeomSelectionTools ()
 Constructor. More...
 
SALOME_ListIO * getSelectedSalomeObjects ()
 Return the list of the selected Salome Interactive Object (SALOME_ListIO*) More...
 
 Handle (SALOME_InteractiveObject) getFirstSelectedSalomeObject()
 
std::string getFirstSelectedEntry ()
 Return the entry of the first selected Object. More...
 
std::string getEntryOfObject (Handle(SALOME_InteractiveObject))
 Return the entry of a Salome Interactive Object. More...
 
std::string getNameFromEntry (const std::string &)
 Retrieve the name from the entry of the object. More...
 
std::string getFirstSelectedComponentDataType ()
 Retrieve the component type of the first selected object, it manages successfully references. More...
 
TopAbs_ShapeEnum getFirstSelectedShapeType ()
 Gives the ShapeType of the first Selected Object, return TopAbs_SHAPE if the first selected object does not define a shape. More...
 
TopAbs_ShapeEnum entryToShapeType (const std::string &)
 Retrieve the shape type from the entry. More...
 
GeomAbs_SurfaceType getFaceInformation (TopoDS_Shape)
 Print information to std output of the face and return the OCC type of face: Plane, Cylinder,Cone, Sphere, Torus, BezierSurface,BSplineSurface, SurfaceOfRevolution,SurfaceOfExtrusion, OtherSurface. More...
 

Static Public Member Functions

static SalomeApp_Application * GetSalomeApplication ()
 Allows to get the Salome Application. More...
 
static LightApp_SelectionMgr * selectionMgr ()
 Allows to get the selection manager from LightApp. More...
 

Detailed Description

The GeomSelectionTools class gives high level tools to select Geom (and other objects) A specific attention has been given to analyze selected GEOM objects.

Constructor & Destructor Documentation

◆ GeomSelectionTools()

GeomSelectionTools::GeomSelectionTools ( )

Constructor.

Member Function Documentation

◆ entryToShapeType()

TopAbs_ShapeEnum GeomSelectionTools::entryToShapeType ( const std::string &  entry)

Retrieve the shape type from the entry.

Returns
the shape type from the entry, return TopAbs_SHAPE if the object does not define a shape or a group.

References SMESH::_PTR().

Referenced by getFirstSelectedShapeType().

◆ getEntryOfObject()

std::string GeomSelectionTools::getEntryOfObject ( Handle(SALOME_InteractiveObject)  anIO)

Return the entry of a Salome Interactive Object.

Parameters
anIOthe Handle of the Salome Interactive Object
Returns
the entry of the Salome Interactive Object

References SMESH::_PTR().

Referenced by getFirstSelectedEntry().

◆ getFaceInformation()

GeomAbs_SurfaceType GeomSelectionTools::getFaceInformation ( TopoDS_Shape  S)

Print information to std output of the face and return the OCC type of face: Plane, Cylinder,Cone, Sphere, Torus, BezierSurface,BSplineSurface, SurfaceOfRevolution,SurfaceOfExtrusion, OtherSurface.

Parameters
TopoDS_ShapeS Face we want information about.
Returns
the OCC type of face: Plane, Cylinder,Cone, Sphere, Torus, BezierSurface,BSplineSurface, SurfaceOfRevolution,SurfaceOfExtrusion, OtherSurface return Other_Surface if the selected face is not a face. Information printed is : U and V degrees U and V number of poles U and V number of knots U or V is Rational ?

References Face.

◆ getFirstSelectedComponentDataType()

std::string GeomSelectionTools::getFirstSelectedComponentDataType ( )

Retrieve the component type of the first selected object, it manages successfully references.

Returns
the component type of the first selected object

References SMESH::_PTR(), and Handle().

◆ getFirstSelectedEntry()

std::string GeomSelectionTools::getFirstSelectedEntry ( )

Return the entry of the first selected Object.

Returns
the entry of the first selected Object

References getEntryOfObject(), and Handle().

◆ getFirstSelectedShapeType()

TopAbs_ShapeEnum GeomSelectionTools::getFirstSelectedShapeType ( )

Gives the ShapeType of the first Selected Object, return TopAbs_SHAPE if the first selected object does not define a shape.

Returns
the ShapeType of the first Selected Object, return TopAbs_SHAPE if the first selected object does not define a shape.

References entryToShapeType(), and Handle().

◆ getNameFromEntry()

std::string GeomSelectionTools::getNameFromEntry ( const std::string &  entry)

Retrieve the name from the entry of the object.

Parameters
entrythe entry of the object
Returns
the name of the object

References SMESH::_PTR().

◆ GetSalomeApplication()

SalomeApp_Application * GeomSelectionTools::GetSalomeApplication ( )
static

Allows to get the Salome Application.

Returns
A LightApp_SelectionMgr Pointer or 0 if it can't get it.

Referenced by selectionMgr().

◆ getSelectedSalomeObjects()

SALOME_ListIO * GeomSelectionTools::getSelectedSalomeObjects ( )

Return the list of the selected Salome Interactive Object (SALOME_ListIO*)

Returns
the list of the selected Salome Interactive Object

References selectionMgr().

◆ Handle()

GeomSelectionTools::Handle ( SALOME_InteractiveObject  )

◆ selectionMgr()

LightApp_SelectionMgr * GeomSelectionTools::selectionMgr ( )
static

Allows to get the selection manager from LightApp.

Returns
A LightApp_SelectionMgr Pointer or 0 if it can't get it.

References GetSalomeApplication().

Referenced by getSelectedSalomeObjects(), and Handle().