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 points.gh (18.8 KB)


Question points_2022Feb13a.gh (13.1 KB)


Question points_re.gh (11.0 KB)

2 Likes

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 points_2022Feb15a.gh (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 points_2022Feb15b.gh (14.9 KB)

Thanks!