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
IMP 23612: EDF 14143 - Compute angle from 3 points
[modules/smesh.git]
/
doc
/
salome
/
examples
/
quality_controls_ex19.py
diff --git
a/doc/salome/examples/quality_controls_ex19.py
b/doc/salome/examples/quality_controls_ex19.py
index abe195200a3618815cdf6338d6897c790606a064..62ef71030bad8f9840cdfcd51a1f87856adb2fae 100644
(file)
--- a/
doc/salome/examples/quality_controls_ex19.py
+++ b/
doc/salome/examples/quality_controls_ex19.py
@@
-1,6
+1,7
@@
# Element Diameter 2D
import SMESH_mechanic
# Element Diameter 2D
import SMESH_mechanic
+import SMESH
smesh = SMESH_mechanic.smesh
mesh = SMESH_mechanic.mesh
smesh = SMESH_mechanic.smesh
mesh = SMESH_mechanic.mesh
@@
-9,22
+10,22
@@
salome = SMESH_mechanic.salome
# Criterion : ELEMENT DIAMETER 2D > 10
mel_2d_margin = 10
# Criterion : ELEMENT DIAMETER 2D > 10
mel_2d_margin = 10
-aFilter = smesh.GetFilter(
smesh.FACE, smesh.FT_MaxElementLength2D, smesh
.FT_MoreThan, mel_2d_margin)
+aFilter = smesh.GetFilter(
SMESH.FACE, SMESH.FT_MaxElementLength2D, SMESH
.FT_MoreThan, mel_2d_margin)
anIds = mesh.GetIdsFromFilter(aFilter)
# print the result
anIds = mesh.GetIdsFromFilter(aFilter)
# print the result
-print
"Criterion: Element Diameter 2D Ratio > ", mel_2d_margin, " Nb = ", len(anIds
)
+print
("Criterion: Element Diameter 2D Ratio > ", mel_2d_margin, " Nb = ", len(anIds)
)
j = 1
for i in range(len(anIds)):
j = 1
for i in range(len(anIds)):
- if j > 20: j = 1; print
""
- print
anIds[i],
+ if j > 20: j = 1; print
("")
+ print
(anIds[i], end=' ')
j = j + 1
pass
j = j + 1
pass
-print
""
+print
("")
# create a group
# create a group
-aGroup = mesh.CreateEmptyGroup(
smesh.FACE, "Element Diameter 2D > " + `mel_2d_margin`
)
+aGroup = mesh.CreateEmptyGroup(
SMESH.FACE, "Element Diameter 2D > " + repr(mel_2d_margin)
)
aGroup.Add(anIds)
aGroup.Add(anIds)
-salome.sg.updateObjBrowser(
1
)
+salome.sg.updateObjBrowser()