I have a STL files that contains 3d model of basic ball and another 3d model of some weird block. I was given the task of finding out volume of model and the possible supported Material? This is how I calculate.
BoundingBox Volume = lenght x width x depth (values are got from stl file)
Volume of Model is based on
var v321 = (v3.x) * (v2.y) * (v1.z),
v231 = (v2.x) * (v3.y) * (v1.z),
v312 = (v3.x) * (v1.y) * (v2.z),
v132 = (v1.x) * (v3.y) * (v2.z),
v213 = (v2.x) * (v1.y) * (v3.z),
v123 = (v1.x) * (v2.y) * (v3.z);
return (v231 - v321 - v132 - v213 + v123 + v312) / 6.0;
(these values are from STL file) and seems correct.
Now How do I calculate the support material volume ?