Nodes Rotations - Local Axes (API)

Nodes Rotations - Local Axes (API)

Stephane.kapetanovic
Mentor Mentor
299 Views
1 Reply
Message 1 of 2

Nodes Rotations - Local Axes (API)

Stephane.kapetanovic
Mentor
Mentor

A copy of a popular discussion thread from 2012. 

Stephanekapetanovic_0-1734248681846.png

Dim mtx(3, 3) As Double, 
Bar.GetLocalMtx mtx(0, 0), mtx(0, 1), mtx(0, 2), mtx(1, 0), mtx(1, 1), mtx(1, 2), mtx(2, 0), mtx(2, 1), mtx(2, 2)
'- then transform results from GCS to LCS this way I guess:
'F(x,y,z)
newvals(0) = vals(0) * mtx(0, 0) + vals(1) * mtx(0, 1) + vals(2) * mtx(0, 2)
newvals(1) = vals(0) * mtx(1, 0) + vals(1) * mtx(1, 1) + vals(2) * mtx(1, 2)
newvals(2) = vals(0) * mtx(2, 0) + vals(1) * mtx(2, 1) + vals(2) * mtx(2, 2)
'M(x,y,z)
newvals(3) = vals(3) * mtx(0, 0) + vals(4) * mtx(0, 1) + vals(5) * mtx(0, 2)
newvals(4) = vals(3) * mtx(1, 0) + vals(4) * mtx(1, 1) + vals(5) * mtx(1, 2)
newvals(5) = vals(3) * mtx(2, 0) + vals(4) * mtx(2, 1) + vals(5) * mtx(2, 2)

 

Stéphane Kapetanovic

Did you find this post helpful? If it gave you one or more solutions,
don't forget to accept the solution and leave a < like !
EESignature
0 Likes
300 Views
1 Reply
Reply (1)
Message 2 of 2

Stephane.kapetanovic
Mentor
Mentor

next

Stéphane Kapetanovic

Did you find this post helpful? If it gave you one or more solutions,
don't forget to accept the solution and leave a < like !
EESignature
0 Likes