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
IPAL52827: Very few filtering criteria available in filter dialog called from Remove...
[modules/smesh.git]
/
doc
/
salome
/
examples
/
quality_controls_ex11.py
diff --git
a/doc/salome/examples/quality_controls_ex11.py
b/doc/salome/examples/quality_controls_ex11.py
index ca955b6ab3ce77cd8ca5d63f58c09ae06d67cec9..69352be344d649821c3f7789999e35c12bdb75ca 100644
(file)
--- a/
doc/salome/examples/quality_controls_ex11.py
+++ b/
doc/salome/examples/quality_controls_ex11.py
@@
-1,9
+1,15
@@
# Length 2D
# Length 2D
+
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 2D > 5.7
length_margin = 5.7
# Criterion : Length 2D > 5.7
length_margin = 5.7
-aFilter = smesh.GetFilter(
smesh.FACE, smesh.FT_Length2D, smesh
.FT_MoreThan, length_margin)
+aFilter = smesh.GetFilter(
SMESH.FACE, SMESH.FT_Length2D, SMESH
.FT_MoreThan, length_margin)
anIds = mesh.GetIdsFromFilter(aFilter)
anIds = mesh.GetIdsFromFilter(aFilter)
@@
-38,7
+44,7
@@
for i in range(len(anIds)):
print ""
# create a group
print ""
# create a group
-aGroup = mesh.CreateEmptyGroup(
smesh
.FACE, "Faces with length 2D > " + `length_margin`)
+aGroup = mesh.CreateEmptyGroup(
SMESH
.FACE, "Faces with length 2D > " + `length_margin`)
aGroup.Add(anIds)
salome.sg.updateObjBrowser(1)
aGroup.Add(anIds)
salome.sg.updateObjBrowser(1)