X-Git-Url: http://git.salome-platform.org/gitweb/?p=modules%2Fsmesh.git;a=blobdiff_plain;f=src%2FSMESH_PY%2Fsmeshstudytools.py;h=c80998ee94c76d0960779659ab3878558bdf5fe1;hp=949d5b72958be7529d7f7b19ed8e230baed6c061;hb=bd7477efc255f965c479d88d1be1ee3dbf4aa760;hpb=a17b36970bc61da1d664453c615754997c925b18 diff --git a/src/SMESH_PY/smeshstudytools.py b/src/SMESH_PY/smeshstudytools.py index 949d5b729..c80998ee9 100644 --- a/src/SMESH_PY/smeshstudytools.py +++ b/src/SMESH_PY/smeshstudytools.py @@ -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 ) @@ -155,7 +155,7 @@ class SMeshStudyTools: self.smeshGui = salome.ImportComponentGUI("SMESH") if not helper.SalomeGUI.hasDesktop(): - print "displayMeshObject: no desktop available" + print("displayMeshObject: no desktop available") return self.smeshGui.CreateAndDisplayActor(entry) @@ -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(1) + salome.sg.updateObjBrowser() # # Definitions: