Subject:
|
Re: Hidden surface removal, and vertex order in part/primitive DAT files
|
Newsgroups:
|
lugnet.cad.dev
|
Date:
|
Mon, 27 Sep 1999 13:09:10 GMT
|
Viewed:
|
539 times
|
| |
| |
Chris Dee wrote in message ...
> I'd be mighty impressed, too, if you could do this automatically. For solid
> polyhedra, it's not too difficult as you can assume that the origin of the
> solid is within the material, but most Lego parts are re-entrent (ie. partly
> hollow), so there is not a single reference point which is inside the plastic.
> In the simplest case, imagine a 1x1 brick. For each outer side face there is a
> parallel inner face. These would need complmentary vertex sequences.
The algorithm I came up with yesterday will handle such cases.
Basically for every face in a polygon, I'll pass a ray through it and count
the number of polygons that it passes through. If there are an even number
of penetrations, then it should be safe to assume that the first one
encountered is an outside face, the next is inside, the next outside, etc.
If there are an odd number of penetrations, then the part isn't closed (such
as a stud with no bottom).
-GW
|
|
Message has 1 Reply:
Message is in Reply To:
56 Messages in This Thread:
- Entire Thread on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
This Message and its Replies on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
|