Clarify the member local coordinate system convention#315
Conversation
| - For other members, the local x-axis is projected into the global XZ plane and the local y-axis is | ||
| determined by the cross product of this projected vector and the member local x-axis. The ordering | ||
| of the cross product is such that the resulting local y-axis has a positive global y component (i.e. | ||
| the top of the beam is always pointing in the positive global y direction) |
There was a problem hiding this comment.
The local x axis is always the vector from the i-node to the j-node, and the local y-axis is always 90 degrees from the x-axis. This is important for beams that slope (e.g. roof members). It is not a projection.
There was a problem hiding this comment.
Yes, the X axis is always the beam direction, I was detailing the process for determining the local y-axis for diagonal beams (this else branch) which involves a projection and a cross product.
If it's not clear that this is for determining the y-axis, rather than a modification of the x-axis, I can reword
|
|
||
| Rotations are applied by using the right-hand rule, with positive rotations being clockwise if | ||
| looking down the member from the i-node to j-node. | ||
|
|
There was a problem hiding this comment.
The right hand rule says counter-clockwise rotations are positive.
There was a problem hiding this comment.
It will only be CCW if you're looking down the beam with the local X pointing towards you. Looking from the i-node -> j-node (local X away from you) it will be CW
There was a problem hiding this comment.
Your right hand grips the axis, and your thumb points down it. The direction of your grip is counter-clockwise if your thumb represents the positive x-axis starting at i and heading toward j.
Unless you twist your right hand so your thumb is pointing away from you in an unnatural way, when you look at it it's counter-clockwise.
There was a problem hiding this comment.
Agree with everything except the CW/CCW conclusion.
In the image on the right, the i-node would be bottom left, j-node top right. If your head was down at the i-node (i.e. local x-axis pointing away from you) you would see the fingers curling CW. It will appear CCW if your thumb is pointing back towards you, but then you'd be looking from the j-node to the i-node.
In any case, CW rotation is what Pynite implements:

model = FEModel3D()
n1 = model.add_node("n1", 0, 0, 0)
n2 = model.add_node("n2", 1, 0, 0)
n3 = model.add_node("n3", 0, 0, 0.5)
n4 = model.add_node("n4", 1, 0, 0.5)
mat = model.add_material('mat', 1, 1, 0.3, 1)
sect = model.add_section('sect', 1, 1, 1, 1)
model.add_member('mem', "n1", "n2", "mat", "sect", rotation=0)
model.add_member('mem_rot', "n3", "n4", "mat", "sect", rotation=10)
r = Rendering.Renderer(model)
r.member_csys = True
r.render_model()```
Updates the documentation to reflect the logic in
Member3D.T()There is also a drive-by fix to a relevant section in rendering.rst, a missing newline broke the rendering of the member local coordinate system section