Separation lines between polygons


I would like to draw bordering lines between a series of convex polygons but can’t find a proper way to do so.

I guess the output would either look like this:

(imaginary voronoi-ish cells)

or like this:

(imaginary offsetted contours stopping at mid-distance to neighbors)

I have tried both with Voronoi cells and offsetted polylines (Clipper) but as you can see none of these options seem to be appropriate in this case.

I believe another strategy would consist in treating the larger rectangle as a polygon with inner holes (the convex polygons) and compute its “straight skeleton”. A “medial axis” could be then retrieved by removing the branches touching the inner polygons.

Unfortunately I don’t know of a robust Straight Skeleton component that would handle polygons with holes.

Any ideas or suggestions would be greatly appreciated !

Have a look through the answers in this discussion:


Check this (9.2 KB)


Thanks to both of your for the swift replies.

I have come up with the following (based on Laurent Delrieu’s answer suggested by Daniel Piker):

One question: I am trying to simplify the polylines in order to get straighter, less curvy, bordering lines. What would be the most appropriate way to do this in grasshopper ?

I have tried with the Reduce component but get some strange artifacts:

Bordering (13.5 KB)

Try and improve this (23.5 KB)

1 Like

@seghierkhaled Thank you very much ! I really appreciate the video demonstration. Using the Shortest Walk component is a clever idea indeed.

Many thanks to all of you for your precious help.

You can improve speed by using Trim with regions instead of Region difference, also it work with different cases unlike Region difference.

and avoid errors when use shortest walk by using Polyline

1 Like