Find angle between 3 nodes using TCL

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

Hello Friends,

 

I want to find out angle between 3 nodes using TCL, can you please help me out. Thanks in advance.

Tagged:

Welcome!

It looks like you're new here. Sign in or register to get started.

Answers

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited March 2015

    Maybe ::hwat::math::AngleBetweenVectors can help you ? See my screenshot.

    <?xml version="1.0" encoding="UTF-8"?>post-889-0-35165200-1426011043_thumb.png

  • tinh
    tinh Altair Community Member
    edited February 2017

    Hi ARJUN,

    In HM14, use this command:

    hm_getangle nodes $NodeId1 $NodeId2 $NodeId3

     

    If you cannot register as a member, contact to administrators please

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited February 2017

    Hi ARJUN,

    In HM14, use this command:

    hm_getangle nodes $NodeId1 $NodeId2 $NodeId3

     

    If you cannot register as a member, contact to administrators please

    Can i Use the same code for HM version  12 too?

    Is there a code to open file(.inp) location via directories specified by the user? (to take in the directory as a string and pass it on to a pointer to locate it)

    Also how to enter the contents (node co ordintes, distances, and angle) into a excel sheet, whose directory is given by the user(as it changes time to time)?

  • tinh
    tinh Altair Community Member
    edited February 2017

    Yes, the code is available in HM12 also

    To open/import file, you delete .../documents/command.cmf

    import the file by menu File>Import

    then turn back to open command.cmf (by notepad for example), you will see relevant commands

     

    to put the contents into excel sheet, you can write it to a csv file , please refer to tcl manual online for commands: open, puts, join, close.

    Sample codes appear on web very much, you can find

Welcome!

It looks like you're new here. Sign in or register to get started.

Welcome!

It looks like you're new here. Sign in or register to get started.