# mass-props CLI to calculate the mass properties (mass, center of mass and inertia matrix/tensor) of triangle meshes. Built on the library [`polyhedral_mass_properties`](https://docs.rs/polyhedral_mass_properties). Currently, only `gltf` and `glb` files are supported. ## Installation ```bash cargo install mass-props ``` ## Usage ``` Usage: mass-props [OPTIONS] Arguments: Path to a gltf/glb file Options: -d, --density Default: 1.0 -m, --mesh The mesh index in the glTF file [default: 0] -h, --help Print help ``` ## Output The output is in JSON. Example: ```json { "density": 0.001, "mass": 9.445518773048825, "center_of_mass": [ 9.28871623915268e-7, -0.00313705591303723, -1.067953785584565e-6 ], "inertia": { "xx": 1373.3185987256663, "yy": 1198.2310241502155, "zz": 1373.318537829056, "xy": 0.00003549312284551729, "xz": 0.00003393459310569918, "yz": -0.000040233995830622396 } } ```