开发者

Calculate volume based on STL file

开发者 https://www.devze.com 2022-12-23 21:10 出处:网络
Just wondering if anyone had a simple, efficient way of calculating the volume of a stereolithographic 开发者_如何学Cfile (STL)? And rendering this in a Windows Form Control?Well, you can take every t

Just wondering if anyone had a simple, efficient way of calculating the volume of a stereolithographic 开发者_如何学Cfile (STL)? And rendering this in a Windows Form Control?


Well, you can take every triangle and project it to the XY plane, giving you a triangular-prism. Add the volume of this prism to your total if the triangle runs CCW, and subtract that volume if it runs clockwise. That will give you the volume of your solid, assuming it's valid STL.

Or... do the HxWxL of your bounding box: it's really 1) simple and 2) efficient, although it can be slightly inaccurate.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号