Move points by distance along line and rectangles in same angle as line

Hi everyone,

In the file attached, I have got a divided curve by points. The points are moved -2 and +2 units. I would however, to move the 2 units by the angle of the line. See what I sketched in green. Is this somehow possible? In addition to this, I would like the rectangles on the points to be also the same angle as the line.

Any suggestions?

Thanks in advance.

Question (18.8 KB)

Question (13.1 KB)

Question (11.0 KB)


Thank you both.

Do you know, if it is possible that the rectangles are still placed left and right (y axes) of the line if the elevation is zero?

Right know, the rectangles are placed in Z direction of the elevation of the line is zero.

Thanks in advance.

Hah! Grasshopper is so quirky weird. :man_facepalming:
Added Align Plane (yellow group) to handle the anomaly when Z = 0.

Question (14.8 KB) (DEPRECATED - use version ‘b’ below)

This fix is fragile and will break if the line is in the Y direction instead of X…

P.S. Here is a more robust fix:

Question (14.9 KB)