RE: Mass properties of an STL file.

From: Stephane Morvan (
Date: Thu Jul 18 2002 - 23:32:21 EEST


There is a sample C++ code at which I
wrote back when I was in grad school. If I recall, might do some of
that. It will compute the wetted surface (overall surface of the .stl
file) and the overall volume, as well as perform minor corrections on
the file. Neither method was tested for robustness, so if you have a
very large number of triangles your result might be significantly
affected by roundoff errors.

Go to the download section, and get stl2vrml. It has a base class to
read in and out stl files, which has all these functions. You can
probably add to it, and share your experience with the community. This
is Unix code, but should work just fine on any Posix compliant systems
(Unixes, Linux...) and could probably be compiled in Visual Studio as a
command shell program.

Good luck to you,

Stéphane Morvan,
Multistation S.A.
Ph: +33-(0)1-43-20-96-96
Main: +33-(0)2-99-16-35-35
Mobile: +33-(0)6-85-43-57-84

-----Original Message-----
From: [] On
Behalf Of John Mastoloni
Sent: Thursday, July 18, 2002 5:25 PM
Subject: Mass properties of an STL file.

Dear list:
    Is there any open code for finding the mass properties of an STL
(surface area, boundary box and volume)

John Mastoloni
M2 Systems

200 Myrtle St
New Britain CT 06053

For more information about the rp-ml, see

For more information about the rp-ml, see

This archive was generated by hypermail 2.1.4 : Tue Jan 21 2003 - 20:14:02 EET