X-Git-Url: http://git.salome-platform.org/gitweb/?p=modules%2Fsmesh.git;a=blobdiff_plain;f=src%2FSMESH_PY%2Fsmeshstudytools.py;h=87cfb16792c7477fd8f6f6be16478115fdfb34e0;hp=1b82fa5deec0f658993e846e06e8d57c98717b2c;hb=8d297d6698f361d4f2dde723050bcfbaea050920;hpb=5260bd00bd51567f6137d5ea7ae0564464c4290a diff --git a/src/SMESH_PY/smeshstudytools.py b/src/SMESH_PY/smeshstudytools.py index 1b82fa5de..87cfb1679 100644 --- a/src/SMESH_PY/smeshstudytools.py +++ b/src/SMESH_PY/smeshstudytools.py @@ -29,7 +29,7 @@ # \} """ -This module provides a new class :class:`SMeshStudyTools` to facilitate the +This module provides a class :class:`SMeshStudyTools` to facilitate the use of mesh objects in Salome study. """ @@ -77,12 +77,12 @@ class SMeshStudyTools: ## This function updates the tools so that it works on the # specified study. - def updateStudy(self, studyId=None): + def updateStudy(self): """ This function updates the tools so that it works on the specified study. """ - self.editor = getStudyEditor(studyId) + self.editor = getStudyEditor() ## Get the mesh item owning the mesh group \em meshGroupItem. # \param meshGroupItem (SObject) mesh group belonging to the searched mesh. @@ -125,7 +125,7 @@ class SMeshStudyTools: return None import SMESH from salome.smesh import smeshBuilder - smesh = smeshBuilder.New(self.editor.study) + smesh = smeshBuilder.New() meshObject=salome.IDToObject(entry) return smesh.Mesh( meshObject ) @@ -183,17 +183,16 @@ class SMeshStudyTools: def TEST_createBoxMesh(): - theStudy = helper.getActiveStudy() import GEOM from salome.geom import geomBuilder - geompy = geomBuilder.New(theStudy) + geompy = geomBuilder.New() box = geompy.MakeBoxDXDYDZ(200, 200, 200) import SMESH, SALOMEDS from salome.smesh import smeshBuilder - smesh = smeshBuilder.New(theStudy) + smesh = smeshBuilder.New() from salome.StdMeshers import StdMeshersBuilder boxmesh = smesh.Mesh(box) @@ -207,7 +206,7 @@ def TEST_createBoxMesh(): smesh.SetName(boxmesh.GetMesh(), 'boxmesh') if salome.sg.hasDesktop(): - salome.sg.updateObjBrowser(True) + salome.sg.updateObjBrowser() # # Definitions: