how to create a normal for 3 nodes

Altair Forum User
Altair Forum User
Altair Employee
edited October 2020 in Community Q&A

to create a bolt hole . i need to create a plane normal to three nodes . how to create plane normal to 3 nodes

 

 

regards,

JAMIE

Answers

  • Q.Nguyen-Dai
    Q.Nguyen-Dai Altair Community Member
    edited November 2017

    to create a bolt hole . i need to create a plane normal to three nodes . how to create plane normal to 3 nodes

    Do you mean 'a vector which is normal to plane defined by 3 nodes'?

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited November 2017

    Do you mean 'a vector which is normal to plane defined by 3 nodes'?

    YA

  • llyle_20499
    llyle_20499 New Altair Community Member
    edited November 2017

    Hello Jamie,

     

    To get normal defined by a plane of 3 nodes you can try the below:


    proc NormalFrmPlane {n1 n2 n3} {
        
        set lst_coord1 [lindex [hm_nodevalue $n1] 0];
        set lst_coord2 [lindex [hm_nodevalue $n2] 0];
        set lst_coord3 [lindex [hm_nodevalue $n3] 0];
        set vec1 [::hwat::math::GetVector $lst_coord1 $lst_coord2];
        set vec2 [::hwat::math::GetVector $lst_coord2 $lst_coord3];
        
        set normal [::hwat::math::VectorCrossProduct $vec1 $vec2];
        return $normal;
    }