# \}
"""
-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.
"""
## 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.
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 )
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)
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)
smesh.SetName(boxmesh.GetMesh(), 'boxmesh')
if salome.sg.hasDesktop():
- salome.sg.updateObjBrowser(1)
+ salome.sg.updateObjBrowser()
#
# Definitions: