Subject:
|
Re: Detemining Polygon Winding (Was: New Plugin for LDDesignPad)
|
Newsgroups:
|
lugnet.cad.dev
|
Date:
|
Wed, 7 Aug 2002 22:19:09 GMT
|
Viewed:
|
494 times
|
| |
![Post a public reply to this message](/news/icon-reply.gif) | |
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.
This assumes that all polygons have one inside face and one outside face. I
don't know if you can take this for granted with LDRAW. You should be able
to imagine some possible exceptions; a cube with one face missing is a
trivial example where this algorithm will fail.
In lugnet.cad.dev, Orion Pobursky writes:
> In lugnet.cad.dev, Carsten Schmitz write s:
> > Hello Orion,
> >
> > to program a plugin like that isn't too easy.
>
> Tell me about it.
>
> > I wish i could help but I am
> > an math idiot ;)
> > Maybe someone else can help in this matter?
>
> I think have the math right for determining polygon winding. The problem is
> this, how do can I traverse the polygonal faces of a convex or concave
> polyhedron(a part) and know that I'm looking at said polygon from the
> outside of the part (as opposed to the inside). My plugin works great for
> convex parts not so great for parts with concave portions.
>
>
> -Orion
|
|
Message has 2 Replies:
Message is in Reply To:
18 Messages in This Thread: ![New Plugin for LDDesignPad -Orion Pobursky (6-Aug-02 to lugnet.cad.dev)](/news/x.gif) ![](/news/46.gif) ![Re: New Plugin for LDDesignPad -Orion Pobursky (6-Aug-02 to lugnet.cad.dev)](/news/x.gif) ![](/news/46.gif) ![Re: New Plugin for LDDesignPad -Orion Pobursky (7-Aug-02 to lugnet.cad.dev)](/news/x.gif) ![](/news/46.gif) ![Re: New Plugin for LDDesignPad -Carsten Schmitz (7-Aug-02 to lugnet.cad.dev)](/news/x.gif) ![](/news/46.gif) ![Detemining Polygon Winding (Was: New Plugin for LDDesignPad) -Orion Pobursky (7-Aug-02 to lugnet.cad.dev)](/news/x.gif) ![](/news/46.gif) ![You are here](/news/here.gif) ![](/news/246.gif) ![Re: Detemining Polygon Winding (Was: New Plugin for LDDesignPad) -Erik Olson (7-Aug-02 to lugnet.cad.dev)](/news/x.gif)
![](/news/x.gif) ![](/news/x.gif) ![](/news/68.gif) ![Re: Detemining Polygon Winding (Was: New Plugin for LDDesignPad) -Orion Pobursky (7-Aug-02 to lugnet.cad.dev)](/news/x.gif) ![](/news/46.gif) ![Re: Detemining Polygon Winding (Was: New Plugin for LDDesignPad) -Don Heyse (8-Aug-02 to lugnet.cad.dev)](/news/x.gif) ![](/news/246.gif) ![Re: Detemining Polygon Winding (Was: New Plugin for LDDesignPad) -Don Heyse (8-Aug-02 to lugnet.cad.dev)](/news/x.gif)
![](/news/x.gif) ![](/news/x.gif) ![](/news/68.gif) ![Re: Detemining Polygon Winding (Was: New Plugin for LDDesignPad) -Orion Pobursky (8-Aug-02 to lugnet.cad.dev)](/news/x.gif) ![](/news/46.gif) ![Re: Detemining Polygon Winding (Was: New Plugin for LDDesignPad) -Don Heyse (8-Aug-02 to lugnet.cad.dev)](/news/x.gif) ![](/news/246.gif) ![Re: Detemining Polygon Winding (Was: New Plugin for LDDesignPad) -Erik Olson (8-Aug-02 to lugnet.cad.dev)](/news/x.gif) ![](/news/46.gif) ![Re: Detemining Polygon Winding (Was: New Plugin for LDDesignPad) -Don Heyse (8-Aug-02 to lugnet.cad.dev)](/news/x.gif)
![](/news/x.gif) ![](/news/x.gif) ![](/news/68.gif) ![Re: Detemining Polygon Winding (Was: New Plugin for LDDesignPad) -Anders Isaksson (8-Aug-02 to lugnet.cad.dev)](/news/x.gif) ![](/news/46.gif) ![Re: Detemining Polygon Winding (Was: New Plugin for LDDesignPad) -Steve Bliss (8-Aug-02 to lugnet.cad.dev)](/news/x.gif) ![](/news/46.gif) ![Re: Detemining Polygon Winding (Was: New Plugin for LDDesignPad) -Orion Pobursky (8-Aug-02 to lugnet.cad.dev)](/news/x.gif) ![](/news/46.gif) ![Re: Detemining Polygon Winding (Was: New Plugin for LDDesignPad) -Steve Bliss (9-Aug-02 to lugnet.cad.dev)](/news/x.gif)
- 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
|
|
|
|