]> SALOME platform Git repositories - modules/smesh.git/blob - doc/salome/examples/quality_controls_ex07.py
Salome HOME
update of messages
[modules/smesh.git] / doc / salome / examples / quality_controls_ex07.py
1 # Bare border faces
2
3
4 import salome
5 salome.salome_init()
6 import GEOM
7 from salome.geom import geomBuilder
8 geompy = geomBuilder.New(salome.myStudy)
9
10 import SMESH, SALOMEDS
11 from salome.smesh import smeshBuilder
12 smesh =  smeshBuilder.New(salome.myStudy)
13 import salome_notebook
14
15
16 box = geompy.MakeBoxDXDYDZ(100, 100, 100)
17 geompy.addToStudy( box, "box" )
18
19 mesh = smesh.Mesh(box)
20 mesh.Segment().NumberOfSegments(3)
21 mesh.Quadrangle()
22 mesh.Compute()
23
24 # remove 2 faces
25 allFaces = mesh.GetElementsByType(SMESH.FACE)
26 mesh.RemoveElements( allFaces[0:2])
27
28 bareGroup = mesh.MakeGroup("bare faces", SMESH.FACE, SMESH.FT_BareBorderFace)
29 assert(bareGroup.Size() == 3)