[extract angle data] grouping every two consecutive segments in a polyline

Hello,
For an ongoing project, I need to extract every angle between 2 segments for joints cuts as shown in the picture. My polylines (not flat) are made of varying number of segments …


What I would like to do on grasshopper is to sort in the direction of the polyline every two segments in order to compute the angles. (Seg0 with Seg1, Seg1 with Seg2,… Seg(N-1) with Seg (N). )…
Any idea on how to proceed with this ? Which component to use ?

In order to avoid the issue in this topic (to compute the targeted angle) ANGLE - Different line direction, different result

For that I would like also to automize also this to be sure all my vectors are in the right direction with the correct anchor point: angle 0 made of seg0(endpoint) and seg1(start point), then angle1 made of seg1(End point) and Seg2(start point), etc…


My trials have led me no where so I don’t have a script to share… Any Leeds / components to proceed with are very welcome.

Thanks !

I might be misunderstanding the problem, but something like this perhaps:

200605_ComputePolylineAngles_00.gh (9.6 KB)

1 Like

@AndersDeleuran Yes it works fine. It took me time to figure out where one index was missing ! Just discovered the “W” Warp input to prevent item from “falling out” in the shift list…
Thank you for taking the time !

1 Like