CadQuery / cadquery

A python parametric CAD scripting framework based on OCCT
https://cadquery.readthedocs.io
Other
3.15k stars 289 forks source link

How to calculate moment of inertia? #1605

Closed lenianiva closed 2 months ago

lenianiva commented 3 months ago

If I have an assembly where different parts have different colours, and each colours corresponds to a density, is there a way to calculate the MoI about a particular axis?

bragostin commented 3 months ago

I guess your question regarding CadQuery is how to get the volume of an object so that you can calculate the moment of inertia? That would be cq_object.val().Volume()

lenianiva commented 3 months ago

I guess your question regarding CadQuery is how to get the volume of an object so that you can calculate the moment of inertia? That would be cq_object.val().Volume()

No I need to calculate the MoI of an assembly of objects with different densities. If the object is homogeneous I can just call matrixOfInertia()

adam-urbanczyk commented 3 months ago

You'll need to implement this yourself