**Thickening CountourPlot3D** **designs: **

For some of our models, we are using Mathematica’s CountourPlot3D command to generate plots of algebraically defined surfaces. Here’s a simple example:

As you can see, Mathematica gives us a paper-thin representation of the cylinder, which will not work well for printing. (Mathematica’s various Thickness commands don’t work with CountourPlot3D.)

This problem is easily solved in Blender. After exporting an .stl file of my cylinder, I imported it into Blender.

Blender has a bit of learning curve, but there is a ton of good documentation and plenty of video demos online. For basic manipulation of your model, use the “G” key to “grab” your model, and move it around with your mouse. The “S” key does the same thing for scaling, and the “R” key for rotating. Two fingers on your laptop trackpad rotate your viewpoint; pinching with two fingers zooms.

To thicken this model, do the following. First, make sure your model is selected and outlined in yellow. You can do this by clicking on its name in the window at top right. You should also make sure that you are in Object mode (see bottom of main view window). At the top of the tall window on the right-hand side of the display is a row of icons:

Select the wrench, which stands for “Modifiers.” From the “Add Modifier” dropdown menu, select “Solidify.” Adjusting the “Thickness” option that “Solidify” gives (click on the Thickness number and drag to the right or left) will allow you to thicken your model.

When it looks good to you, hit “Apply” and Blender will update your model to the thickened version. Export your model (under File menu) as an .stl and print it!

To see a demonstration, try this YouTube clip, which is where I learned everything I know.

* Dealing with Overlaps: *Many of our models consist of several overlapping pieces, and Makerware has trouble with this.

Seen here in Blender, this pair of spheres is going to cause major problems for Makerware. I exported them, and produced .gcode printing instructions in Makerware, and then looked at the results in a .gcode viewer (following the instructions in this post). There I can see that when the printer is about halfway through printing this design, it will be printing slices that look like this:

You can see that Makerware has interpreted the overlap between these two spheres as “outside” rather than “inside” the model. It is not printing any support lattice in this area, and is not connecting the two ‘half-moon’ shapes together. When this model prints, there’s a very good chance that the two sphere pieces will not be connected together, and the whole thing will fall apart.

We can fix this in Blender, using some modifiers. First, I selected each sphere individually and applied the “Triangulate” modifier. This just helps the next step work better. (Sometimes, it may even be helpful to do some subdivide operations and then triangulate if the latter steps don’t work well.) Then I selected one sphere, added a “Boolean” modifier, chose the “Union” option, and selected the other sphere as the object to union with my first sphere.

This tells Blender to take the union of these two spheres. Just like in your math classes the union means “create a new object which consists of all points which are in one or both of the spheres.” Crucially, it doesn’t treat the points in both spheres differently from how it deals with those in one sphere. Hit “Apply” and delete the second sphere — you should be left with just one object — the two spheres joined together.

I selected the unioned spheres, exported them as .stl, ran them through Makerware, and examined the .gcode file, and here’s what I got for a slice about midway through the printing:

That’s just what we want! Now the printer will fill in the overlap of the two spheres will support lattice as part of the inside of the model, just like we wanted.

More complicated models have produced mixed results using union, but this should at least get us started. See me if you’re having any trouble, and I can try to help.

]]>

Any program which simulates 3D images on your screen can (probably) be used to start a design, but we have primarily been using Mathematica for our designs. It is well-suited to the models we are working on, and it is easy to export the image files. Here is the Mathematica cheat sheet I wrote up for our first meeting. It has some helpful hints, but different Mathematica commands will be needed depending on the sort of model you are designing. Here is part of the Mathematica notebook used to design Jessica’s torus knot:**Mathematica****design:**

After the ‘Export’ command at the end of the Mathematica notebook (like above), there will be an .stl file containing the 3D data for your model on your home directory. In some cases, this will be sufficient to send to Makerware and print (this was the case for the design above). But in some other cases, extra manipulation of the design will be necessary. We have encountered two problems that need extra work. The first is that designs in which two pieces overlap are troublesome for Makerware — it interprets the overlap as part of the ‘outside’ of the model, and thus leaves holes in the middle of our prints that should not be there. The second problem is that surfaces produced in Mathematica using the CountourPlot3D command do not have any thickness. Both of these problems can be solved using Blender. I’ll address the fixes in a separate post. For your reference, here’s the torus knot in Blender.**Blender:**

After these steps, we are ready to work with our model in Makerware — the software which runs our 3D printer. In Makerware, hit the “Add” icon, select the .stl file you are working with, and it will be imported. The icons at the left of the screen can be used to resize and reposition your model so that we can get the best possible print. When we print the model on the printer, we will then hit “Make” (and accept the default options, which seem to be working well) and the computer by the printer will convert the data to 3D printing instructions and send them to the printer. Before doing this, however, it is helpful to check that Makerware has done a good job of interpreting the model. On your own computer, the “Make” menu will give you a window that allows you to “Export!” your model (rather than “Print!”). After hitting “Export!”, save your model in the .gcode format, and move to the step below.**Makerware:**

