Volume calculator

 From:  dinos
7421.8 
I did a volume calculation script some time ago, but i didn't post it as it could use some more polishing.
Even so, it works fine for my needs (3D printing).

It uses a different method from Max's script (BTW, cool script & idea Max!).

This script works by exporting the selected solid to an STL file and then loads it back and calculates the volume from the STL data.
Accuracy is adjustable by editing the Angle value at line 12. I've settled on 3 degrees as a nice compromise between speed and accuracy.
Overall its is really fast unless you go too crazy with the angle.

Its biggest limitation is that you have to manually set the STL export format to Ascii. Reading the binary format without typed arrays would be too slow and complicated i think.

That can be easily fixed if there is a way to set the STL export options to Ascii during export, but nothing that i tried worked.
Perhaps Max or Michael can help!


Dinos
Attachments: