Parametric Wall Shelf Design for CNC or Laser

Back
The finished parametric wall shelf

Introduction

Hi!

Hope you are well, and happy you are reading this post!

I'm, a Rep, Weronika, recently, I was trying to learn new software and managed it pretty well! So I would like to share this post and tutorial I prepared for you to get you inspired, even if you are completely new to parametric design 😊

If you would like to produce your own customised and changeable design of shelf! This post is perfect for you!


Why Grasshopper?

It is so cool, enjoyable and EASY (after you practice lots 🙂)! Also, you will get prepared for your job, because this software, Grasshopper is widely used in the industry. EVEN in Civil Engineering for instance by Ramboll Consultancy. It gives limitless possibilities for structural engineers.

Getting Started with Grasshopper

If you are new, Grasshopper is a visual programming language and environment that runs within the Rhinoceros 3D computer-aided design (CAD) application. See some basic tutorials first, I recommend:

  1. FoodforRhino - Dot line vs single line in Grasshopper
  2. FoodforRhino2 - List of Grashopper hotkeys and shortcuts
  3. Shortcuts - List of Grashopper icons and what they mean
  4. YouTube

Tutorial Overview

With this tutorial, you will create design and files ready to use by CNC Router or Laser Cutter we have in iForge!

Hopefully, soon we all be able to go back to iForge and manufacture it! Missing these days but all we can do now is to get ready, make all crazy designs for the future 😊

Step-by-Step Tutorial

Use the command Rectangular Plane from the corner-to-corner on the LHS menu.

Using the rectangular plane command in Rhino.

Turn on 'Shaded' preview mode. Copy and paste using Ctrl + C and Ctrl + V, then move the new plane vertically up using the blue Gumball arrow.

Copying and moving the surface vertically in Rhino.

Rebuild the surface using the Rebuild command.

The 'Rebuild Surface' command window in Rhino.

The rebuilt surface with more control points.

Now, use the SoftEditSrv command to manipulate the surface.

Using the 'SoftEditSrv' command on the surface.

Play with the shape of the surface to create your desired shelf design. Remember that if you change the 'Distance' option within the command, you will affect how smoothly the surface deforms.

Deforming the surface into a custom shape.

Select both surfaces and use the DupBorder command.

The duplicated borders of the two surfaces shown as curves.

Connect the corresponding border curves together using the Loft command.

Using the 'Loft' command to create a solid shape between the two border curves.

Join all three surfaces (top, bottom, and the new lofted side) together now to create a single, closed polysurface.

The three surfaces joined into a single, solid object.

Turn the surface vertically to imitate your shelf.

The final solid object rotated into a vertical position.

Hide the black frame. Now you can proceed to Grasshopper.

The final prepared solid in Rhino, ready for Grasshopper.

Importing the solid from Rhino into Grasshopper as a Brep component.

Fig 3

Connect a 'Box' component to help define the directions for dividing the solid, depending on the number of shelves you want. Then, use 'Deconstruct Brep'.

Connecting 'Box' and 'Deconstruct Brep' components in Grasshopper.

Fig 4

You can then 'List' the edges and proceed with dividing the solid as below. Use the 'slider' to set your preferred number of sections.

Grasshopper setup for creating sections in the x-direction.

Fig 5: Create number of sections in the 'x' direction

  1. 'Contour': Connect your 'Brep' to the 'S' (Shape) input.
  2. 'List Items': Connect this to the 'V' (Vertices) of the deconstructed box, then connect its output to a 'Point' component.
  3. Set Direction: For the x-direction, use an 'x unit vector' and connect it to the 'N' (Direction) input of the Contour component.
  4. Set Distance: Use a 'Number' and 'Division' component. Connect a 'Slider' to set the number of sections.

A detailed view of the Grasshopper setup for creating contour sections.

Fig. 6: Use an expression (right-click on the 'D' distance input) to ensure the sections are always inside the geometry.

  1. Copy the 'Item' component and create a 'Slider'.

  2. Find the height of the box. Use the slider until you see the green line in the preview. Leave it at that number.

    Finding the height of the box using a slider to select the correct item from a list.

    Fig 7

  3. Copy the three highlighted commands and connect them to your 'Item' from step 2.

    Copying a group of components in Grasshopper.

  4. Copy the 'Contour' commands and use them as you did in Fig 5, but this time, connect a 'z unit vector' to the 'N' (Direction) input.

    The Grasshopper setup for creating sections in the 'z' direction.

Next, you'll proceed with the contour sections.

Both sets of contour lines (X and Z) shown on the Rhino model.

