Thread Subject: Surface area of a stl surface

Subject: Surface area of a stl surface

From: bob

Date: 11 Jan, 2012 06:11:08

Message: 1 of 2

Hey,
I have a stl file of a 3d particle with irregular shape. I want to open this file in Matlab and measure the surface area.
How can I do that?

Subject: Surface area of a stl surface

From: Roger Stafford

Date: 11 Jan, 2012 07:31:08

Message: 2 of 2

"bob " <behzad.majidi@gmail.com> wrote in message <jej95s$o86$1@newscl01ah.mathworks.com>...
> Hey,
> I have a stl file of a 3d particle with irregular shape. I want to open this file in Matlab and measure the surface area.
> How can I do that?
- - - - - - - - - - -
  I can't help with parsing the STL file, but the total surface area should simply be the sum of the areas of all the triangles represented there. (I assume its facets are all triangles.)

  Suppose you have somehow obtained three arrays, V1, V2, and V3, each one n by 3 in size, where n is the number of triangles, and where a corresponding row in each gives the three coordinates of each of the three vertices of a represented triangle. We simply find the sum of the areas of these n triangles.

  C = cross(V2-V1,V3-V1,2);
  A = 1/2*sum(sqrt(sum(C.^2,2))); % A is the total area

Roger Stafford

Tags for this Thread

Everyone's Tags:

Add a New Tag:

Separated by commas
Ex.: root locus, bode

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Tag Activity for This Thread
Tag Applied By Date/Time
stl file bob 11 Jan, 2012 01:14:13
surface area me... bob 11 Jan, 2012 01:14:13
3d display bob 11 Jan, 2012 01:14:13
shape bob 11 Jan, 2012 01:14:13
rssFeed for this Thread

Contact us at files@mathworks.com