Introduction: [computational Fabrication] 2.5d 3d-printable Parametric Forms
Design a 2D ornamental pattern in Rhino using Grasshopper and extrude it into a 3 dimensional form.
I’m taking a course this quarter (Spring 2020) on computational fabrication taught by Prof. Jennifer Jacobs at the Media, Arts & Technology program at the University of California Santa Barbara. The idea behind the course is that digital fabrication can be combined with computational design to create complex and functional physical forms.
This is the first project for that course -- a hello world and owes a lot to tutorials provided by Jennifer (@pixelmaid). By the end of this project, you’ll be able to create a parametrized 2d grid made out of curves in Rhino that can be extruded into a 3d form that is exportable and 3d-printable.
While I’ve been programming for many years, I have no fab experience to speak of and wanted to make these instructables documenting our course projects as accessible as possible so maybe some of you can participate and share in the joy of learning something really cool from the ground up. I’ll do my best to answer any comments & questions.
Tools you’ll need to replicate this include
- Rhinoceros (Rhino), a commercial NURBS*-based computer-aided design (CAD) tool
- Grasshopper, a visual programming language based on a data flow paradigm that lets you parametrize the geometry you create in Rhino
- Pufferfish, a plug-in for Grasshopper that you can download at [food4Rhino]
- Ultimaker CURA, an open source 3D printer slicing application
*NURBS stands for Non-uniform radial B-spline. A basis spline (B-spline) is a representation of a curve that allows for user control of points that are combined according to specific functions to form the basis of the representation for that curve.
Step 1: STEP ONE
Using Grasshopper and a Python code editor component, generate a 2D grid of points using two input points from Rhino.
- a. Create two points in Rhino using the single point tool. One should be on the origin.
- b. Create two point components (p1 and p2) in Grasshopper and use the ‘Set One Point’ option to select the corresponding point in Rhino.
- Add a python component from the ‘Maths’ section and set the parameters to p1 and p2 (note: now and going forward use TypeHint to indicate the input type).
- Add a slider to determine the interval spacing of points and connect this to the python component. Write a short python script to create a grid and output a set of points at evenly spaced input. Connect the output to another point component to see the result. Take a look at the images below. You should have a uniform grid (code provided too).
- Connecting the geometric data to individual components is time-consuming (a drag & drop interface would be simpler)
- I had some trouble getting used to changing the names and values of components in Grasshopper along with searching for the component (double click on an empty location) I had in mind. I wish there was a way to look at “adjacent” components in the search feature.
Step 2: STEP TWO
Using parameterized mathematical and logical inputs, modify the grid to produce a varying series of patterns, connected by lines.
- Add some complexity by adding and connecting a slider for a modulo value, a modulo type (to change types of patterns) to the python component. Experiment with patterns (see 3 experiments below).
- Create a set of lines between each point in the grid by iterating through the points in the grid. Add and connect a slider to indicate a distance threshold. Write a function to compute the distance squared (to avoid the expensive square root operator) between each set of points and only connect them if the distance between them is less than the threshold distance. Experiment with patterns (see 3 experiments below).
- Play and make your own version (the best part!) Take a look at checkpoint 2 for what I came up with (and accompanying code).
- I had some trouble with moving either the sliders or the component around in Grasshopper. It would be nice to have a way to lock them. Also I’m curious about why it’s taking so long to compute updates to my grid -- definitely worth a longer investigation!
- I experimented with varying grid density with the modulo operator. I like the overall results but think they’re a bit too symmetric.
- For my exploration, I wanted to experiment with adding some rotations and repetitions of the same pattern at different scales. I also wanted to “stack point patterns” rather than only using one modulo operand at a time. However, these experiments led to very dense grids that were not visually appealing.
- I decided to contain my grid forms within a circle. Instead of using a Grasshopper component to specify a fixed circle, I used a slider component to determine the radius of my circle and create another parameter to manipulate. I also felt that this would let me make a larger, less dense form that was still visually interesting.
- Eventually I felt the interval spacing and modulo value had the biggest visual impact in the designs created. Check out some examples below (note: the offset is enabled -- see next step).
Step 3: STEP THREE
Using the grasshopper pufferfish extension and surface and extrude components, convert your lines into a 2.5D form.
- Pipe the curve components into an offset curve component and add a distance slider to the offset curve component to control the degree of offset.
- Pipe the output to a boundary surface to an extrude component and set a vector to determine the height of the final form. Take a look at checkpoint 3 for the layout in Grasshopper and an example form.
- The character of the pattern changed significantly with added volume. Different elements became more or less apparent. For a full production pipeline I think it would best to visualize the final or representation rather than working with an intermediate like the grid forms shown above.
Step 4: STEP FOUR
Bake the form and use a boolean operation to unify your form in Rhino. Ensure the design is 3D printable by checking its edges and slicing it in the Cura 3D software.
- I waited until I had finished experimenting with adding depth to my grid since I didn’t want to bake out the geometry.
- I added a Solid Union component in Grasshopper. I also had to flatten the output of the Offset Curve component and Graft the output of the Extrude component to get a slice-able object. I struggled a lot with doing a manual boolean union before using the component in Grasshopper. See checkpoint 4 below.
- Manually checking edges seems risky… I wonder if there’s a better solution to this even though I suppose it’s possible to check if the resulting form is sliceable in CURA.
- I need to troubleshoot the union process. I like the previews in CURA.
- Also my design turned out to be very small! It would only take 10 min to print! Went back to fix this. The final design would take about 45 min.
- I’m also concerned with how long it takes to bake & export a small design. I’ll need to keep this in mind going forward.
Step 5: STEP FIVE (OPTIONAL)
Extend grid into 3 dimensions.
- I wanted to add a shallow depression to each form. I had a ring dish in mind, but I’m also curious about how this form might be 3D printed.
- I added a z-offset based on the distance of each point to the centroid. I added a float slider component to control the degree of offset but removed it (it must be connected to the distance parameter that determines how points are connected to create a continuous form). See checkpoint 4 for the code and output.
- If it’s off balance (there is no support), will the weight distribution shift as it prints resulting in unevenness? In general, I’m interested in creating forms that illustrate or depict the production process. For instance, with a plotter I physically perturbed my drawings in progress to showcase the sketching qualities of the plotter that also exhibited a tension between precision and a more organic quality signifying the contribution and collaboration of the person and machine.
Overall the process was more challenging than I expected it to be. One aspect I really enjoyed was working with multiple tools -- first Rhino to create geometry, Grasshopper to manipulate it, python to create scripts, and then Cura to see what the final fabrication process would look like. Each tool added more expressivity to what I could make. I still need to debug the boolean union. Also I've added the python script used to create my final design and the final STL. Unfortunately I can't add the Grasshopper file but I've added one last image to show the final gh set-up. I'm excited to keep trying out projects and get more familiar with these tools!