Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware API
      • ZBrush GoZ API
      • Code Examples on Github
    • Forum
    • Downloads
    • Support
      • Support Procedures
      • Registered Developer Program
      • Plugin IDs
      • Contact Us
    • Categories
      • Overview
      • News & Information
      • Cinema 4D SDK Support
      • Cineware SDK Support
      • ZBrush 4D SDK Support
      • Bugs
      • General Talk
    • Unread
    • Recent
    • Tags
    • Users
    • Login

    BuildNgonFromPolys() failing...

    SDK Help
    0
    42
    30.9k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • H
      Helper
      last edited by

      THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

      On 09/04/2008 at 11:12, xxxxxxxx wrote:

      I'm in the process of a massive revamp of all the code listed previously in this thread, but I just wanted to add a comment for future reference...
      While not specifically documented as such, pNgonBase- >BuildNgon() requires that in addition to the PGONEDGE_ENDSEGMENT flag for end segments, you also have to set the PGONEDGE_NOEDGES flag for any polys included in the Ngon, but have no outer (or potentially inner) edges that make up the edge list.
      In my case, it seems to be sufficient to just add one edge (I use the 0 edge) to the list for each of those polys, like so...
      pEdges[edgecount++] = (noedge_poly_index * 4)+0 | PGONEDGE_NOEDGES;
      ...I am adding that (or those) to the 'outer' edge list that I'm passing to **pNgonBase- >BuildNgon() **and this seems to have fixed some cases where a poly contributed no outer edges (I'm not passing the inner edge list, since I'm not doing 'holes').

      1 Reply Last reply Reply Quote 0
      • H
        Helper
        last edited by

        THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

        On 09/04/2008 at 11:17, xxxxxxxx wrote:

        (I realize the '+0' is unneeded and not doing anything, it's just there to indicate the 0 edge 🙂 ).

        1 Reply Last reply Reply Quote 0
        • First post
          Last post