Fig 8

  1. To see the Rhino preview clearly, use the Hide command on the main solid. You can also right-click on components in Grasshopper and select 'Disable View'.

    Disabling the preview for a component in Grasshopper.

    Another view of disabling a component's preview.

  2. You don't need the edge sections (indicated by the blue arrows in the original tutorial) for the shelf design.

    Highlighting the unnecessary first and last contour sections.

  3. To delete them, use 'Cull Index'. First, use 'Flatten' on the contours. This combines all contour curves into a single list so 'Cull Index' can delete the 1st and last sections from the flattened list.

    The 'Flatten' component in Grasshopper.

    The 'Cull Index' component.

  4. Use a 'Slider' with a value of 0.0 to delete the first item in the 'x' direction list. The remaining sections are shown in green.

    Using 'Cull Index' with an index of 0 to remove the first section.

  5. Copy and paste the culling commands. Now, use 'Reverse' before 'Cull Index' to delete the last section in the 'x' direction.

    Copying the culling commands.

    The 'Reverse' component makes the last item the new first item, which can then be culled with an index of 0.

    Using the 'Reverse' component to delete the last item in the list.

  6. Do the same (steps 3-5) for the sections in the 'z' direction. Copy and paste the blue commands.

    Copying the culling setup for the z-direction sections.

    Flatten the data as above and get the final results:

    The final set of cleaned-up contour curves with the edges removed.

Give the curves thickness to turn them into solids.

  1. Move the curve in the x-direction.

    Using the 'Move' component in Grasshopper.

    Fig 9

  2. Connect the 'Surface' (or 'Boundary Surfaces') component.

    Using a 'Surface' component to turn curves into surfaces.

  3. Extrude in the 'x' direction, giving it a thickness (e.g., 2.5).

    Using the 'Extrude' component to give the surfaces thickness.

  4. Copy and paste these same steps (1-3) for the 'z' direction. Remember to change the vector to 'z' and use an expression like -x/2 to ensure the extrusion is centered on the curve.

    The final extruded solids for both x and z directions.

Create the slotting connections by finding the intersection between the two sets of solid curves.

  1. Go to the Intersect Tool Box in Grasshopper (Intersect → Shape → Brep | Brep).

    The 'Brep | Brep' intersection component.

    Fig 10

  2. Then use 'Cross Reference' to make sure you check every single combination of intersections, as shown in example b), not a).

a) Incorrect intersection (without Cross Reference)

An example of an incorrect intersection test that misses some connections.

b) Correct intersection (with Cross Reference)

An example of a correct intersection test that finds all connections.

  1. Create boxes from the intersections, Bake them into Rhino, and then use the BoxUnion command.

Creating bounding boxes around the intersection curves.

Baking the intersection boxes into the Rhino document.

Move the created boxes backwards and forwards by half their length to create the slots.

  1. Use 'Deconstruct Brep' and 'List Item' to find the length of the box edge. Use a 'Slider' until the green line appears in the Rhino preview, then connect a 'Number' parameter.

    Deconstructing the bounding boxes to measure their edge length.

    Fig 11

  2. Move the boxes backwards. Connect 'Move' to the 'Boxes' output. Use a 'y' vector and connect a 'Division' component with an expression of x/2 to move them half their length.

    Moving the notch boxes backwards by half their length.

  3. Move the boxes forwards. Copy and paste the green component group.

    Copying the 'Move' setup to create the forward motion.

    Add an expression of -x to the motion vector, as you want to move the boxes in the opposite direction (-y in Rhino).

    Using a negative expression to move the boxes in the opposite direction.

Use a boolean operation to take away the intersection boxes from the solid shelf parts.

  1. Use the 'Solid Difference' command.

    The 'Solid Difference' component in Grasshopper.

    Fig 12

  2. 'Flatten' all the inputs for the 'Solid Difference' command. Make a 'Solid Difference' between the first extrusion (a) and the set of notch solids (b):

    a) The first set of extruded shelf parts.

    The first set of extruded shelf parts.

    b) The set of notch boxes.

    The set of boxes that will be used to create the notches.

  3. Copy and paste the setup and connect the second set of extruded parts and the second set of notch solids.

    The complete setup for the 'Solid Difference' operations for both sets of shelves.

Here you are. That is the finished shelf!

A preview of the final, assembled parametric shelf with notches.

Another view of the completed shelf.

A close-up view of the interlocking notches on the shelf.

Create the flat parts ready for a CNC machine or Laser Cutter.

  1. Use Bake for both sets of final slotted curves.

    Baking the final parts into the Rhino document for layout.

    The final set of components to be baked.

  2. Orientate the parts on a flat surface in Rhino.

    The final 2D parts laid out flat in Rhino, ready for fabrication.

Then, you are finished! You can extract the files in a format suitable for laser cutting or CNC.

The beauty of parametric design is that you can now go back and easily change the design.

  1. Just play with the thickness sliders or the number-of-shelves sliders in Grasshopper.

    Adjusting sliders in Grasshopper to dynamically change the shelf design.

  2. In Rhino, go to the Standard toolbar and select 'Show Objects'. You can also type the command Show.

    Using the 'Show' command in Rhino.

  3. Select the original frame, and input the command CageEdit, then select 'Bounding Box'.

    Using the 'CageEdit' command in Rhino.

  4. Press Enter a few times to get the frame that is ready to be deformed.

    The control cage is now active around the original object.

  5. Now just drag the points and play with the geometry, and the Grasshopper definition will update itself accordingly.

    Dragging the control points of the cage to deform the shelf, with the waffle structure updating automatically.

Conclusion

Hopefully, soon we will all be able to go back to the iForge and manufacture it! I'm missing these days, but all we can do now is get ready and make all the crazy designs for the future ❤️. Get in touch with questions by leaving comments below the post on the iForge website 😊.

Written by

Weronika

At

Fri Apr 24 2020