You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The description of angle_vectors_signed(u, v, normal, deg=False, tol=None) is confusing and I've been using it wrong for the past year. I expected it to act like a projection plane with the normal as the normal parameter. what it does instead is to just take the smallest angle between the two vectors and then make it negative if the cross product doesn't match the normal.
I expect we can't "fix" this in terms of changing behavior without breaking everything, but maybe change the description.
I would suggest: Returns the smallest angle between 2 vectors, with the sign of the angle based on the direction of the normal vector according to the right hand rule of rotation.
I would submit this as a bug fix, but my compas folder is not connected to the repo for some reason... This is maybe a bit of a feature request, too, to get that sweet, sweet expected behavior.
The text was updated successfully, but these errors were encountered:
@obucklin nice. I've been scratching my head at this one for a while, too.
This is essentially what you expect it to do, right?:
# angle between `ref_side.xaxis` and `plane.normal` projected on plane with normal `ref_side.zaxis`angle_vector=Vector.cross(ref_side.zaxis, plane.normal)
angle=angle_vectors_signed(ref_side.xaxis, angle_vector, ref_side.zaxis, deg=True)
I can help with setting you up for submitting a PR.
The description of
angle_vectors_signed(u, v, normal, deg=False, tol=None)
is confusing and I've been using it wrong for the past year. I expected it to act like a projection plane with the normal as thenormal
parameter. what it does instead is to just take the smallest angle between the two vectors and then make it negative if the cross product doesn't match the normal.what happens
Expected behavior
I expected the angle to be calculated as if rotated(and viewed) from the normal vector, e.g.
I would also expect the angle to change based on the order in which the two vector parameters are given:
I expect we can't "fix" this in terms of changing behavior without breaking everything, but maybe change the description.
I would suggest:
Returns the smallest angle between 2 vectors, with the sign of the angle based on the direction of the normal vector according to the right hand rule of rotation.
I would submit this as a bug fix, but my compas folder is not connected to the repo for some reason... This is maybe a bit of a feature request, too, to get that sweet, sweet expected behavior.
The text was updated successfully, but these errors were encountered: