Welcome! Log In Create A New Profile

Advanced

Fwd: Re: Problem with AoI STL generator code

Posted by Adrian Bowyer 
Fwd: Re: Problem with AoI STL generator code
March 10, 2007 05:13AM
Mea culpa! After complaining about people posting to the wrong list,
now I just did.

Sorry.

- A.
----- Forwarded message from A.Bowyer@bath.ac.uk -----
Date: Sun, 04 Mar 2007 19:16:28 +0000
From: Adrian Bowyer
Reply-To: Adrian Bowyer
Subject: Re: Problem with AoI STL generator code
To: Forrest Higgs

Quoting Forrest Higgs :

> Can somebody check my work on this before I go to Peter Eastman over
> at Art of Illusion about the STL generator file code? He's been a
> really nice guy and I don't want to ask him about something that I
> might be wrong about.
>
> Take a look at the first triangle in the STL file for the coupling
> for the Mk 2. I just copied this from the file and pasted it here.
>
> *************************************************************************************************
> solid "drive-coupling"; Produced by Art of Illusion 2.0, Sun Feb 18
> 14:59:42 PST 2007
> facet normal -0 -1 0
> outer loop
> vertex 3 -7.5 6
> vertex 3 0.407902201579 8
> vertex 3 8.5 6
> endloop
> endfacet
> *************************************************************************************************
>
> I calculate that the facet normal should be...
>
> facet normal -1 0 0

Yup - you're right. The three points lie in the plane x=3, so the
normal must be parallel to the X axis.

Don't get in touch with Pete, though. It's Nik Trevallyn-Jones who did
the STL stuff.

> Are you not using the Facet Normal values in your slicing routine?

No - I try to use the absolute minimum of geometric data that I can,
and to maximise the amount of logic that it uses. That way I think I'm
avoiding as much of the inherent nastyness of the STL file format.

This is how mine works:

1. Slice all the triangles with a plane parallel to the XY plane to get
a bunch of line segments in that plane.

2. Tie the ends together pairwise using a recursive quad-tree.

3. Loop round the end-containing quads finding polygons.

4. Decompose each polygon into a CSG expression

5. Form the over-arching CSG expression that represents all the
polygons by membership testing to find which polygon is inside which.

After step 4 the data structure is fully robust (in that it must
represent a shape in the plane, guaranteed no leaks; of course if the
STL was crap the shape may be wrong, but it's never not a shape.)

Once you have the polygons in CSG, offsetting can be done with simple
arithmetic and zero thought, as can working out differences between
layers (for support material), finding where lines cross for infill,
and all the rest.

Yours

Adrian

[staff.bath.ac.uk]
[reprap.org]


----- End forwarded message -----


Yours

Adrian

[staff.bath.ac.uk]
[reprap.org]
_______________________________________________
Developers mailing list
Developers@reprap.org
[reprap.org]
Sorry, only registered users may post in this forum.

Click here to login