Non-uniform offset?

Hi there, i am trying to find a way to offset a polygon multiple times but with non uniform offset distances. i have made/found a gh script (see attachment) wich does that for very simple shapes, but once it gets more complicated the simple offset algorithm fails (intersecting polylines for example). normally i would use clipper for this since it is much much more reliable, but this time i need this non-uniform offset.

does anyone have an idea how i could make this happen?
nonuniformoffset.gh (10.1 KB)

this can be any closed polyline.

It can’t be any closed polyline since you have the list of offsets to be a 5, so it should be a 5 sided polyline.

But is this what you are looking for? You just need to have a grafted list of offsets to offset multiple times.
nonuniformoffset.gh (30.0 KB)


nonuniformoffset_r0.gh (16.5 KB)

1 Like

not sure i’ve understood your question since your inputs were not internalised and you have not provided any visual guidance on what you expect…

However you got me thinking there must be a decent way to offset curves nonuniformly. Clipper couldn’t do it but dendro in 3D does a pretty good job.

nonuniformoffset.dendro.gh (19.0 KB)

2 Likes

as soon as i wrote

i realised my mistake. I hadn’t set a tolerance on simplifying circles to polylines, so it took forever. This works pretty well, and is a bit simpler than the dendro one i think.


nonuniformoffset.clipper.gh (17.7 KB)

4 Likes

this is fun. Here i’ve remapped the offset values with graph mapper functions

10 Likes