Alingned Node Coordinate Value (TCL Script)

User: "Felipe Cunha1"
Altair Community Member
Updated by Felipe Cunha1

Hi,

 

How can I determine the node coordinates aligned from two nodes without need to use a temporary node technique.

A function type:

Input1:   two nodes N1 and N2    ( For Vector Definition)

Input2:   Node   N3  ( To be projected perpendicularly  to N1 and N2 vector )

output:  Aligned N3     (New Coordinate  ==>  X,Y and Z )

 

Thanks in Advance,

Felipe

 

Find more posts tagged with

Sort by:
1 - 7 of 71
    User: "tinh"
    Altair Community Member
    Updated by tinh

    Hi

    I don't remember transforming matrix. But use vectors to find V04:

    (N4 is projected of N3)

    <?xml version="1.0" encoding="UTF-8"?>20190612_101312.thumb.jpg.11e1f9ab9cf2e9777086865282d49a16.jpg

     

    From V13 you can utilize built-in package math::linearalgebra

     

    <?xml version="1.0" encoding="UTF-8"?>20190612_101802.thumb.jpg.1c741f46ed956fc016fe83879ddb0147.jpg

    User: "Felipe Cunha1"
    Altair Community Member
    OP
    Updated by Felipe Cunha1

    Hi Tinh,

     

    I really appreciated your code, but unfortunately HM could not found the ::math::linearalgebra package. It is possible be installed our use an similar  hypermesh library?

     

    Thanks,

    Felipe

    User: "Felipe Cunha1"
    Altair Community Member
    OP
    Updated by Felipe Cunha1

    Hi Tinh,

     

    I found a similar functions in hypermesh:

    ::hwat::math::VectorCrossProduct {vector1} {vector2}

    ::hwat::math::VectorNormalize {valuelist} normvalue

     

    It solved now.

     

    Thanks very much!

    Felipe

    User: "tinh"
    Altair Community Member
    Updated by tinh

    Even if there is no available function, you can write them easily. Google for their formula.

    User: "tinh"
    Altair Community Member
    Updated by tinh

    An example expanse usage of expr command to do vector operations:

    <?xml version="1.0" encoding="UTF-8"?>20190613_085919.thumb.jpg.3584f7f5a8818834824fa4e2c5e1f968.jpg

    User: "Manoj Yandra"
    Altair Community Member
    Updated by Manoj Yandra

    I want to get the coordinates of a node and use it in defining the base point (while projecting). Can you please tell me how to do this?

    User: "tinh"
    Altair Community Member
    Updated by tinh

    Try

    set coords [ join [hm_nodevalue $nid]]