smesh/doc/salome/examples/quality_controls_ex09.py

28 lines
631 B
Python
Raw Normal View History

2013-02-12 20:37:44 +06:00
# Over-constrained faces
import salome
salome.salome_init_without_session()
import GEOM
from salome.geom import geomBuilder
2017-06-13 15:01:10 +05:00
geompy = geomBuilder.New()
import SMESH, SALOMEDS
from salome.smesh import smeshBuilder
2017-06-13 15:01:10 +05:00
smesh = smeshBuilder.New()
import salome_notebook
mesh = smesh.Mesh()
faceFilter = smesh.GetFilter(SMESH.FACE,SMESH.FT_OverConstrainedFace)
2013-02-12 20:37:44 +06:00
#make an edge
n1 = mesh.AddNode(0,0,0)
n2 = mesh.AddNode(10,0,0)
edge = mesh.AddEdge([n1,n2])
assert( not mesh.GetIdsFromFilter( faceFilter ))
# make faces
mesh.ExtrusionSweep([edge], smesh.MakeDirStruct(0,7,0), 5)
assert( 5 == len( mesh.GetIdsFromFilter( faceFilter )))