]> SALOME platform Git repositories - modules/smesh.git/blob - doc/salome/examples/quality_controls_ex10.py
Salome HOME
Fix for the '52701: SIGSEGV in Mesh creation dialog box after activating Viscous...
[modules/smesh.git] / doc / salome / examples / quality_controls_ex10.py
1 # Over-constrained volumes
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 mesh = smesh.Mesh()
17 volumeFilter = smesh.GetFilter(SMESH.VOLUME,SMESH.FT_OverConstrainedVolume)
18
19 # make volumes by extrusion of one face
20 n1 = mesh.AddNode(0,0,0)
21 n2 = mesh.AddNode(10,0,0)
22 edge = mesh.AddEdge([n1,n2])
23 mesh.ExtrusionSweep([edge], smesh.MakeDirStruct(0,7,0), 1)
24 mesh.ExtrusionSweep( mesh.GetElementsByType(SMESH.FACE), smesh.MakeDirStruct(0,0,5), 7)
25 assert( 2 == len( mesh.GetIdsFromFilter( volumeFilter )))