Closed Curve Edge Varied Offsets

Hi,

I am trying to create a definition for closed curves which allows edge (x) to be offset with various sizes of rectangles. The edge, or edges, should end up looking like the Image 1 when the definition is implemented. I have created a rudimentary definition for a rectangle that only works for one edge currently and does not trim the edges to be only one closed curve at the end (Image2). I am wondering if anyone can point me in the right direction on how to do this best.

Thanks in advance


Image 2
Grasshopper forum Question.gh (16.4 KB)

Ok, I have figure out how to isolate the geometry I need (it wasn’t too hard lol) (See below image)… However, I am wondering if someone would be able to help me create those jagged boxes parametrically with sliders and perhaps using more than one edge. I know my definition is really inefficient and can be improved a ton. Thanks again

Hi Brendan, here is one possible solution. Hope it helps.


Grasshopper forum Question_yl.gh (36.5 KB)

It helps greatly. The reparametrize is the more obvious way to do it that I couldn’t think of lol Thank you!