Expanding boundaries to evenly fill space

I have a series of non-intersecting planar boundaries that I would like to be able to expand towards one another and evenly absorb the space between them, as is in the sketch attached. Does anyone have any ideas of how to achieve this? I had thought that it may be possible to create lines from the end points of each edge, find the midpoint and join these points to create new boundary edges, but as soon as the starting geometry becomes not parallel or differ in the number of edges they have this doesn’t work too well. Voronoi was something else I had thought of, but I don’t really know the possibilities of this tool well enough to think of a process.

Any other suggestions?

Something with Medial Axis could help

medial axis sepration.gh (12.1 KB)

The usage on this forum is to post data, it helps not reconstructing something from text or pictures. “The devil is in the detail”

1 Like

This is a nice solution, thanks! I’ve never fully understood Voronoi before so this was quite a beneficial question for me to ask.

Is there a way to get rid of the ‘curved’ corners? This will be applied largely to orthogonal shapes and so I would like the new boundaries to more or less be parallel to the original shapes. The left pic is using the standard Voronoi component, the pic on the right has had the OrthoVoronoi component swapped in. I was hoping this would resolve the issue but all it seems to do is create lots of little steps where a curve would exist.

Any thoughts? Again sorry for not posting code for others to look at, I would do that if I knew what to do myself! :rofl:

I’ve just been reading through this thread, it looks like this is something you’ve talked about before! I’m a relative novice at grasshopper never mind C# etc, is what I’m trying to achieve something that is beyond my abilities?

Me again, sorry for the conversation with myself…

I saw this animation below and it’s sort of what I’m trying to achieve. I want to be able to offset the curves outwards evenly until they touch one another. That would prevent me having the curved/staggered geometry. I guess I almost want to treat each curve as a cell rather than creating a series of points along the curve the generate the cells.

image https://upload.wikimedia.org/wikipedia/commons/thumb/d/d9/Voronoi_growth_euclidean.gif/220px-Voronoi_growth_euclidean.gif

It’s doable with native Voronoicomponent. It has the Radius input…

transforming curve to curve oriented just in 2 directions, X and Y is surely doable. You can use this or something like this.

@HS_Kim I am not sure how to achieve the offset of a curve using the Voronoi component and the radius input. The script Laurent posted earlier used Voronoi to create the medial axis by creating a series of points along the curve, I want to offset the curve itself until it hits another offset curve much like an expanding Voronoi cell would stop expanding when it hits another expanding Voronoi cell. Any ideas?

@laurent_delrieu Manhattan is closer to what I am trying to achieve, but it unfortunately only gives me one right turn (unless I’m doing something wrong!). I would like to be able to control the number of right turns in some way, for example in my screenshot below where there are clear bends in the curve. I tried looking at the FitLine component but it doesn’t work with polylines, I can only obtain a best fit line through all points and not just ones in a predominately x- or y-axis orientation.

190716 - Straighten Curve WIP.gh (43.3 KB)

Here a simple way to do that with mesh (here quad mesh), you just have to use the slider.
I put a little C# to put data in Branch, there is surely a component but as I mostly program in C# it is more simple for me

190716 - Straighten Curve WIP_LD.gh (48.4 KB)

This looks just what I am looking! The only issue there appears to be is with the ‘Brep Closest Point’ component, I guess this is what you added C# to? It won’t load for me to test and explore :frowning:

Could you explain briefly what it was you tweaked to get this effect?

I put the old Brep closest point from Rhino 5 so it must now work for you.
The logic is simple

  1. Divide the surface with curves (it allows to suppress part of curves not linked)
  2. Make a division of the surface (here a mesh) on the surface
  3. For each division (face of the mesh) search the distance from the surface division
  4. Make a index for each surface (with series component)
  5. Order the distance and index
  6. Take the first distance/index, so the closest surface division from mesh face
  7. Put each face in a branch of tree (use of the C#, but I am sure there is a component for that)
  8. Join the faces on each branch so it becomes a mesh
  9. Extract the edges of the meshes

There are others strategies :

  • populate each surface division with mesh faces, make each “island” grow. I have a script for that but I don’t want to share it (Mesh clustering)
  • Make a program that takes the curves and simplify them
1 Like

Amazing, thanks a lot. I’m going to try and reconstruct this myself to learn the process better, your explanation of the logic was very useful!