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 / 7638
7637  |  7639
Subject: 
Re: Detemining Polygon Winding (Was: New Plugin for LDDesignPad)
Newsgroups: 
lugnet.cad.dev
Date: 
Thu, 8 Aug 2002 00:38:20 GMT
Viewed: 
568 times
  
In lugnet.cad.dev, Orion Pobursky writes:
In lugnet.cad.dev, Erik Olson writes:
The simple algorithm:

Project a normal from any vertex of the polygon to some point far beyond the
object. Count how many polygons this line segment intersects. If odd, the
normal was pointing in, if even, the normal was pointing out.

Thanks for the info, but it's easier written than applied.  It'll take an
entire revamp of my code.

I wouldn't bother.  This well known algorithm is based on an assumption
that simply isn't true for the parts files.  The assumption is that there
is one single enclosed space inside of each part.  But I think the studs
are open at one end and are positioned with the open end on top of another
surface.  This breaks the algorithm.

I think Leonardo whipped up some java code to do this a while back but
got stuck at the same place.  Too bad.  If we had a nifty algorithm we
could do this when parsing the parts and eliminate the need to pollute
the files with all that silly BFC stuff.

If you come up with a method that works, post the algorithm and do us
all a huge favor.

Enjoy,

Don

Don



Message has 2 Replies:
  Re: Detemining Polygon Winding (Was: New Plugin for LDDesignPad)
 
(...) I love searching lugnet for neat old stuff... (URL) can't remember if any working code ever came out of this 3 year old thread, but this *is* a nifty sounding algorithm. If I were working on that plugin, I'd probably go back and read the (...) (22 years ago, 8-Aug-02, to lugnet.cad.dev)
  Re: Detemining Polygon Winding (Was: New Plugin for LDDesignPad)
 
(...) Yes but I'm not parsing primitive subfiles in my plugin, just quads and triangles. -Orion (22 years ago, 8-Aug-02, to lugnet.cad.dev)

Message is in Reply To:
  Re: Detemining Polygon Winding (Was: New Plugin for LDDesignPad)
 
(...) Thanks for the info, but it's easier written than applied. It'll take an entire revamp of my code. -Orion (22 years ago, 7-Aug-02, to lugnet.cad.dev)

18 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