How to tranform cordinates with respect to csys?

User: "Altair Forum User"
Altair Employee
Updated by Altair Forum User

Hi all,

 

I have a node , say 659801 and I have coordinates as (138, 150 ,0) and coordinate system id =345

Now, I want the above coordinates with respect to some other coordinate system say, 400.

I am not able to locate HM-APIs which does this transformation?

Please suggest me a way or API to do this transformation of coordinates..

 

Regards

Gopal

 

Find more posts tagged with

Sort by:
1 - 3 of 31
    User: "tinh"
    Altair Community Member
    Updated by tinh

    Hi,

    try hm_xpointlocal system_id x y z

    x y z are global coord, and system_id is a local system

    above function will return coordinate x in the local system

    User: "tinh"
    Altair Community Member
    Updated by tinh

    Anyway, even if there is no available api, can you write it your self? it's just some 3x3-matrix operations.

    User: "Altair Forum User"
    Altair Employee
    OP
    Updated by Altair Forum User

    Hi Tinh,

    I was able to do the transformation using the command suggested by you.

    First I got global x, y z using below commands

        set ngx [hm_getentityvalue nodes $node globalx 0]
        set ngy [hm_getentityvalue nodes $node globaly 0]
        set ngz [hm_getentityvalue nodes $node globalz 0]

    Then used the below command for getting coordinate with respect to local system id of need.

    set xnode [hm_xpointlocal $n_systemId $ngx $ngy $ngz]    
     set znode [hm_zpointlocal $n_systemId $ngx $ngy $ngz]    

     

    It is working perfectly..

    Thanks for your valuable suggestion.It saved a lot of time for me.

     

    Regards

    Gopal