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 / 7611
    New Plugin for LDDesignPad —Orion Pobursky
   I've completed my first plugin for LDDesignPad. It will take a file and BfC certify for CCW winding. There are a few limitations: 1.) It doesn't handle bad vertex sequences, so these need to be fixed prior to running. 2.) It won't add INVERTNEXT (...) (22 years ago, 6-Aug-02, to lugnet.cad.dev)
   
        Re: New Plugin for LDDesignPad —Orion Pobursky
   (...) Released for 20 minutes and I already found a major problem, concave portions of parts don't convert well. -Orion (22 years ago, 6-Aug-02, to lugnet.cad.dev)
   
        Re: New Plugin for LDDesignPad —Orion Pobursky
   After some more extensive testing, I've found this plugin to not work the way it was intended. It will still work for some files and for single sided, non-hollow "parts" but otherwise it will not produced adequate results. Oh well, I guess I (...) (22 years ago, 7-Aug-02, to lugnet.cad.dev)
   
        Re: New Plugin for LDDesignPad —Carsten Schmitz
   Hello Orion, to program a plugin like that isn't too easy. I wish i could help but I am an math idiot ;) Maybe someone else can help in this matter? Play well Carsten p.s.: I will put a link on my website as soon as I can spare some time. Work is (...) (22 years ago, 7-Aug-02, to lugnet.cad.dev)
   
        Detemining Polygon Winding (Was: New Plugin for LDDesignPad) —Orion Pobursky
   (...) Tell me about it. (...) 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 (...) (22 years ago, 7-Aug-02, to lugnet.cad.dev)
   
        Re: Detemining Polygon Winding (Was: New Plugin for LDDesignPad) —Erik Olson
   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 (...) (22 years ago, 7-Aug-02, to lugnet.cad.dev)
   
        Re: Detemining Polygon Winding (Was: New Plugin for LDDesignPad) —Erik Olson
     Error: read: Count how many *other* polygons this line segment intersects. for Count how many polygons this line segment intersects. Or, if counting your own polygon, switch even and odd. (22 years ago, 7-Aug-02, to lugnet.cad.dev)
   
        Re: Detemining Polygon Winding (Was: New Plugin for LDDesignPad) —Orion Pobursky
   (...) 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)
   
        Re: Detemining Polygon Winding (Was: New Plugin for LDDesignPad) —Don Heyse
   (...) 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 (...) (22 years ago, 8-Aug-02, to lugnet.cad.dev)
   
        Re: Detemining Polygon Winding (Was: New Plugin for LDDesignPad) —Don Heyse
     (...) 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) —Orion Pobursky
   (...) 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)
   
        Re: Detemining Polygon Winding (Was: New Plugin for LDDesignPad) —Don Heyse
   (...) OK, but if the quads and triangles don't form a single closed surface, or actually a bunch of closed surfaces, then the algorithm won't work. However, like I said, if you find something that works, post the code or the algorithm and you'll be (...) (22 years ago, 8-Aug-02, to lugnet.cad.dev)
   
        Re: Detemining Polygon Winding (Was: New Plugin for LDDesignPad) —Erik Olson
     Portals. It's not backface culling, it's testing all polygons for visibility using possible rays through the openings, or from the sides of a bounding box. This is no longer culling based on front/back but true visibility that is computed once at (...) (22 years ago, 8-Aug-02, to lugnet.cad.dev)
    
         Re: Detemining Polygon Winding (Was: New Plugin for LDDesignPad) —Don Heyse
     (...) Oops, I guess you caught me. I knew about that one but I'm too lazy to implement it. Isn't that the method used by MLCAD? (...) Yeah, probably. Seems like only yesterday I was all excited about some code snippet of his that I found on the (...) (22 years ago, 8-Aug-02, to lugnet.cad.dev)
   
        Re: Detemining Polygon Winding (Was: New Plugin for LDDesignPad) —Anders Isaksson
   "Don Heyse" <dheyse@hotmail.spam....away.com> skrev i meddelandet news:H0I44E.2vE@lugnet.com... (...) An idea: Drawing with a software Z-buffer it's trivial to note _which_ polygons are the finally visible ones (at every pixel). Those are on the (...) (22 years ago, 8-Aug-02, to lugnet.cad.dev)
   
        Re: Detemining Polygon Winding (Was: New Plugin for LDDesignPad) —Steve Bliss
   (...) Also, once you know the direction for one (or more) polygons, any polygons that share an edge can have their direction determined. If polygon #1 has wrapping ABCD, and polygon #2 has vertices ABEF, then polygon #2's wrapping will involve a (...) (22 years ago, 8-Aug-02, to lugnet.cad.dev)
   
        Re: Detemining Polygon Winding (Was: New Plugin for LDDesignPad) —Orion Pobursky
   (...) Or I could say that the first polygon in a part must be wound correctly and then proceed from there. (22 years ago, 8-Aug-02, to lugnet.cad.dev)
   
        Re: Detemining Polygon Winding (Was: New Plugin for LDDesignPad) —Steve Bliss
   (...) Correcting the winding shouldn't be too bad -- if the L3 code is available (ie, look in the ldglite source code) -- check how Lars detects bad winding, and how he figured the (more) correct winding. Steve (22 years ago, 9-Aug-02, to lugnet.cad.dev)
 

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