Closed fdi438 closed 4 years ago
Found the solution (after getting the same result in MeshLab).
The results are multiplied with the Volume, i.e. in my example it uses V=2000 for m (essentially assuming a density of 1 kg/m³).
As one does not specify any kind of mass or density for this function, I assumed that it is just left out = set to 1, which is obviously not the case.
I've been trying to get an intertia matrix. The issues are:
For verification I tried the attached STL file (created with OpenSCAD). This is a block, size 10x10x20, centered at 0,0,0.
numpy-stl gives me:
However, based on my mechanics literature, the matrix should be:
which would result in (assuming m=1)
COG is correct (for this one only, for a sphere it's always slightly off), volume is also correctly calculated at 2000.
Here is the stl file (zipped so that I can upload it here). block_10-10-20.zip
The code to create it in OpenSCAD is
cube([10,10,20],center=true);