Cosplay/examples/moi.py

12 lines
255 B
Python
Raw Permalink Normal View History

"""
Computes the moment of inertia for the mystery object
"""
import numpy as N
import cadquery as Cq
import nhf.primitive
if __name__ == '__main__':
obj = nhf.primitive.mystery()
mat = N.array(Cq.Shape.matrixOfInertia(obj.val()))
print(mat)