Create regions from a network of curves


I am trying to create a script that outputs regions from a boundary and a network of bidirectional curve offsets. I have almost solved it I think, but I don’t really know how to solve it for the case when we have closed curves. I’m thinking that is has to be some kind of combination between regionUnions and regionDifferences, but I can’t figure out how to do it so that it works in general.

I think that the definition and pictures can explain what it is I’m trying to do much better than words so I’ll just upload what I have. I would love some suggestions on how this can be approached. Feel free to ask questions if my explanation or something in the definition is unclear.

Thank you!

Erik (29.3 KB)

1 Like


as many times with offseting tasks, Clipper’s Polyline Offset does the trick…

Hi Jakinta! Thank you, had not heard of this one before. Looks really good, I’ll def use this!

I’ve tested this now and it seems really good, thanks for showing this. The only thing that I haven’t been able to do is to have different offsets on different curves in the polyline list. I’ve checked the code on github and I think the “problem” is that all the parameters in the input have item access, so it just runs the whole things more times instead of matching the lists. Do you know if there’s any good workarounds for this?

Thanks a lot again!


Maybe you offset them all, then you pick the branch item you want…picking rule has to be developed according to your needs, i just gave an example… (34.5 KB)

Edit: To resolve mitters and those thiny peaks, just set CloseFillet to Mitter, OpenFillet to But and play a bit with Mitter distance…