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.

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