Salome HOME
203a3943686fa7a5f94f962d761dc28baf91178a
[modules/geom.git] / doc / salome / examples / inertia.py
1 # Inertia
2
3 import geompy
4 import math
5
6 # create a box
7 box = geompy.MakeBoxDXDYDZ(100,30,100)
8 In = geompy.Inertia(box)
9 print "\nInertia matrix of box 100x30x100:"
10 print " (", In[0], ", ", In[1], ", ", In[2], ")"
11 print " (", In[3], ", ", In[4], ", ", In[5], ")"
12 print " (", In[6], ", ", In[7], ", ", In[8], ")"
13 print "Main moments of inertia of box 100x30x100:"
14 print " Ix = ", In[9], ", Iy = ", In[10], ", Iz = ", In[11]