Local Perforation Grasshopper pattern: holes inside a closed curve, largest at the centre

Local Perforation

Perforated panel with gradient holes

A solid panel perforated only inside a closed curve, with holes largest at the centre of the region and fading out toward its edge.

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 to perforate. It must be a planar (flat) surface. The hexagon grid starts from one corner and follows its edges, so a rectangle works best.

Curve

The region that gets perforated. It must be closed and lie on the surface.

Main Sliders

SliderWhat it changesDefault
Hexagon ScaleThe size of the hexagon cells, as a percentage of the length of the surface in its V direction. Smaller values give more, smaller holes.2
Opening Size as % of HexagonThe radius of the largest holes, in the middle of the region, as a percentage of the hexagon size. At the maximum of 85 they almost touch the sides of their hexagon.72

Also try: reshape the Graph Mapper to change how quickly the holes grow from the edge of the region toward its middle.

Notes

  • Draw the curve closed and on the surface. Only hexagons whose centre falls inside it get a hole; the rest of the surface stays solid.
  • The holes fade out toward your curve. They are largest at the hexagon furthest inside the region and shrink to nothing at the hexagon closest to the curve, so the edge of the region has no hard line.
  • The result is made of hexagonal pieces. Each hexagon is its own flat surface, with or without a hole.

Design Logic

How the script builds the pattern, step by step.

Local Perforation Grasshopper script on the canvas
The whole script on the Grasshopper canvas. Open full size ↗
StepHow the script does it
1. Find the surface’s corner and directionsIso Curve takes the two edges that meet at the surface’s corner. Curve | Curve finds the corner, and Construct Plane builds a plane there, aligned with the two edges.
2. Fill the surface with hexagonsLength measures both edges. An Expression turns Hexagon Scale into a hexagon size, and two more use the hexagon’s geometry (with sin(π/3)) to work out how many hexagons are needed in each direction. Hexagonal draws a grid that covers the whole surface.
3. Keep only the hexagons inside your curvePoint in Curves tests whether each hexagon’s centre lies inside the curve, and Cull Pattern removes the centres outside it.
4. Measure each centre’s distance to the curveCurve Closest Point measures how far each remaining centre is from the curve. Bounds and Remap Numbers turn those distances into values from 0 (closest to the curve) to 1 (furthest inside).
5. Turn distance into hole sizeA Graph Mapper shapes the gradient. An Expression turns Opening Size as % of Hexagon into the largest radius, and Construct Domain with Remap Numbers maps the values between 0 and that radius.
6. Draw the holesEvaluate Surface gives the plane of the surface. Plane Origin moves it to each centre, and Circle draws a circle there with the radius from step 5.
7. Build the hexagons and trim themBoundary Surfaces turns each hexagon, together with its circle, into a flat surface with a hole. Surface Split cuts these along the edge of your surface, and Area, Point In Curve and Cull Pattern keep only the pieces inside it.

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 →