2013-02-12 20:37:44 +06:00
|
|
|
# Bare border faces
|
|
|
|
|
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
|
|
|
|
|
2013-02-12 20:37:44 +06:00
|
|
|
|
|
|
|
box = geompy.MakeBoxDXDYDZ(100, 100, 100)
|
|
|
|
geompy.addToStudy( box, "box" )
|
|
|
|
|
|
|
|
mesh = smesh.Mesh(box)
|
|
|
|
mesh.Segment().NumberOfSegments(3)
|
|
|
|
mesh.Quadrangle()
|
|
|
|
mesh.Compute()
|
|
|
|
|
|
|
|
# remove 2 faces
|
2013-04-04 13:08:19 +06:00
|
|
|
allFaces = mesh.GetElementsByType(SMESH.FACE)
|
2013-02-12 20:37:44 +06:00
|
|
|
mesh.RemoveElements( allFaces[0:2])
|
|
|
|
|
2013-04-04 13:08:19 +06:00
|
|
|
bareGroup = mesh.MakeGroup("bare faces", SMESH.FACE, SMESH.FT_BareBorderFace)
|
2013-02-12 20:37:44 +06:00
|
|
|
assert(bareGroup.Size() == 3)
|