Salome HOME
Mantis issue 0021703: [CEA 577] Boolean operations on groups.
[modules/geom.git] / doc / salome / gui / GEOM / input / tui_basic_properties.doc
1 /*!
2
3 \page tui_basic_properties_page Basic Properties
4
5 \code
6 import geompy
7 import math
8
9 # create a box
10 box = geompy.MakeBoxDXDYDZ(100,30,100)
11 props = geompy.BasicProperties(box)
12 print "\nBox 100x30x100 Basic Properties:"
13 print " Wires length: ", props[0]
14 print " Surface area: ", props[1]
15 print " Volume      : ", props[2]
16 length = math.sqrt((props[0] - 1840)*(props[0] - 1840))
17 area = math.sqrt((props[1] - 32000)*(props[1] - 32000))
18 volume = math.sqrt((props[2] - 300000)*(props[2] - 300000))
19 if length > 1e-7 or area > 1e-7 or volume > 1e-7:
20     print "While must be:"
21     print " Wires length: ", 1840
22     print " Surface area: ", 32000
23     print " Volume      : ", 300000.
24 \endcode
25
26 */