Salome HOME
projects
/
modules
/
smesh.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
bos #24085 fix TSplitMethod method for Windows (to avoid crash)
[modules/smesh.git]
/
src
/
SMESH_PY
/
smeshstudytools.py
diff --git
a/src/SMESH_PY/smeshstudytools.py
b/src/SMESH_PY/smeshstudytools.py
index 7d4277211ec398178d493b6968f0bd3ebd7cd326..dc5ce1c066952a768bdfef1a167b727bebd7d1f5 100644
(file)
--- a/
src/SMESH_PY/smeshstudytools.py
+++ b/
src/SMESH_PY/smeshstudytools.py
@@
-1,6
+1,6
@@
# -*- coding: utf-8 -*-
#
# -*- coding: utf-8 -*-
#
-# Copyright (C) 2007-20
15
CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-20
21
CEA/DEN, EDF R&D, OPEN CASCADE
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
@@
-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.
"""
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.
## 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.
"""
"""
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.
## 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
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 )
meshObject=salome.IDToObject(entry)
return smesh.Mesh( meshObject )
@@
-155,7
+155,7
@@
class SMeshStudyTools:
self.smeshGui = salome.ImportComponentGUI("SMESH")
if not helper.SalomeGUI.hasDesktop():
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)
return
self.smeshGui.CreateAndDisplayActor(entry)
@@
-183,17
+183,16
@@
class SMeshStudyTools:
def TEST_createBoxMesh():
def TEST_createBoxMesh():
- theStudy = helper.getActiveStudy()
import GEOM
from salome.geom import geomBuilder
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
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)
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():
smesh.SetName(boxmesh.GetMesh(), 'boxmesh')
if salome.sg.hasDesktop():
- salome.sg.updateObjBrowser(
1
)
+ salome.sg.updateObjBrowser()
#
# Definitions:
#
# Definitions: