2013-02-12 20:37:44 +06:00
|
|
|
# Bounding Box
|
|
|
|
|
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
|
|
|
import GEOM
|
|
|
|
from salome.geom import geomBuilder
|
2017-06-13 15:01:10 +05:00
|
|
|
geompy = geomBuilder.New()
|
2013-04-04 13:08:19 +06:00
|
|
|
|
|
|
|
import SMESH, SALOMEDS
|
|
|
|
from salome.smesh import smeshBuilder
|
2017-06-13 15:01:10 +05:00
|
|
|
smesh = smeshBuilder.New()
|
2013-04-04 13:08:19 +06:00
|
|
|
import salome_notebook
|
|
|
|
|
2013-02-12 20:37:44 +06:00
|
|
|
from SMESH_mechanic import mesh as mesh1
|
|
|
|
from SMESH_test1 import mesh as mesh2
|
|
|
|
|
|
|
|
mesh1.Compute()
|
|
|
|
mesh2.Compute()
|
|
|
|
|
|
|
|
# compute bounding box for mesh1
|
|
|
|
mesh1.BoundingBox()
|
|
|
|
|
|
|
|
# compute bounding box for list of nodes of mesh1
|
|
|
|
mesh1.BoundingBox([363, 364, 370, 371, 372, 373, 379, 380, 381])
|
|
|
|
|
|
|
|
# compute bounding box for list of elements of mesh1
|
|
|
|
mesh1.BoundingBox([363, 364, 370, 371, 372, 373, 379, 380, 381], isElem=True)
|
|
|
|
|
|
|
|
# compute common bounding box of mesh1 and mesh2
|
|
|
|
smesh.BoundingBox([mesh1, mesh2])
|
|
|
|
|
|
|
|
# etc...
|