Hello,
I have a free-form roof steel grid where I want to calculate the in-plane and out-of-plane bending moment of my bars at each connection.
I have read all the posts about how to set the gamma angle in my bars, but when I do it, I don't get the right orientation:
I take two bars at the connection I want to analyze.
I create two vectors, from the connecting node to the end nodes of the bars.
I calculate the cross product of the two vectors, that gives me the normal vector of the plane between the two bars = mynormal
I calculate the gamma angle that my bar should have to be orientated in the direction of the plane I want (mynormal in global coordinates) :
foundgamma = myRobotBar.CalcGamma( mynormal(0), mynormal(1), mynormal(2))
myRobotBar.gamma = foundgamma
I dont' get the right angle. By doing it aproximately with the Robot GUI, I get a gamma angle of -37 degrees, with my script 1.38 .
I have check every step and it is right, the only thing I cannot check is the function CalcGamma, because I don't know the z local axis vector
Does the function CalcGamma returns the angle in radians or degrees?
Alternatively I would like to get the local z vector of my bar in global coordinate, so I can calculate the angle myself and transform the moments to the axis I want.
How can I do this?
I have been working on this for days, any help is greatly appreciated.
Cheers,
V.
Alternatively I would like to get the local z vector of my bar in global coordinate, so I can calculate the angle myself and transform the moments to the axis I want.
Bar.GetLocalMtx to get transformation matrix
Example :
Is LocalMtx the transformation matrix that transform a vector given in local coordinates to a vector in global coordinates?
Local to global : vector x transposed mtx
Global to local : vector x mtx
Also, do you know if in Robot 2014 Calcgamma retuns the angle in degrees?
Degrees, I guess