Subject:
|
Re: Detemining Polygon Winding (Was: New Plugin for LDDesignPad)
|
Newsgroups:
|
lugnet.cad.dev
|
Date:
|
Thu, 8 Aug 2002 00:38:20 GMT
|
Viewed:
|
694 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:
Message is in Reply To:
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
|
|
|
|