Convert Selection Point to Edge



  • 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?



  • 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.)



  • 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


Log in to reply