Following a comment here I have updated the Glob_to_loc3 and Loc_to_glob3 functions to deal with some problems when the local longitudinal axis is parallel to the global Y or Z axes. The IP2 spreadsheet, including the revised functions, can be downloaded from:
The screen shots below show documentation for the functions, and an example of results with a beam parallel to the Z axis:
The documentation has been edited to clarify the difference between the axis type options:
The same example is used for both functions, with a beam parallel to the global Z axis, with the direction from Node 1 to Node 2 in the negative Z direction:
The function also has an option to return the rotation matrix, R0 (Out = 1):
The download file has the input for the Glob_to_loc function linked to the Glob_to_loc3 input, and the associated Gamma angle, to show that the results are consistent. The input for these (or any other example functions) may of course be freely modified.