2013-02-12 20:37:44 +06:00
|
|
|
# Over-constrained volumes
|
|
|
|
|
|
|
|
|
2013-04-04 13:08:19 +06:00
|
|
|
import salome
|
|
|
|
salome.salome_init()
|
|
|
|
import GEOM
|
|
|
|
from salome.geom import geomBuilder
|
|
|
|
geompy = geomBuilder.New(salome.myStudy)
|
|
|
|
|
|
|
|
import SMESH, SALOMEDS
|
|
|
|
from salome.smesh import smeshBuilder
|
|
|
|
smesh = smeshBuilder.New(salome.myStudy)
|
|
|
|
import salome_notebook
|
|
|
|
|
|
|
|
|
|
|
|
mesh = smesh.Mesh()
|
|
|
|
volumeFilter = smesh.GetFilter(SMESH.VOLUME,SMESH.FT_OverConstrainedVolume)
|
2013-02-12 20:37:44 +06:00
|
|
|
|
|
|
|
# make volumes by extrusion of one face
|
|
|
|
n1 = mesh.AddNode(0,0,0)
|
|
|
|
n2 = mesh.AddNode(10,0,0)
|
|
|
|
edge = mesh.AddEdge([n1,n2])
|
2013-04-04 13:08:19 +06:00
|
|
|
mesh.ExtrusionSweep([edge], smesh.MakeDirStruct(0,7,0), 1)
|
|
|
|
mesh.ExtrusionSweep( mesh.GetElementsByType(SMESH.FACE), smesh.MakeDirStruct(0,0,5), 7)
|
2013-02-12 20:37:44 +06:00
|
|
|
assert( 2 == len( mesh.GetIdsFromFilter( volumeFilter )))
|