2013-02-12 17:35:16 +06:00
|
|
|
# Bounding Box
|
|
|
|
|
2013-04-04 13:06:43 +06:00
|
|
|
import salome
|
2021-08-12 11:43:44 +05:00
|
|
|
salome.salome_init_without_session()
|
2013-04-04 13:06:43 +06:00
|
|
|
import GEOM
|
|
|
|
from salome.geom import geomBuilder
|
2017-06-13 14:57:14 +05:00
|
|
|
geompy = geomBuilder.New()
|
2013-02-12 17:35:16 +06:00
|
|
|
|
|
|
|
# create a box
|
|
|
|
box = geompy.MakeBoxDXDYDZ(100,30,100)
|
|
|
|
|
|
|
|
bb = geompy.BoundingBox(box)
|
2017-02-10 21:07:24 +05:00
|
|
|
print("\nBounding Box of box 100x30x100:")
|
|
|
|
print(" Xmin = ", bb[0], ", Xmax = ", bb[1])
|
|
|
|
print(" Ymin = ", bb[2], ", Ymax = ", bb[3])
|
|
|
|
print(" Zmin = ", bb[4], ", Zmax = ", bb[5])
|
2013-02-12 17:35:16 +06:00
|
|
|
|
|
|
|
aBB = geompy.MakeBoundingBox(box)
|
|
|
|
|
|
|
|
geompy.addToStudy(box, "box 100x30x100")
|
|
|
|
geompy.addToStudy(aBB, "Bounding box of box 100x30x100")
|