Architecture · Grasshopper · Guide

Create a Parametric Hexagonal Structure

Create and map a parametric hexagonal grid on a double-curvature envelope with minimal distortion using ShapeMap.

30–45 minRhino 9 for Windows / MacIntermediate
Create a Parametric Hexagonal Structure

ShapeMap is a Grasshopper add-on, included with Rhino 9, that maps 2D curves or image-based textures onto a complex 3D shape, like this double-curvature polysurface, with minimal distortion. It unfolds the 3D shape into a flat one, so you can design a pattern in 2D, and then wraps the pattern back onto the original shape.

In this tutorial, you will learn the basic workflow of ShapeMap and how to use its main components, such as ShapeSolver and MapToShape, to construct a parametric hexagonal grid, representing the steel structure that wraps around the envelope.

What you'll learn

  • Unfold a double-curvature polysurface into a flat shape with the ShapeSolver component.
  • Design a 2D hexagonal pattern on the unfolded shape with the Hexagonal and Project Curve components.
  • Map the flat pattern back onto the 3D envelope with the MapToShape component.
  • Turn the pattern lines into 3D structural members with the Extrude and Simple Mesh components.

Prerequisites: Rhino 9, basic Grasshopper knowledge (placing components, wiring parameters).

Getting Started

  1. Download the latest Rhino 9 for Windows or Mac.
  2. Download and open ShapeMap_Architects.3dm in Rhino 9.
  3. Run the Grasshopper command and start a new definition.
Note
The ShapeMap components are in the Transform tab, ShapeMap group. You can also double-click the Grasshopper canvas and type a component name to search for it.

Load and Unfold the Shape

ShapeSolver flattens the 3D shape into a 2D shape with as little distortion as possible, and stores the relationship between the two as map data.

  1. Double-click the canvas, search for Brep, and place a Brep parameter.
  2. Right-click the Brep parameter, choose Set one Brep, and select the polysurface in the Rhino viewport.
  3. Search for ShapeSolver in the Transform tab and place a ShapeSolver component on the canvas. Connect the Brep parameter to its S (Shape) input.
  4. Right-click the L0 (Shape Line) input and select Set one line. Then select two points in the viewport to create the base line.
  5. Then right-click the L1 (Target Line) input and do the same, to create the target line that positions the unfolded result.
  6. Connect a Panel with the value 2 to the M (Method) input. This sets the unfolding method to ARAP (0 is LSCM, 1 is ABF++).
  7. Search for Boundary Surfaces and place a Boundary Surfaces component. Connect the B (Border) output of ShapeSolver to its E input. The flattened shape appears as a planar surface next to the 3D model.

Right-clicking the inputs of the ShapeSolver component to set the base and target line as well as the flattening method

Tip
Double-clicking in the Canvas opens the Search bar and you can type to search any component. If you type // and press it’ll place a Panel component on the Canvas.

Design the Pattern

Now that the shape is flat, you can draw the pattern in 2D, where it is easy to control.

  1. Continue with your file or SM_Archi_0.gh in Grasshopper.
  2. Place a Hexagonal component and a Point parameter. Connect the Point to the P input of Hexagonal.
  3. Right-click the Point parameter, select Set one Point. Select a location in the Rhino viewport near the lower-left corner of the unfolded shape. This is where the grid starts.
  4. Connect two Panel to the Ex (Extent X) and Ey (Extent Y) inputs of Hexagonal, and set them to 100 and 45. These are the number of cells in the X and Y directions, enough to cover the whole unfolded shape.
  5. Place a Project Curve component. Connect the C (Cells) output of Hexagonal to its C (Curve) input, and the S (Surfaces) output of Boundary Surfaces to its B (Brep) input. Only the parts of the grid that fall on the unfolded shape are kept.
  6. Turn off the preview of the components you don’t need to see, so only the pattern on the unfolded shape is displayed.

Creating the grid using the Hexagonal component and setting the start point and the number of cells in X and Y

Number Sliders
Alternatively, use Number Slider for the Extent inputs of the Hexagonal component. Define a range of values so you can interactively increase or decrease the size of your grid without having to edit the Panel each time.

Map the Pattern onto the Shape

MapToShape uses the map data from ShapeSolver to wrap the flat pattern back onto the 3D shape.

  1. Continue with your file or SM_Archi_1.gh in Grasshopper.
  2. Place a MapToShape component found in the Transform tab. Connect the MD (Map Data) output of ShapeSolver to its MD input.
  3. Connect the C (Curve) output of Project Curve to the G (Geometry) input of MapToShape. The component turns red, because the data structures don’t match yet.
  4. Right-click the G input of MapToShape and choose Flatten. The hexagonal curves are mapped onto the 3D shape.

Flatten the tree of projected curves by right-clicking the input of Geometry on the MapToShape component

Build the 3D Structure

The mapped curves are only lines. To get structural members with a height, extrude the flat pattern first, and then map the result.

  1. Continue with your file or SM_Archi_2.gh in Grasshopper.
  2. Place an Explode component and connect the C (Curve) output of Project Curve to its C (Curve) input. Each hexagon is split into its individual segments.
  3. Place a removeDuplicateLines component found in the Kangaroo2 tab. Connect the S (Segments) output of Explode to its L input. Right-click the L (Lines) input and choose Flatten. Neighboring hexagons share edges, so this removes the overlapping segments.
  4. Place an Extrude component, a Unit Z component, and a Panel . Set the Panel to 0.5, and connect it to the F (Factor) input of Unit Z. Connect the V (Unit vector) output of Unit Z to the D (Direction) input of Extrude.
  5. Connect the Q (unique lines) output of removeDuplicateLines to the B input of Extrude. Each line becomes a vertical strip.
  6. Place a Simple Mesh component and connect the E (Extrusion) output of Extrude to its B (Brep) input.
  7. Connect the M (Mesh) output of Simple Mesh to the G (Geometry) input of MapToShape , replacing the connection from Project Curve. The hexagonal structural members now wrap around the 3D envelope, with their height following the surface normal.
The complete definition: ShapeSolver unfolds the envelope, Hexagonal and Project Curve create the pattern, and MapToShape wraps the extruded pattern back onto the 3D shape.

The complete definition: ShapeSolver unfolds the envelope, Hexagonal and Project Curve create the pattern, and MapToShape wraps the extruded pattern back onto the 3D shape.

Tip
Because the whole definition is parametric, you can change the Ex and Ey values, move the Point, or change the extrusion height, and the structure updates on the envelope. Try it on your own shape too.
Finished!
Congratulations for completing this tutorial! Feel free to continue using these tools to detail your design or create a new one from scratch. If you have any questions ask us on Discourse or drop an e-mail to our support team: support@mcneel.com.