Align heights of rectangles to a curve

Hello community!

I am trying to adjust the heights of rectangles to a curve. The base of the rectangles follow a straight line - only the height adjustement to a curve is the problem.
I added a sketch from Illustrator for visualization - the heights should follow the black line

I tried different ways, searched forums and youtube, but haven’t found a solution yet.

Does someone have a clue on how to do this? I would be very thankful for any tips.


Yes, very simple, you don’t need Kangaroo for this. But without posting your geometry, that’s all from me.

Welcome @Katarzyna_Zim

There are multiple ways to create rectangles in Grasshopper.
Here’s one example which first divides the line with even horizontal spacing, then at each of these points creates a rectangle with a height given by the difference between the height of the point and that of the top line. (9.0 KB)


Thank you very much for the quick help!
I started like this, but as I am new to Rhino and Grasshopper I didn’t get it quite right, so thank you for your knowledge, I will try to work with it

test.3dm (3.7 MB) (8.9 KB)

Rectangles.3dm (3.7 MB) (9.9 KB)

Sorry Joseph! I uploaded them now.
I got stuck on these points - I’ve seen some tips on the internet on how to adjust the height variably and symmetrically, but nothing along a fixed curve asymmetrically. Unfortunately my attempts didn’t lead to anything helpful.
I will try to work with what Daniel has posted!

Kind regards

test.3dm (3.7 MB) (8.9 KB)
Rectangles.3dm (3.7 MB) (9.9 KB)

Way too late, and yet… what you posted would have been useless even if it were in your first post.

You posted two 3.7 MB Rhino files, one with only one curve that could have been internalized in your GH file - but doesn’t resemble the image you posted at all. The other Rhino file is completely empty :interrobang: Wow.

It’s usually easier for me to do something than explain something, especially when I often don’t know what needs to be done until I do it. Especially the details, which often depend on geometry.

Thank you for your message Joseph!
I will try to do better in the future.

Best regards