Merging closed curves that share a side?

I’m working on one of those dreaded “tessellate pattern around cylindrical brep, without seam” problems. I’ve found answers for regular cell shapes like hexagons, but not for arbitrary cell shapes.

I can identify the cells that go across the seam and should therefore be merged, and I understand that the problem is identifying closed curves that share a side, deleting the side from both curves, and joining them back into a single closed curve… but figuring out how is killing me.

EDIT: many apologies! In internalising and trimming the .gh to upload, I broke the seam curve selection by deleting the item=1 list selection. Fixed in the .gh below. Sorry! (17.0 KB)

The method of morphing a planar Voronoi into Brep will create seam line. Perhaps can just do 3D voronoi cells and then intersect between Breps to create seamless cells.

something like this?

That’s a very cool approach, but unfortunately I can’t see how to make it work for my application. I need to end up with planar faces that can produce a closed brep, and it looks like the Voronoi 3D component builds each side as a number of connected, non-planar curves.

you can use extruded octagon in that case instead of cylinder, to get more planarized cells.

Here’s how I’d approach it — I’d never create a seam in the first place :smiley:

You’re smart to duplicate your voronoi seed points to ensure seamless tiling. (Although I think you only need to tile along one axis, not both, correct?)

Instead of letting the Voronoi component trim with bounds, in this example I only trim along one axis and let the cells “spill” over the reference region.

Then I pick the ones whose centroid lie within the unit cell (this way I get a perfectly tiling “puzzle piece” of complete, untrimmed cells).

Then, rather than using map to surface, I map to the surface directly using the coordinates of the points as uv coordinates with “evaluate surface.” To ensure that the points fall into the surface domain, I have to take the coordinates in the tiling axis (the Y/V coordinates in this case) and do a little math; (value+1 % 1) ensures that any overhangs return back to the safe domain from 0 to 1 in a “tiling” way. (18.7 KB)


Oh, wow. Thank you! The approaches of manually mapping the points and lines, and using +1 % 1 to wrap, are not only great solutions for my immediate problem but insights that really helped me think about this much more cleanly. Thanks!