Version: 8.3.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
Bounding Box
1 # Bounding Box
2 
3 import salome
4 salome.salome_init()
5 import GEOM
6 from salome.geom import geomBuilder
7 geompy = geomBuilder.New(salome.myStudy)
8 
9 # create a box
10 box = geompy.MakeBoxDXDYDZ(100,30,100)
11 
12 bb = geompy.BoundingBox(box)
13 print "\nBounding Box of box 100x30x100:"
14 print " Xmin = ", bb[0], ", Xmax = ", bb[1]
15 print " Ymin = ", bb[2], ", Ymax = ", bb[3]
16 print " Zmin = ", bb[4], ", Zmax = ", bb[5]
17 
18 aBB = geompy.MakeBoundingBox(box)
19 
20 geompy.addToStudy(box, "box 100x30x100")
21 geompy.addToStudy(aBB, "Bounding box of box 100x30x100")

Download this script