| Parameter | Value |
|---|---|
| Volume | - |
| Mass | - |
| Center of Mass X, Y, Z | - |
| Surface Area | - |
| Inertia Tensor, kg·m² | - |
| Principal Moments, I1 ≥ I2 ≥ I3 | - |
| Notes | - |
This interactive calculator works with 3D geometry directly in the browser. You can either create standard primitives – box, sphere, cylinder, cone or upload an STL file. Once the geometry and material density are provided the tool computes: volume, mass, center of mass (CoM), surface area, inertia tensor and principal moments. The calculations run online desktop and mobile. Use the sample primitives to preview results or upload your CAD/STL model for a full analysis.
Table of Contents
How it works
- Scene: an interactive 3D view shows the current model; rotate, pan and zoom using mouse or touch.
- Geometry source: choose a primitive and enter dimensions, or upload an STL and select the units it was exported in (mm, cm, m, in).
- Material: set density (kg/m³) or pick a preset (PLA, ABS, aluminum, steel, copper, etc.).
- Samples / accuracy: the CoM and inertia can be refined by increasing the Monte-Carlo / sampling count used for volume sampling — more samples → more stable inertia estimates for complex shapes.
- Output: table with volume, mass, CoM (X,Y,Z), surface area, full inertia tensor and principal moments; export as JSON for further use.
Important formulas
Volume & mass:
$$\text{Volume } V = \int_{\Omega} dV \qquad (\text{in } m^3)$$
$$\text{Mass } m = \rho \cdot V
$$
$$
\rho \ \text{is density in } kg/m^3$$
Center of mass (centroid) coordinates:
$$x_{c} = \frac{1}{V}\int_{\Omega} x \, dV,
$$
$$
y_{c} = \frac{1}{V}\int_{\Omega} y \, dV,
$$
$$
z_{c} = \frac{1}{V}\int_{\Omega} z \, dV$$
Inertia tensor about the centroid (3×3 matrix):
I = [[ Ixx, Ixy, Ixz ],
[ Ixy, Iyy, Iyz ],
[ Ixz, Iyz, Izz ]]
Principal moments are eigenvalues of the inertia tensor and describe resistance to rotation about principal axes.
Interface & controls
- Geometry Source — Primitive or STL upload.
- Primitive parameters — enter W / H / L or radius/height depending on the chosen shape; set position offsets (X, Y, Z).
- STL upload — choose file and the units the model was exported in; correct unit selection is essential for proper scaling.
- Units — choose display/working units (mm, cm, m, inch); internal computations use SI (meters).
- Density — enter kg/m³ or pick a preset material.
- Samples — number of random points / sampling resolution used for inertia estimation (increase for better accuracy).
- Compute — runs the calculations and fills the results table; Export JSON downloads the numeric results and meta information.
Notes about STL files
- Select correct units for the STL (mm/cm/m/in). If you choose the wrong unit, computed volumes, masses and inertia will be off by the cube of the scale factor.
- Meshes must be manifold / watertight for exact volume from a triangle-based algorithm. If the mesh has holes the tool attempts a signed-volume approach and will warn you if the computed volume is near zero.
- If the mesh orientation produces negative volume the tool will flip triangle orientation and recompute automatically.
Material density reference
| Material | Density, kg/m³ | Notes |
|---|---|---|
| PLA | 1240 | Common FDM filament |
| ABS | 1040 | Sturdy thermoplastic |
| PETG | 1270 | Durable, moisture resistant |
| Aluminum | 2700 | Light metal |
| Steel | 7850 | Structural steel, approximate |
| Copper | 8960 | High conductivity |
| Brass | 8500 | Copper-zinc alloy |
| Titanium | 4500 | High strength-to-weight |
Worked examples
Example A — rectangular box, material: PLA
Dimensions: Width W = 150 mm, Height H = 80 mm, Depth L = 60 mm. Density = 1240 kg/m³ (PLA).
Convert to meters: W = 0.150 m, H = 0.080 m, L = 0.060 m.
Volume:
\(V = 0.150 \times 0.080 \times 0.060\)
\(0.150 \times 0.080 = 0.012\)
\(0.012 \times 0.060 = 0.00072\ m^3\)
Mass:
\(m = \rho \cdot V = 1240 \times 0.00072 = 0.8928\ kg\)
Surface area, all faces:
\(A = 2(WH + WL + HL)\)
\(WH = 0.150 \times 0.080 = 0.012\)
\(WL = 0.150 \times 0.060 = 0.009\)
\(HL = 0.080 \times 0.060 = 0.0048\)
Sum = 0.0258 → \(A = 2 \times 0.0258 = 0.0516\ m^2\)
Approximate inertia – about centroid, standard box formulas:
For a solid rectangular block (mass m, sides W,H,L) the moments are:
\(I_x = \frac{1}{12} m (H^2 + L^2)\) around axis along W
\(I_y = \frac{1}{12} m (W^2 + L^2)\) around axis along H
\(I_z = \frac{1}{12} m (W^2 + H^2)\) around axis along L
Plugging the numbers gives, rounded:
- \(I_x \approx 0.000744\ kg\cdot m^2\)
- \(I_y \approx 0.001942\ kg\cdot m^2\)
- \(I_z \approx 0.002150\ kg\cdot m^2\)
Example B — solid cylinder
Dimensions: Radius R = 25 mm, Height H = 100 mm. Density = 2700 kg/m³ (Al).
Convert to meters: R = 0.025 m, H = 0.100 m.
Volume:
\(V = \pi \times (0.025)^2 \times 0.100 \approx 0.000196\ m^3\)
Mass:
\(m = \rho \cdot V \approx 2700 \times 0.000196 \approx 0.5301\ kg\)
Surface area (total, including caps):
\(A = 2\pi R(R + H) \approx 0.01963\ m^2\)
Inertia, solid cylinder:
Principal moments, about centroid:
\(I_z = \frac{1}{2} m R^2\) (axis along cylinder axis)
\(I_x = I_y = \frac{1}{12} m (3R^2 + H^2)\)
Numerical results:
- \(I_z \approx 0.000166\ kg\cdot m^2\)
- \(I_x = I_y \approx 0.000525\ kg\cdot m^2\)
Practical guidance & tips
- Units: Always confirm the STL units — a model exported in millimetres but imported as metres will be off by 1e9 in volume.
- Mesh quality: For exact analytical volume/inertia the mesh must be closed (watertight). If not, the tool attempts signed-volume methods and will issue a warning when results are unreliable.
- Sampling & accuracy: Monte-Carlo sampling is used to estimate inertia for complex, non-convex shapes; increase samples (e.g. 5k–50k) for more accurate principal moments at cost of runtime.
- Hollow models: If your model is a thin shell (e.g. STL exported as surface only), the tool treats the mesh as a surface and attempts a signed-volume approach — results may not reflect internal voids correctly.
- Export: Use the JSON export to save: geometry metadata, units, density, computed V, m, CoM, surface area, inertia tensor and principal axes.
Use cases
- Quick mass and CoM estimation for 3D printed parts (select appropriate filament density).
- Preliminary inertia data for simple mechanical assembly calculations.
- Educational demonstrations of how geometry and density affect mass distribution.
- Quality check before printing or manufacturing: check mass and surface area for cost/print time estimation.
Disclaimer: calculated values are engineering estimates. For final design and safety-critical work use detailed CAD analysis, FE solvers or certified measurement methods.
References
- Engineering Mechanics: Dynamics — J.L. Meriam, L.G. Kraige, Wiley.
- Mechanics of Materials — Ferdinand P. Beer, E. Russell Johnston Jr., John T. DeWolf, McGraw-Hill.
- Introduction to Solid Modeling Using SolidWorks — Joseph Musto, McGraw-Hill.
- Principles of Computer-Aided Design and Manufacturing — Farid Amirouche, Pearson.





