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
Check result of Compute in examples
[modules/smesh.git]
/
doc
/
examples
/
grouping_elements_ex03.py
diff --git
a/doc/examples/grouping_elements_ex03.py
b/doc/examples/grouping_elements_ex03.py
index 2de59d734938674bd718ae84f8d5f8d904e463f6..2c592aebd1f4f7e335af14b4f6629498aa706957 100644
(file)
--- a/
doc/examples/grouping_elements_ex03.py
+++ b/
doc/examples/grouping_elements_ex03.py
@@
-16,7
+16,7
@@
box = geom_builder.MakeBoxDXDYDZ(10,10,10)
mesh = smesh_builder.Mesh(box,"Quad mesh")
hyp1D = mesh.Segment().StartEndLength( 1, 4 )
mesh.Quadrangle()
mesh = smesh_builder.Mesh(box,"Quad mesh")
hyp1D = mesh.Segment().StartEndLength( 1, 4 )
mesh.Quadrangle()
-
mesh.Compute(
)
+
if not mesh.Compute(): raise Exception("Error when computing Mesh"
)
# create a group on filter selecting faces of medium size
critaria = [ \
# create a group on filter selecting faces of medium size
critaria = [ \
@@
-30,7
+30,7
@@
print("Group on filter contains %s elements" % filtGroup.Size())
# group on filter is updated if the mesh is modified
hyp1D.SetStartLength( 2.5 )
hyp1D.SetEndLength( 2.5 )
# group on filter is updated if the mesh is modified
hyp1D.SetStartLength( 2.5 )
hyp1D.SetEndLength( 2.5 )
-
mesh.Compute(
)
+
if not mesh.Compute(): raise Exception("Error when computing Mesh"
)
print("After mesh change, group on filter contains %s elements" % filtGroup.Size())
# set a new filter defining the group
print("After mesh change, group on filter contains %s elements" % filtGroup.Size())
# set a new filter defining the group