Re: STL file format

From: Dick Newton (Ford Motor Company)
Date: Monday, September 26, 1994

From: Dick Newton (Ford  Motor Company)
To: RP-ML
Date: Monday, September 26, 1994
From: newton@rrm.org (Dick Newton - Ford)
Subject: Re: STL file format
In a previous posting
>From: ckirsch@eng.clemson.edu (Chuck Kirschman)
>> 3.  The object must be in the first octant - no zero or
>>     negative coordinates are allowed.  (A silly restriction,
>>     I guess 3D System's old programmers had trouble with
>>     addition and subtraction :) ). 

It is interesting that the STL specification states that the file
coordinates must be in the first octant, yet the DTM's build space is
cylindrical and centered at 0, 0, 0. Most files built on the DTM
overlap four octants (extend into negative x and y).

>2 is noteworthy.  I believe that we (the RP community) should take 
>advantage of the 80 characters of header information to state this
>and other information, such as if it is a non-closed solid (support),
>which CAD pkg, and so on.

I agree, as long as these "extensions" are well documented, usefull and
agreed to by the rapid prototyping community as a whole (ie not just
useful to one particular RP vendors process). They shouldn't break any
existing software either. (I believe Helisys currently uses part of the
header to indicate if the file has been sorted and pseudo facets have
been removed. 3D systems uses part of the header to indicate if it has
been run thru 3D verify.)

>The last point also explains why you can't use a Resolution of 10,000
>on a 10 inch part (100,000 > 64k).  Why you get a resolution choice,
>though, I don't exactly know.  Seems they should auto scale.

If they auto-scaled and you were building two parts of different sizes
at the same time, how is the software to know what resolution to use.
For instance, if you had a 2x2x2 inch part and a 4x4x4 inch part that
you're making in the same build, the auto scaling would set the
resolution on the 2 inch part to 32,000 and the 4 inch part to 16,000.
When you merge these parts, which resolution is in effect. Older
versions of partman for the SLA 500 had a similar problem. If you added
parts to a build that effected the max resolution and didn't reslice
everything you'd have problems.

>Another problem with the STL format is that it does not specify what
>happens when multiple objects are containted in the same file.  Luckily,
>the defacto use is that there is a comment at every object start, and
>almost everyone seems to agree on this.  This makes it possible to 
>simply concatenate multiple STL files.

Not everyone agrees on this. Helisys and Imageware will not handle 
concatentated STL files. Packages such as 3D systems View and partman
and Solid Concepts STLTRANS will destroy this extra header information if
you read the file in, manipulate the file, and write it out.  

>One other thing to think about is that there are typically one half as
>many point as facets, so each point is listed in the file multiple times.
>Several smaller files based on meshing have been proposed, and I'd like
>to see one of them come into use.

I agree. A format like wavefront's object format would more space efficient.
A list of point coordinates at the start of the file, followed by a list 
of triangles (or polygons) that reference those points. It might also have
the benefit of making software vendors check to see if their stl files
are well connected. 

What is the purpose of the normals? The normal information is
redundant. Why not base the normal on the order of the facets in the
triangle? All it takes is a dot product to calculate it. (BTW, Helisys
pretty much totally ignores the normal information, and running a file
thru their software will totally mess up the normals and makes the file
unusable on other (ie SLA, DTM) machines).

Also, what is the purpose of the two bytes of pad on the end of the
triangles?  Is this wasted space? It makes every other triangle
un-aligned on 32 bit machines that require 4 byte boundry alignment
on structures. 

Why do CAD vendors output files that are not well connected, (ie
each triangle shares all its edges with other triangles and each edge
is only connected to one other edge)? A closed volume that meets these
connectivity requirements MUST have an EVEN number of triangular
facets. Why do I see stl files that the CAD vendors insist are "good"
with ODD numbers of facets?

The STL file format does work but it does have it's problems. Maybe this
forum could work to clarify and document some of these inconsistencies. 

Dick Newton


Previous message | Next message
Back to 1994 index