Version: 8.3.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 (_PTR(Study))
 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 (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 (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...
 
 _PTR (Study) getMyStudy()
 

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...
 

Private Member Functions

 _PTR (Study) myStudy
 

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.

Parameters
myStudyThis class is specific to the study !

Constructor & Destructor Documentation

GeomSelectionTools::GeomSelectionTools ( _PTR(Study)  aStudy)

Constructor.

Parameters
aStudypointer to the Study

Member Function Documentation

GeomSelectionTools::_PTR ( Study  )
private
GeomSelectionTools::_PTR ( Study  )
TopAbs_ShapeEnum GeomSelectionTools::entryToShapeType ( 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 _PTR(), GetSalomeApplication(), and SObject().

Referenced by getFirstSelectedShapeType().

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 _PTR(), and SObject().

Referenced by getFirstSelectedEntry().

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.

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 _PTR(), Handle(), and SObject().

std::string GeomSelectionTools::getFirstSelectedEntry ( )

Return the entry of the first selected Object.

Returns
the entry of the first selected Object

References getEntryOfObject(), and Handle().

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().

std::string GeomSelectionTools::getNameFromEntry ( 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 _PTR(), and SObject().

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 entryToShapeType(), and selectionMgr().

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().

GeomSelectionTools::Handle ( SALOME_InteractiveObject  )
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().