Orient Rectangles with attractor line

Hi all!

I would like to orient the rectangles in order to be perpendicular to the attractor line.
is there anyone has any idea about how can I achieve this?

orient rectangles.gh (20.7 KB)

Thank you!

Is this what you want?

orient rectangles_re.gh (21.1 KB)

Yeah! Thank you Boss!

By the way, is there any component similar to scale 1D in GH?
For example if I want to scale every one of them in U or V direction only or to its diagonal direction is it possible to do it?

Use Scale NU(Transform–>Affine–>Scale NU)

Yeah but is there an option to define another vector direction instead of XYZ?

orient rectangles_reV2.gh (22.1 KB)

Sorry that I become tedious but if I would like something like this?

orient rectangles_reV3.gh (23.7 KB)

1 Like

Yeah this is what I want to thank you very much for your time!