The .gcode file is an actual set of 3D printer instructions. After producing them, there is a very easy way to check them online. Go to http://gcode.ws/ and upload your .gcode file in the box at left. After a little bit of thinking, the .gcode viewer will show you the exact moves the 3D printer will make. The scroll bar at the bottom of the window scrolls you through the moves made in each layer; the scrollbar at the right moves you from layer to layer. Use this to quickly step through the process of printing your model and check for any potential problems, or ways in which Makerware has misinterpreted your design. (This is how we discovered the overlap problem.) You should be able to see the support lattice that the printer will create to support your model as well as the actual printing of the model.**.gcode Check:**Assuming everything looks good, the time to print is here. Set up a time for your print run with Prof. Adeboye or Prof. Constantine. Using your .stl file on the computer attached to the printer, repeat the Makerware steps above and choose “Print!” at the end. Several hours later your model will be all set. You will need to clean away the support lattice and add any paint you want.**Print!:**

This is a single connected loop which winds around a torus (doughnut shape) 13 times in one direction while winding 15 times in the other direction. It will look fantastic once we paint it. Great job, Jessica!

]]>We also started a print run on Matt and Lili’s second surface. It probably took 8-10 hours,and here is the completed print:

As you can see, the printer created quite a bit of support material as it was going. Once that is cleaned up and we paint in some color, it should look really nice!

]]>This is a model of one of the surfaces we looked at during our first meeting. It was designed by Lili Borland and Matt Laskowski. It took about 8 hours to print.

In the picture you can see some of the supports that Maker Ware automatically printed to help support the model as it was printing. We’ll have this model at the meeting tomorrow, when we’ll start printing on Matt and Lili’s second design, which is a bit more complex.

We’re looking forward to getting more things printed!

]]>If you have ideas of which projects you would be interested in working on, or if there is someone else you want to work with, bring those ideas to the meeting. We’ll start organizing some projects so people can work on them over break.

]]>- Skeinforge is an alternative to makerware. It converts .stl files into gcode files. Gcode is the instruction set for the printer itself. You can download Skeinforge and learn more about it here.
- Skeinforge is open source, so those with an interest in the computer science side of this project may be able to dig into the program to understand a bit more about how the design –> printer pipeline works. In particular, it appears that we can be more detailed about the instructions we give the printer via Skeinforge than we can from Makerware. Anyone who wants to take on the task of becoming a Skeinforge expert is heartily encouraged to do so!
- You will need Python to run Skeinforge. You can get it here.
- In Skeinforge you can view the step-by-step printing process of your model via it’s gcode viewer. Another way to do this is via the online gcode viewer at gcode.ws. Once you have gcode you can upload it directly to his site and see how the printing process will proceed. We should do this with each of our models so we can detect and fix any potential problems.

Happy tinkering!

]]>As promised, click here for the Mathematica notebook we used in the meeting today do design the models Prof. Adeboye introduced. If you are new to graphics in Mathematica, playing around with this example might be a good place to start.

And here is the Mathematica cheat sheet I passed out during the meeting.

As we said at the meeting, we are soliciting a few volunteers (individually or in small groups) who would like to take on the examples we looked at today as first design projects. We hope to print them soon, at which point we’ll all get to see the printer in action.

Other folks should start thinking about models you might want to design. A good place to start would be our Suggested Models page, but please bring your own ideas as well — from things you’re seeing class to things you can find online. There are plenty of options!

]]>In preparation, you should download Mathematica and MakerWare and bring your laptop (if you have one). Instructions for getting the software are on the Software Resources page.

We’ll be going through the Mathematica design process right up to the point that we have a printable design. For a future meeting, we’ll take a trip down to see the 3D printer and get this model printed.

We look forward to working with you on Friday!

]]>**Mathematica**- Mathematica does all sorts of mathematics, including numerical computations, symbolic manipulation, and — most important for our purposes — graphical representation. It is the most direct method for producing the graphics files we want.
- Generally quite expensive, Wes students can download a copy for free from WesFiles in the following way: Go to WesFiles. Click the yellow folder under the cardinal in the upper-left-hand corner. Follow the folder path software -> (Linux/Mac/PC)Soft (as appropriate) -> All -> Mathematica for Students -> Mathematica 9.0 and download the .dmg file to install. Also in the Mathematica for Students file you will find Mathematica_Student_Activation.txt, which has instructions for obtaining an activation key for your copy of the program.

**Makerware**- This is the software which connects directly to Wesleyan’s printers. It can also perform some (simple) manipulation of the models. Other 3D graphics programs produce .stl files; Makerware converts these into .x3g files which can be sent directly to the printer.
- Makerware can be downloaded for free from: http://www.makerbot.com/makerware/

**Blender**- For some more complicated design project, we may have to design directly through a 3D design program. There are many of these; Blender is a free, open source one.