]> SALOME platform Git repositories - modules/smesh.git/blob - doc/salome/examples/quality_controls_ex09.py
Salome HOME
bos #26452 [EDF] (2021) SMESH: orientation of faces
[modules/smesh.git] / doc / salome / examples / quality_controls_ex09.py
1 # Over-constrained faces
2
3
4 import salome
5 salome.salome_init_without_session()
6 import GEOM
7 from salome.geom import geomBuilder
8 geompy = geomBuilder.New()
9
10 import SMESH, SALOMEDS
11 from salome.smesh import smeshBuilder
12 smesh =  smeshBuilder.New()
13 import salome_notebook
14
15
16 mesh = smesh.Mesh()
17 faceFilter = smesh.GetFilter(SMESH.FACE,SMESH.FT_OverConstrainedFace)
18
19 #make an edge
20 n1 = mesh.AddNode(0,0,0)
21 n2 = mesh.AddNode(10,0,0)
22 edge = mesh.AddEdge([n1,n2])
23 assert( not mesh.GetIdsFromFilter( faceFilter ))
24
25 # make faces 
26 mesh.ExtrusionSweep([edge], smesh.MakeDirStruct(0,7,0), 5)
27 assert( 2 == len( mesh.GetIdsFromFilter( faceFilter )))