Angle deviation of a polyline segment (GHPython)

Hi there,

I want to determine the angle deviation of a polyline segment compared to the previous line segment in GHPython. Originally I thought this should be quite easy… but that was some hours ago. In the meantime I tried cross and dot products and whatever. But honestly speaking I am a bit lost.

Here is what I would like to get:

Can somebody please help me with that?

Hi @ore,

Atan2 is the way to go.

angles.gh (5.9 KB)

1 Like

Thanks Erik for your quick support - that script does exactly what I want! For whatever reason I did not find any hint about ATAN2 in my research. Now it’s just a matter of putting that into a GHPython script. But that should not be an issue.

1 Like