2013-02-12 20:37:44 +06:00
|
|
|
# Over-constrained faces
|
|
|
|
|
2013-04-04 13:08:19 +06:00
|
|
|
import salome
|
2021-08-12 14:38:10 +05:00
|
|
|
salome.salome_init_without_session()
|
2013-04-04 13:08:19 +06:00
|
|
|
|
2022-04-11 18:28:01 +05:00
|
|
|
import SMESH
|
2013-04-04 13:08:19 +06:00
|
|
|
from salome.smesh import smeshBuilder
|
|
|
|
|
2022-04-11 18:28:01 +05:00
|
|
|
smesh_builder = smeshBuilder.New()
|
2013-04-04 13:08:19 +06:00
|
|
|
|
2022-04-11 18:28:01 +05:00
|
|
|
mesh = smesh_builder.Mesh()
|
|
|
|
faceFilter = smesh_builder.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 ))
|
|
|
|
|
2022-01-21 22:44:00 +05:00
|
|
|
# make faces
|
2022-04-11 18:28:01 +05:00
|
|
|
mesh.ExtrusionSweep([edge], smesh_builder.MakeDirStruct(0,7,0), 5)
|
2022-01-21 22:44:00 +05:00
|
|
|
assert( 5 == len( mesh.GetIdsFromFilter( faceFilter )))
|