Version: 6.3.1
Public Member Functions | Data Fields

SMESH_PY.smeshstudytools.SMeshStudyTools Class Reference

Public Member Functions

def __init__
def getMeshFromGroup

Data Fields

 editor

Detailed Description

This class provides several methods to manipulate mesh objects in Salome
study. The parameter `studyEditor` defines a
:class:`~salome.kernel.studyedit.StudyEditor` object used to access the study. If
:const:`None`, the method returns a :class:`~salome.kernel.studyedit.StudyEditor`
object on the current study.

.. attribute:: editor

   This instance attribute contains the underlying
   :class:`~salome.kernel.studyedit.StudyEditor` object. It can be used to access
   the study but the attribute itself should not be modified.

Definition at line 31 of file smeshstudytools.py.


Constructor & Destructor Documentation

def SMESH_PY.smeshstudytools.SMeshStudyTools.__init__ (   self,
  studyEditor = None 
)

Definition at line 47 of file smeshstudytools.py.

00048                                           :
00049         global SMESH
00050         if SMESH is None:
00051             SMESH = __import__("SMESH")
00052         if studyEditor is None:
00053             studyEditor = getStudyEditor()
00054         self.editor = studyEditor


Member Function Documentation

def SMESH_PY.smeshstudytools.SMeshStudyTools.getMeshFromGroup (   self,
  meshGroupItem 
)
Get the mesh item owning the mesh group `meshGroupItem`.

:type   meshGroupItem: SObject
:param  meshGroupItem: Mesh group belonging to the searched mesh.

:return: The SObject corresponding to the mesh, or None if it was not
 found.

Definition at line 55 of file smeshstudytools.py.

00056                                              :
00057         """
00058         Get the mesh item owning the mesh group `meshGroupItem`.
00059 
00060         :type   meshGroupItem: SObject
00061         :param  meshGroupItem: Mesh group belonging to the searched mesh.
00062         
00063         :return: The SObject corresponding to the mesh, or None if it was not
00064                  found.
00065         """
00066         meshItem = None
00067         obj = self.editor.getOrLoadObject(meshGroupItem)
00068         group = obj._narrow(SMESH.SMESH_GroupBase)
00069         if group is not None: # The type of the object is ok
00070             meshObj = group.GetMesh()
00071             meshItem = salome.ObjectToSObject(meshObj)
00072         return meshItem

Field Documentation

Definition at line 47 of file smeshstudytools.py.

Copyright © 2007-2011 CEA/DEN, EDF R&D, OPEN CASCADE
Copyright © 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS