Finding farthest node between 2 groups

Tamilvanan
Tamilvanan Altair Community Member
edited October 2020 in Community Q&A

Is there any API to find the farthest nodes between 2 node groups like we have to find the shortest node(hm_measureshortestdistance)?

 

Answers

  • tinh
    tinh Altair Community Member
    edited September 2019

    No, there isn't.

     

  • Q.Nguyen-Dai
    Q.Nguyen-Dai Altair Community Member
    edited September 2019

    You can estimate simply as show in below picture D = D_AB - (D_A + D_B)

    dist.png.58e5e9305f100a29feebd22e0247e3f2.png

     

  • Tamilvanan
    Tamilvanan Altair Community Member
    edited September 2019

    How can i do the same in script?

     

  • Q.Nguyen-Dai
    Q.Nguyen-Dai Altair Community Member
    edited September 2019

    Maybe some ideas:

    • Compute mean (geometrical) node N1 of Group_1
    • Compute mean node N2 of Group_2
    • Compute the line (Delta) passing by N1 & N2
    • On the line Delta, choose two Point A & B which covers two groups.
    • Compute the distance AB by using their coordinates
    • Compute the distance D_A & D_B thanks to 'hm_measureshortestdistance'