Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware API
      • ZBrush Python 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

    Convert Selection Point to Edge

    SDK Help
    0
    3
    283
    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 22/02/2004 at 16:38, xxxxxxxx wrote:

      User Information:
      Cinema 4D Version:   8.206 
      Platform:      
      Language(s) :     C++  ;

      ---------
      Hi,
      My plugin im making generates a new polygons. Now I need code to select the edge of the newly created polygon.
      I can do that with a BaseSelect, but my problem is that my code selects the wrong edge sometimes. Depending on the geometry of the surrounding polygons depends on what edge I need to select.
      Luckily, I know the two points of the edge that needs to be selected. I also know the polygon that needs to have an edge selected.
      What I don't know is how to select the edge based off those two points.
      There is two methods I can see how to do this.
      1. Select the two points, and use SendModelingCommand and use MCOMMAND_CONVERTSELECTION. But I can't work out how to use this command. And not the way I really want to do it, although I will if it works
      2. My prefered choice, because it wont intefere with point selection, is to find out an algorithm to find out what edge those two points belong too manually. Perhaps using a neighbor class?
      Either way I can't think of a way to do it.
      Any ideas?

      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 22/02/2004 at 16:51, xxxxxxxx wrote:

        I think you just have to get the PolyInfo structure for the new polygon, then check each of the four edges to see which one it is that you want. (The one that shares your two points.)

        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 24/02/2004 at 16:48, xxxxxxxx wrote:

          Thanks Mikael, I didn't think about doing that

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