# Path-distance-based Voronoi grid adaptation on complex geometries

**URL:** <https://discourse.mcneel.com/t/path-distance-based-voronoi-grid-adaptation-on-complex-geometries/213290>\
**Category:** Grasshopper\
**Tags:** windows, voronoi, shapemap\
**Created:** [December 6, 2025, 8:26am UTC](https://discourse.mcneel.com/t/path-distance-based-voronoi-grid-adaptation-on-complex-geometries/213290 "2025-12-06T08:26:02Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![Aaron\_Borin](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/aaron_borin/32/480744_2.png) [@Aaron\_Borin](https://discourse.mcneel.com/u/Aaron_Borin)\
**Post date:** [December 6, 2025, 8:26am UTC](https://discourse.mcneel.com/t/path-distance-based-voronoi-grid-adaptation-on-complex-geometries/213290/1 "2025-12-06T08:26:02Z")

</div>

Hello everyone,

I would like to create a Voronoi structure on this brep. The peculiarity of this structure should be that it gradually becomes smaller as it gets closer to the boundaries, through an adaptation of the grid itself. Please find attached the current version, which still uses a uniform Voronoi structure. However, the process will likely need to follow a different strategy.

 ![image](https://global.discourse-cdn.com/mcneel/uploads/default/original/4X/f/2/2/f229cc771cc02a34b9fb3a562eb77e3e5125db8a.jpeg)

By “closer”, I don’t want to refer to the linear distance of each cell, but rather to the path distance (where the path is pulled onto the brep).

Any suggestions are highly appreciated.

Thank you so much. Cheers.

[Example.gh](https://discourse.mcneel.com/uploads/short-url/6kd7H12it7b8xqhaET3xXHnM07I.gh) (9.9 KB)

[Example.3dm](https://discourse.mcneel.com/uploads/short-url/59Y9waG6kMGZfdcwyI3yTWAOhls.3dm) (221.7 KB)

**EDIT: it would be really interesting to adapt the Voronoi pattern based on the FEM analysis (denser cells in weaker areas, and vice versa).**

---

<div class="post-metadata">

**Author:** ![jessesn](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/jessesn/32/763881_2.png) [@jessesn](https://discourse.mcneel.com/u/jessesn)\
**Post date:** [December 6, 2025, 9:15am UTC](https://discourse.mcneel.com/t/path-distance-based-voronoi-grid-adaptation-on-complex-geometries/213290/2 "2025-12-06T09:15:22Z")

</div>

You may give it a try with `ShapeMap`

> [@About the ShapeMap category](https://discourse.mcneel.com/t/about-the-shapemap-category/195378):
>
> This is a group for the ShapeMap plugin: [ShapeMap | Food4Rhino](https://www.food4rhino.com/en/app/shapemap)About ShapeMap ShapeMap is a plugin for Grasshopper. It integrates multiple basic functions in Rhino and has undergone secondary development. This plugin allows users to map any curve texture designed on a plane onto the surfaces of complex 3D models, while minimizing or eliminating deformation of the texture curves on the 3D surfaces. With ShapeMap, designing textures on 3D model surfaces becomes much easier, and the oper…

[SM\_Voronoi.gh](https://discourse.mcneel.com/uploads/short-url/jqvBigfoNOFxmwGaZKPHSPonFON.gh) (26.5 KB)

 ![SM_Voronoi](https://global.discourse-cdn.com/mcneel/uploads/default/original/4X/f/7/4/f749cf3ec911e8b569ab45438df5578956d0316e.jpeg)

---

<div class="post-metadata">

**Author:** ![Aaron\_Borin](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/aaron_borin/32/480744_2.png) [@Aaron\_Borin](https://discourse.mcneel.com/u/Aaron_Borin)\
**Post date:** [December 6, 2025, 9:26am UTC](https://discourse.mcneel.com/t/path-distance-based-voronoi-grid-adaptation-on-complex-geometries/213290/3 "2025-12-06T09:26:53Z")

</div>

That would be really nice, but I’m still on Rhino 7.

---

<div class="post-metadata">

**Author:** ![jessesn](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/jessesn/32/763881_2.png) [@jessesn](https://discourse.mcneel.com/u/jessesn)\
**Post date:** [December 6, 2025, 9:29am UTC](https://discourse.mcneel.com/t/path-distance-based-voronoi-grid-adaptation-on-complex-geometries/213290/4 "2025-12-06T09:29:57Z")

</div>

> [@Aaron\_Borin](#):
>
> That would be really nice, but I’m still on Rhino 7.

You can try it with the [**90-day Evaluation**](https://www.rhino3d.com/survey/login_required?survey_url=https://survey.mcneel.com/c/sqimdgw4?language=en) of Rhino 8.

---

<div class="post-metadata">

**Author:** ![Aaron\_Borin](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/aaron_borin/32/480744_2.png) [@Aaron\_Borin](https://discourse.mcneel.com/u/Aaron_Borin)\
**Post date:** [December 6, 2025, 9:32am UTC](https://discourse.mcneel.com/t/path-distance-based-voronoi-grid-adaptation-on-complex-geometries/213290/5 "2025-12-06T09:32:48Z")

</div>

Will do, thanks.

Is there any feature that allows adapting the Voronoi layout according to something like FEM results (denser cells in weaker regions and fewer in stronger ones)? That’s ultimately what I would like to achieve.

Thank you

---

<div class="post-metadata">

**Author:** ![martinsiegrist](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/martinsiegrist/32/498369_2.png) [@martinsiegrist](https://discourse.mcneel.com/u/martinsiegrist)\
**Post date:** [December 6, 2025, 10:33am UTC](https://discourse.mcneel.com/t/path-distance-based-voronoi-grid-adaptation-on-complex-geometries/213290/6 "2025-12-06T10:33:29Z")

</div>

You can use remesh by color…

---

<div class="post-metadata">

**Author:** ![jessesn](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/jessesn/32/763881_2.png) [@jessesn](https://discourse.mcneel.com/u/jessesn)\
**Post date:** [December 6, 2025, 10:35am UTC](https://discourse.mcneel.com/t/path-distance-based-voronoi-grid-adaptation-on-complex-geometries/213290/7 "2025-12-06T10:35:12Z")

</div>

> [@Aaron\_Borin](#):
>
> Is there any feature that allows adapting the Voronoi layout according to something like FEM results (denser cells in weaker regions and fewer in stronger ones)? That’s ultimately what I would like to achieve.

You can try using `PanelingTools` to achieve it, here is a demo about point attraction.

> [PanelingTools for Rhino and Grasshopper | Food4Rhino](https://www.food4rhino.com/en/app/panelingtools-rhino-and-grasshopper)

[SM\_Voronoi.gh](https://discourse.mcneel.com/uploads/short-url/hFAUO1pwmnjYq2ZCEHEw2hMzpTV.gh) (31.0 KB)  
 ![SmPtVoronoi](https://global.discourse-cdn.com/mcneel/uploads/default/original/4X/0/3/b/03bb18ca2f001c1cf5a69f20935272ea845d213e.gif)

---

<div class="post-metadata">

**Author:** ![martinsiegrist](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/martinsiegrist/32/498369_2.png) [@martinsiegrist](https://discourse.mcneel.com/u/martinsiegrist)\
**Post date:** [December 6, 2025, 10:43am UTC](https://discourse.mcneel.com/t/path-distance-based-voronoi-grid-adaptation-on-complex-geometries/213290/8 "2025-12-06T10:43:09Z")

</div>

Look here:

> [@FEA for voronoi](https://discourse.mcneel.com/t/fea-for-voronoi/91161/2):
>
> Yes - If you have your stress values as mesh vertex colours, you can plug it into the ImageCircles component in Kangaroo to generate a point distribution, then take the Voronoi of that. See here for some similar discussions:

And here:

> [@Image-based Circle Packing within a polygonal limit](https://discourse.mcneel.com/t/image-based-circle-packing-within-a-polygonal-limit/82677/2):
>
> If you want the radii of the circles to update as they move around the image, you’ll need a different goal. Luckily there is now a component to do exactly this, including the option to prescribe a tangent boundary: [https://github.com/Dan-Piker/Kangaroo-examples/blob/master/collisions\_and\_packing/Image\_circlepacking.gh](https://github.com/Dan-Piker/Kangaroo-examples/blob/master/collisions_and_packing/Image_circlepacking.gh)[[image] ](https://global.discourse-cdn.com/mcneel/uploads/default/optimized/3X/1/7/173aac7392cdb38d93e3e401ed561354db689122_2_690x447.jpeg) You can see also some further discussion about variations on this for if you want a compact circle packing where each gap …

---

<div class="post-metadata">

**Author:** ![Aaron\_Borin](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/aaron_borin/32/480744_2.png) [@Aaron\_Borin](https://discourse.mcneel.com/u/Aaron_Borin)\
**Post date:** [December 6, 2025, 3:19pm UTC](https://discourse.mcneel.com/t/path-distance-based-voronoi-grid-adaptation-on-complex-geometries/213290/9 "2025-12-06T15:19:24Z")

</div>

Thank you Martin

---

<div class="post-metadata">

**Author:** ![Aaron\_Borin](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/aaron_borin/32/480744_2.png) [@Aaron\_Borin](https://discourse.mcneel.com/u/Aaron_Borin)\
**Post date:** [December 11, 2025, 7:10pm UTC](https://discourse.mcneel.com/t/path-distance-based-voronoi-grid-adaptation-on-complex-geometries/213290/10 "2025-12-11T19:10:48Z")

</div>

Hello Martin.

I did this and nothing else. The FEA is just hypothetical (and that’s fine), but I don’t understand how to transfer the color information into the CirclePacking.

 ![image](https://global.discourse-cdn.com/mcneel/uploads/default/original/4X/f/4/b/f4b80f6c182a04fa98278c74f6c7304c40e42cf5.jpeg)

On the other hand, I’ve found another approach (using more points than needed and then culling them randomly approaching the green area). However, I’m stuck with that as well. 🙂

> [@Simulate circle packing functions with Voronoi Cell Radius](https://discourse.mcneel.com/t/simulate-circle-packing-functions-with-voronoi-cell-radius/176570):
>
> Hi All, I am wondering if there is a way to simulate the function of circle packing (i.e. radius of the circle based on proximity to neighboring points) for Voronoi cells instead of the typical kangaroo2 circle packing definitions. Attached are the current studies I have been working on. While the current definitions are more or less adequate, I would like to make them more advanced by having the radius of each cell be defined NOT by a static number (i.e. .25mm radius) but rather the radius wi…

[Example.gh](https://discourse.mcneel.com/uploads/short-url/tB6e1sGDDjajxCrAFE29nU8VsKl.gh) (19.3 KB)

---

<div class="post-metadata">

**Author:** ![laurent\_delrieu](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/laurent_delrieu/32/601605_2.png) [@laurent\_delrieu](https://discourse.mcneel.com/u/laurent_delrieu)\
**Post date:** [December 11, 2025, 8:17pm UTC](https://discourse.mcneel.com/t/path-distance-based-voronoi-grid-adaptation-on-complex-geometries/213290/11 "2025-12-11T20:17:11Z")

</div>

Like said by Martin

> [@martinsiegrist](#):
>
> remesh by color…

 ![image](https://global.discourse-cdn.com/mcneel/uploads/default/original/4X/6/f/b/6fb63dc77bf54d4d907d93a05379cd12a64d8527.jpeg)

Click on button, and if it didn’t work click ….

[Example (2).gh](https://discourse.mcneel.com/uploads/short-url/bnCJNcgh3z8IoC6XcA7H9jCIsbj.gh) (11.6 KB)

---

<div class="post-metadata">

**Author:** ![Aaron\_Borin](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/aaron_borin/32/480744_2.png) [@Aaron\_Borin](https://discourse.mcneel.com/u/Aaron_Borin)\
**Post date:** [December 12, 2025, 8:02am UTC](https://discourse.mcneel.com/t/path-distance-based-voronoi-grid-adaptation-on-complex-geometries/213290/12 "2025-12-12T08:02:15Z")

</div>

Hello Laurent,

I tried, but it doesn’t work on my brep (internalized in the GH attached)

 ![image](https://global.discourse-cdn.com/mcneel/uploads/default/original/4X/1/0/8/108a03bd11c065b8a58eb7aa01b0dc5cb6502e30.jpeg)

 ![image](https://global.discourse-cdn.com/mcneel/uploads/default/original/4X/e/b/5/eb52e5c36d336222f57e4d4863f7d1ab67d553fb.jpeg)

[Example (3).gh](https://discourse.mcneel.com/uploads/short-url/qMBSCBIZTzIhV930XVrJPjkyGRb.gh) (128.8 KB)

---

<div class="post-metadata">

**Author:** ![laurent\_delrieu](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/laurent_delrieu/32/601605_2.png) [@laurent\_delrieu](https://discourse.mcneel.com/u/laurent_delrieu)\
**Post date:** [December 12, 2025, 9:08am UTC](https://discourse.mcneel.com/t/path-distance-based-voronoi-grid-adaptation-on-complex-geometries/213290/13 "2025-12-12T09:08:30Z")

</div>

A bit better there, not easy to make Remesh By color work.

First use boundary edge, not internal ones

 ![image](https://global.discourse-cdn.com/mcneel/uploads/default/original/4X/a/b/b/abb562dbc958aca8f531d6669c5e98fa873ec1a4.jpeg)

Change the radiuses range

and seems triremesh is better

[Example (3).gh](https://discourse.mcneel.com/uploads/short-url/8aKelakPDZ6iIetOlK7jd8Sf3EB.gh) (28.0 KB)

---

<div class="post-metadata">

**Author:** ![Aaron\_Borin](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/aaron_borin/32/480744_2.png) [@Aaron\_Borin](https://discourse.mcneel.com/u/Aaron_Borin)\
**Post date:** [December 12, 2025, 9:52am UTC](https://discourse.mcneel.com/t/path-distance-based-voronoi-grid-adaptation-on-complex-geometries/213290/14 "2025-12-12T09:52:46Z")

</div>

Thank you Laurent.

I see that with this approach the pattern looks more regular than before (the hexagons are clearly visible). Can it be made more random?

---

<div class="post-metadata">

**Author:** ![laurent\_delrieu](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/laurent_delrieu/32/601605_2.png) [@laurent\_delrieu](https://discourse.mcneel.com/u/laurent_delrieu)\
**Post date:** [December 12, 2025, 10:02am UTC](https://discourse.mcneel.com/t/path-distance-based-voronoi-grid-adaptation-on-complex-geometries/213290/15 "2025-12-12T10:02:10Z")

</div>

You can add noise, put less iterations …

 ![image](https://global.discourse-cdn.com/mcneel/uploads/default/original/4X/a/d/2/ad2b070388630454f0cd6597e884fc613936bfb6.jpeg)

 ![image](https://global.discourse-cdn.com/mcneel/uploads/default/original/4X/7/9/f/79f527400bb02010a4e0ca462e462e6737bc17bb.jpeg)

 ![image](https://global.discourse-cdn.com/mcneel/uploads/default/original/4X/b/d/2/bd29a582e698f28802edcc493b9f25d30308a539.jpeg)

[Example (3) and noise.gh](https://discourse.mcneel.com/uploads/short-url/AvLM5pzCU7ZKJxikdsYH65oLFSc.gh) (31.9 KB)

Noise From Nautilus plugin but you can use whatever noise you want
