2013-02-12 17:35:16 +06:00
|
|
|
# Inertia
|
|
|
|
|
2013-04-04 13:06:43 +06:00
|
|
|
import salome
|
|
|
|
salome.salome_init()
|
|
|
|
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)
|
|
|
|
In = geompy.Inertia(box)
|
2017-02-10 21:07:24 +05:00
|
|
|
print("\nInertia matrix of box 100x30x100:")
|
|
|
|
print(" (", In[0], ", ", In[1], ", ", In[2], ")")
|
|
|
|
print(" (", In[3], ", ", In[4], ", ", In[5], ")")
|
|
|
|
print(" (", In[6], ", ", In[7], ", ", In[8], ")")
|
|
|
|
print("Main moments of inertia of box 100x30x100:")
|
|
|
|
print(" Ix = ", In[9], ", Iy = ", In[10], ", Iz = ", In[11])
|