开发者

Calculate volume based on STL file

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