Can’t understand why there is a sudden jump in the angle results as you can see from the picture below. What I need is an 2d angle which is 0 when perpendicular with the optional plane and positive or negative on different sides. If anyone has idea why this happens and what I am doing wrong help would be much appreciated.

Okey then it will be a list of negative or positive values but I still need to get one list that includes both in the right order. And I still don’t understand that how there can be so big of a difference with these two vectors that are next to each other and going in the same direction. There must be something wrong how I constructed this but I don’t know what it is.

Why are you using the ‘Plane’ input to Angle? And why use the XZ Plane for it?

Seems to me you are creating the confusion by doing so. If you disconnect the ‘Plane’ input, all vectors have the same angle relative to ‘Z’ vector (11.458752 degrees). If you use the lofted surface normal plane at each point, the angle is always zero (or very close to it).

because you provided a Plane to measure the angle, then everything is measured as a projection on that plane, and the angle is measured on that plane and has a direction:

with the current setup you’re not measuring the angle between your vector and the Z axis, but the angle between the projection of your vector on XZ and the Z axis

to prove this to you, here are measuring on XZ and measuring with no plane of things projected on XZ:

the values in A and B are identical
of course because by not providing a plane the component always measures the smallest angle between two vectors, some B values you’ll find in the Reflex angle A’ or directly in the Reflex Angle output, but it’s the same “meat”

No G-code in this thread from four years ago but some cool 5-axis stuff, as I recall. Ah yes, try moving the ‘Animate’ slider in this file to see it follow the curve and orient the tool based on the bumpy surface:

I thought I already had this solved because the B angles were looking great and just like what I would expect, but just now I noticed that there is still a big jump in the A angles in the middle of the object. The only thing changing between A and B is the plane which makes them 2d. My object is symmetrical and the planes are located in the center so I would definetly expect that the results would be somewhat similar. The machine really cannot take a jump from example 15 to -15 degrees. I’ve attached an example file so you can take a look. slicing a and b angle.gh (59.8 KB)

This one should not have plug ins anymore. I also noticed that both A and B works when the object is planar but when it’s non planar the other angle starts doing this jumping for some reason. I would still expect similar behaviour from both angles since the object is still symmetrical altough nonplanar.

Yes I am using rhino 8. Sorry I tried to internalize the surface but it seems like it still lost somewhere. With this you could ignore everything else expect the purple group in the bottom.

sorry, geometries are not internalized in your no-plugins-file

if you provide a Plane, then the question the Angle Component answers is not anymore “what is the smallest measurable angle between these two vectors?” → but becomes → “what is the angle I need to rotate A on that particular plane for it to get parallel to B”

for instance here, where the Y axis is rotated by 15 degrees clockwise on the XY plane, the angle between A (Y direction) and B (rotated 15 degrees) is 345 degrees on the XY plane

if you invert them (for instance plug them on swapped inputs of the Angle component) then the angle along XY is measured as 15 degress, as that is the distance you have to rotate the “new-A” on the XY plane to make it parallel to “new-B”