Dissolving Hexagons Grasshopper pattern: hexagon grid dissolving along a diagonal curve

Dissolving Hexagons

Random hexagon perforation

A hexagon grid where cells near a curve disappear at random, cutting a ragged band of openings through an otherwise solid panel.

Want all 53 patterns? Get them in one zip →


Price

Free

Plugins

None, native components only

Works with

Rhino 7 & 8, Mac and Windows

Level

Beginner

Inputs

Reference in Rhino

Surface

The surface the hexagon grid covers. It must be a planar (flat) surface.

Curve

The line the removed hexagons gather along. Hexagons close to it are removed first. Draw it in the plane of the surface.

Main Sliders

SliderWhat it changesDefault
Hexagon ScaleThe size of the hexagons, as a percentage of the surface’s edge length. Higher values give fewer, larger hexagons.1
Amount to Keep (%)The percentage of hexagons kept, starting with those furthest from the curve. A higher value keeps more hexagons and narrows the band where they are removed.59
RandomnessHow ragged the edge of the band is. At 0 the removed hexagons follow the curve in a clean band; at 1 they’re scattered almost anywhere.0.29

Also try: change the seed (S) of Jitter for a different random edge with the same settings.

Notes

  • The grid isn’t trimmed to your surface. It’s built slightly larger so it covers the whole surface, so hexagons along the edges stick out past it. Trim them in Rhino if you need a clean edge.
  • The removed hexagons are still there as outlines. The kept hexagons come out as surfaces, and the Cull Index at the end holds the outlines of the removed ones, so you get both sets of shapes.

Design Logic

How the script builds the pattern, step by step.

Dissolving Hexagons Grasshopper script on the canvas
The whole script on the Grasshopper canvas. Open full size ↗
StepHow the script does it
1. Set up a plane at the corner of the surfaceIso Curve takes the two edges that meet at one corner, Curve | Curve finds the corner point, and Construct Plane builds a plane there aligned with the edges.
2. Work out the size and number of hexagonsLength measures both edges. One Expression turns Hexagon Scale into a hexagon size, and two more work out how many hexagons are needed in each direction to cover the surface.
3. Cover the surface with hexagonsHexagonal draws the grid on the plane, with one extra row and column so nothing is left uncovered.
4. Sort the hexagons by distance to your curveCurve Closest Point measures how far each hexagon’s centre is from the curve. Sort List puts the hexagons in order, nearest first.
5. Shuffle the order a littleJitter moves each hexagon a random distance up or down the sorted list, by up to the Randomness setting. Its output is reversed, so the furthest hexagons come first.
6. Keep the furthest hexagonsList Length and an Expression turn Amount to Keep (%) into a number of hexagons. Sub List takes that many from the start of the list and a Surface parameter turns them into surfaces. Cull Index collects the outlines of the rest: the removed hexagons.

Want to learn how to build scripts like this on your own? Check out the Grasshopper Pro course.

On this page

Related tutorial

Free to use, also commercially

Use and change this script in your own projects, personal or commercial.

Please don't re-upload or redistribute the file. If you share it, link to this page so people always get the latest version.

© Hopific

Something not working?

If a script throws an error or doesn't do what this page describes, tell me and I'll fix it.

Tell me →