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
0021920: [CEA 689] Get some measure functions on groups available in GUI and TUI
[modules/smesh.git]
/
doc
/
salome
/
examples
/
quality_controls_ex03.py
diff --git
a/doc/salome/examples/quality_controls_ex03.py
b/doc/salome/examples/quality_controls_ex03.py
index eaa607b94aa671a29703c07d6dd888ca45f78958..b1da190f5f6d18f9588c99826194182d39a0675c 100644
(file)
--- a/
doc/salome/examples/quality_controls_ex03.py
+++ b/
doc/salome/examples/quality_controls_ex03.py
@@
-1,9
+1,15
@@
# Length 1D
# Length 1D
+
import salome
import salome
-import geompy
+salome.salome_init()
+import GEOM
+from salome.geom import geomBuilder
+geompy = geomBuilder.New(salome.myStudy)
-import smesh
+import SMESH, SALOMEDS
+from salome.smesh import smeshBuilder
+smesh = smeshBuilder.New(salome.myStudy)
# create open shell: a box without one plane
box = geompy.MakeBox(0., 0., 0., 20., 20., 15.)
# create open shell: a box without one plane
box = geompy.MakeBox(0., 0., 0., 20., 20., 15.)
@@
-23,7
+29,7
@@
mesh.Compute()
# Criterion : Length > 3.
length_margin = 3.
# Criterion : Length > 3.
length_margin = 3.
-aFilter = smesh.GetFilter(
smesh.EDGE, smesh.FT_Length, smesh
.FT_MoreThan, length_margin)
+aFilter = smesh.GetFilter(
SMESH.EDGE, SMESH.FT_Length, SMESH
.FT_MoreThan, length_margin)
anIds = mesh.GetIdsFromFilter(aFilter)
# print the result
anIds = mesh.GetIdsFromFilter(aFilter)
# print the result
@@
-37,7
+43,7
@@
for i in range(len(anIds)):
print ""
# create a group
print ""
# create a group
-aGroup = mesh.GetMesh().CreateGroup(
smesh
.EDGE, "Edges with length > " + `length_margin`)
+aGroup = mesh.GetMesh().CreateGroup(
SMESH
.EDGE, "Edges with length > " + `length_margin`)
aGroup.Add(anIds)
salome.sg.updateObjBrowser(1)
aGroup.Add(anIds)
salome.sg.updateObjBrowser(1)