Non-uniform Offset

Is there a way to offset a curve in a non-uniform way? For example, I want to offset a rectangle, and I want the top of the rectangle to be offseted by 10m, the bottom by 2m and the rear sides by 3m.
Thank you!

This could be one way. (9.2 KB)


This is BEFORE :


This is AFTER :


1 Like

Thank you very much for your quick replies! Both solutions are really helpful. Although I think I am not close to the solution to my problem yet. What I am trying to do specifically is to create a parametric house typology where at any given plot shape (rectangle, triangle, polygon) will be able to maintain the above distances with the boundary. Consequently, I cannot have hardcoded curve indices to pick from.

Hard coded? It’s software, you can do whatever you want. This is probably very close as it handles an arbitrary number of sides. Just change the Merge to match the number in your curve.

UPDATE: this version works with multiple curves where the earlier version (July 27, 2021) failed. (15.9 KB)

You didn’t post any code/geometry.

1 Like

What are the dimensions of the rectangle? Offset out or in? My cluster has a switch for that.

When you don’t know how close you are to your goal, you are lost!

1 Like (16.3 KB)

Thank you again for your response. The problem with that script in my case is that it will not be able to calculate on its own the different shapes and therefore the number of curves that need to be offset. If that helps, the aim of the parametric typology that I am trying to do is to be applied later on to an urban scheme and adjust to hundreds of different size plots. Consequently, I will not be able to go after each one and define the number of curves that compose their plots. I am also attaching a working file if that’s helpful.

The rectangle was just an example of a possible shape that a given plot may have. The offset should be in

It’s always, ALWAYS helpful to have a GH model, even if it contains nothing but geometry.

I hope you realize that you started with a rectangle that is square with the ‘World XY’ plane and immediately skewed it for no apparent reason?

This is my code (cyan group) using your slider offset values. The result is the same as your EdgeSrf: (32.6 KB)

Post example geometry with “hundreds of different size plots” and some guidelines for how offset values will be determined. Special attention please for plots that aren’t rectangles. Or even if they are, how does one determine their orientation to apply the offsets?

Please think it through, at least as much as @HS_Kim and I did to provide these answers. They work! Though I can see something in my code that will cause multiple input curves to fail…

1 Like

I don’t have an example right now as this is something that will be produced at a later stage. Although, I will try to think it through as you said!

Again thank you for your time, even having a discussion about that makes things clearer for me!

Something as simple as this is enough to tell me that my code fails to handle multiple curve inputs:

Working on it… will post a fix here if I come up with one.

1 Like

Fixed to handle multiple input curves. Note the orientation of offsets from the way they were created. (30.6 KB)

I think you will find additional challenges when you work with the urban plots you mentioned.

P.S. For example, your buildings (green) ignore the orientation of the boundary curves.

P.P.S. The purple group aligns the building footprints with one edge of the offset. (25.9 KB)


I see, that’s helping me a lot to understand some aspects of the script and how I could build on top of that!

Thank you so much for your time!


I mentioned these issues nine days ago. Good luck.

So you are saying that there isn’t a way to resolve those issues? I was thinking of changing the planes of the surface to follow the vector from the centre of the plot to the closest point of the road curve but it didn’t work.

I never said that at all.

1 Like

Thank you for your response.