Jump to content
JAMIE

how to create a normal for 3 nodes

Recommended Posts

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;
}

Pandurang likes this

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
You are posting as a guest. If you have an account, please sign in.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...