Salome HOME
Merge french translations update from origin/fbt/french_translation_check_geom branch
[modules/geom.git] / doc / salome / examples / inertia.py
1 # Inertia
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 In = geompy.Inertia(box)
12 print "\nInertia matrix of box 100x30x100:"
13 print " (", In[0], ", ", In[1], ", ", In[2], ")"
14 print " (", In[3], ", ", In[4], ", ", In[5], ")"
15 print " (", In[6], ", ", In[7], ", ", In[8], ")"
16 print "Main moments of inertia of box 100x30x100:"
17 print " Ix = ", In[9], ", Iy = ", In[10], ", Iz = ", In[11]