15-394 Assignment 3: Slicer and Model Maker in Grasshopper
I. Introduction
In this assignment you will modify a Grasshopper program that slices a
solid object to produce a laser-cuttable model. You will then produce
such a model, laser cut your parts, and assemble it.
Start with the Slicer assignment
Grasshopper program. You can use the torus
Rhino file as test data for this program, as we did in class. Load
the torus file into Rhino. In Grasshopper, load the slicer program
and right click on the Geometry parameter component in the top left
corner, then choose "Select on Geometry" and click on the torus in the
Rhino window.
The slicer program is an extension of the program shown in this video. If you didn't quite
get the explanation of the algorithm in class, you might benefit from
watching this video. Note: the Grasshopper component referred to as
"Planar Surface" in the video is now called "Boundary Surface".
II. Generate YZ Cutting Slices
The grasshopper code generates both XZ and YZ model slices, but only
the XZ slices are further manipulated to lay them out in a grid
suitable for laser cutting. There is a large tan circle where the
corresponding code for the YZ slices needs to go. Write this code.
Note that there is a bug in the Solid Difference (SDiff) component
that can interfere with correct cutting of your slots. This Grasshopper
forum discussion gives details of the bug and offers a solution.
III. Automatically Compute the Grid Size
The current code uses two number sliders to adjust the size of the
grid cells for laying out the model slices. But you should be able to
calculate this automatically. Replace the sliders with suitable
calculations.
IV. Label the Slices
We need a way to label the slices so we can tell them apart, and when
they're laser cut, so we can tell which side is the front face. We
can do that by generating a label for each slice, e.g., X-1 through
X-11 and Y-1 through Y-10.
In Display > Dimensions > 3D Text Tag you will find a component
that makes text shapes. Write code to label all the slices. Your
solution should work for any number of slices.
V. Create a New Shape to Model
You can use the torus to test your code, but in this step you should
create your own 3D shape and run it through the slicer. Note that
many complex shapes will not slice correctly because the algorithm is
rather simple-minded. One approach to consider is lofting between two
contours to produce an interesting 3D surface. As long as there are
no z-overhangs, slicing should be successful. But you are not
required to use a loft; any non-boring shape that you can model
successfully is fine. Simple regular shapes like cubes are boring;
pick something more interesting.
I found it convenient to set the Rhino units to centimeters so that I
could get a reasonable grid size but also produce an object that was
reasonably large (around 4-5 inches). You can change the units by
clicking in the box at the bottom of the window.
Remember to adjust the Thickness slider to match the actual thickness
of the cardboard you intend to use. For thin cardboard a value of
3.3 mm should work well.
VI. Laser Cut Your Model
Bake the generated XZ and YZ slices into Rhino. Don't forget to turn
off the Isocontour lines so they don't show up in the DXF. To do
that, click on the baked object, and in the properties box on the
right edge of the Rhino window, in the Isocurve Density section,
uncheck the "Visible" box.
There are two additional steps you need to take before exporting the
slices as DXF files. First, we need to convert the text tags from
annotations (which the laser cutters ignore) to actual curves. To do
that, select the annotations and type the Rhino command "Explode".
They will be replaced with outline curges.
Second, because the Grasshopper shapes are 3D, Rhino will try to put
several copies of each line in the file, which means the same line
will be cut multiples times. To prevent this, select the entire model
in Rhino and type "Make2D" in the command window. Accepting the
default settings should be fine. Note that this will deposit a new
set of shape outlines in the Rhino window, offset from the original shapes.
It is these new outlines that you'll want to write out as a DXF file.
The grid-based layout is simple but not the most efficient use of
space. Feel free to edit the DXF file and move items around to pack
them more closely before laser cutting.
If you set your units to centimeters, remember that the laser cutters
think everything is in millimeters so you will need to scale up your
file in the laser cutter client program by a factor of 10.
VII. Assemble Your Model
You can look at your labeled slices in Grasshopper to see where each slice fits.
Put your model together, take a picture of it that makes it easy to see tha model structure,
and post the picture to Piazza.
VIII. Super Extra Credit
If you're really into Grasshopper, find a way to pack the slices
together efficiently instead of spreading them out in a space-wasting
grid. I don't know if there's an easy solution to this. Find it and
you'll earn super extra credit.
Hand-In
Hand in a zip file handin.zip containing the following:
- Your Grasshopper program (a .gh file).
- Your Rhino file (a .3dm file) with the object you used as input to your program.
- Your DXF files.
- The photo you posted to Piazza.
Due date: check the class schedule or Autolab.
Grading (10 pts)
|