To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.cad.devOpen lugnet.cad.dev in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 CAD / Development / 2908
2907  |  2909
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:
  Re: Hidden surface removal, and vertex order in part/primitive DAT files
 
(...) That should have read, for every polygon in the element or primitive. (25 years ago, 27-Sep-99, to lugnet.cad.dev)

Message is in Reply To:
  Re: Hidden surface removal, and vertex order in part/primitive DAT files
 
(...) 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 (...) (25 years ago, 27-Sep-99, to lugnet.cad.dev)

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
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR