Friday, June 28, 2013

Fixing error "material isn't enough, please replace new spool" and Do you have enough material for afinia?

This blog post will explain how to ensure that you have enough material left to print a model given a certain weight. If you get the error below this blog post will also be helpful.
If you are trying to eliminate the error above and you are sure you have enough material left, the fix is simple. Simply go to 3D print>Maintenance from the Afinia software, then click the new spool button. Set the material type you are using and the weight to 700 g and click OK. This will reset the program's internal counter of material used.
If you would like to know if the material you have is going to be enough to print a model you can weigh it on the black scale in the lab and then enter this weight into the new spool dialogue box instead. If you are also weighing the spool, an empty spool weights about 280 grams so simply subtract this from your measurement. The stand for the spool weighs about 52.3 g so this can also be subtracted or the scale can be tared before placing the spool onto it.

TIP: there is also a 500 g calibration weight that can be used if the scale needs to be re-calibrated. Follow the instructions on the cover of the scale to tare and re-calibrate.

How to clean sand paper

The plastic can be removed easily from the sand paper in the lab by lightly wiping it with a paper towel.

What to do if the max nozzle height isn't high enough

If are trying to set the nozzle height and the printer's max height isn't allowing the build plate to come up high enough simply type the maximum value into the 'to' field and click set nozzle height. Once this new height is set, the program then increases the max up by another mm. You can repeat this until you get the height you need.

Wednesday, June 19, 2013

What to do if the Afinia print button doesn't work

The print button

If you try to click on the print button from the Afinia software (mac version 1.4 (3.1)) and nothing happens then follow these steps to re-install.

  1. Drag afinia application to trash folder from the applications folder
  2. Delete the file: users/6dlab/Library/Preferences/AfiniaMicroboards.Afinia.plist
  3. Empty trash
  4. Restart mac
  5. Re-install Afinia software from either the google drive location, the interent, or the install CD in the lab

Note-the google drive folder that is referenced is:
6dlab/3-D Team/software install packages/
If you are on a different computer, replace "6dlab" with your own user name.

This might also solve other problems you may be having with the software but it has been verified that this procedure fixes this problem.


Tuesday, June 18, 2013

Volume by Shells and Disks

3D: Volume by Shells and Disks

The goal of this project is to teach students how to create a 3D visualizations of volume by shells and disks for any mathematical function using the following two programs:

Things that you'll need to do before starting to design:

  • Determine which function you wish to work with
  • Determine radius and heigh of each shell/disk
  • Determine how large you want the object to be

So for our example, our team used the following conditions:

  1. The function used: f(x) = -x^2-x+8 rotated around the y-axis for the x range from 0-2. 
  2. There were four disks and four shells made for this visualization of approximating volume, and with some simple mathematics and some help from the quadratic formula, we were able to determine the radius and heigh of each of the disks and shells.
  3. For the print, the radius of each object was scaled up by 14mm and the height was scaled by 5mm.

Now, let's move on to how the parts were actually modeled.

Towers of Hinoi

The base for the popular puzzle 'Towers of Hinoi' is being used since it can lay out the three models in a way that would easily convey the idea that the volumes were similar.

To make the Tower of Hinoi, we used Tinkercad, which can be accessed here:
  1. The first step for making the towers is to create the rectangular base. To do this, go into tinkercad and select the box tool and place it down upon the workplane. 
  2. Select the ruler tool and place it down upon the workplane. This allows you to type in the desired dimensions of the object. (We picked a rectangle with dimensions140x70x4mm)
  3. Select the Workplane tool and place it on top of your rectangle. Doing this will allow you to smoothly place one object onto another.
  4. Place the ruler on the corner of the rectangle so that the coordinates of the rectangle as compared to the origin of the ruler are (0,0).
  5. Choose the Cone tool and place it upon the workplane. We gave the cone a diameter of 12mm and a height of 4.28mm. Copy the cone and paste it twice, thus creating two new cones.
  6. We wanted to place the cone at coordinates (35,35), (105,35), and (175,35). Since the object has a radius of 6mm, we had to place the cones at (29,29), (99,29), (169,29) in order to get the center of the object to the desired coordinates. 
  7. Next, choose the Cylinder tool.  We gave the cylinder a diameter of 6 and a height of 35.71
  8. Now position these cylinders on the platform at (32,32), (102,32), (172,32).
  9. Now select all of the shapes and click on the group tool at the top right. Now you are done!
  10. At the top right, click design and scroll down to 'Download for 3D printing.' Say you want it as an STL and you'll now have your 3D model available to be imported into other 3D software!

Now that you have a basic understanding of how the design is made, try tinkering the rest of these basic shapes yourself! You'll want to make the hols slightly wider so that when everything is 3d printed, they will fit together nicely! (We would tell you how much wider the holes would be, but it appears the additional layer thickness that the machine produces varies depending on what model you have) If you still are lost, follow some of the tutorials on the tinkercad website under LEARN. Also, don't forget to add the hole in your design for the cone at the bottom of the tower.

OH! One more note.
To make the actual function, we typed the following into Mathematica:
Export["Name of file.stl",%]


In searching for sites that contained a large number of STL files, I stumbled across GrabCAD. This site contains over 80,000 STL files. (Most of the files on this site are engineering based, but there exists a handful of mathematical objects such as knots, fractals, and klein bottles). It also has a program that may come in useful at some point called GrabCAD. GrabCAD theoretically is beneficial for getting external input on your 3D model. However, upon further inspection, it may be no more effective than plugging a 3D file into a shared Google Drive folder.

All the same, go check it out! You might find something awesome.

Tinkercad Tutorials

For those searching for a very user friendly 3D software, check out Tinkercad. One of the most useful things that Tinkercad has to offer is the tutorials built into it. To access these tutorials, simply click LEARN as shown in the image above. At this point You will see a section of tutorials that looks similar to the image below:
Upon clicking on one of these tutorials, one will be taught how to use the features that Tinkercad has to offer. The nice things about these tutorials is that it gives you step by step instructions as you actually  use the tools yourself to make the requested object. It isn't necessarily a perfect system. For example, you can completely botch up one of the tutorials, but Tinkercad will congratulate you with fireworks nonetheless. If you go back, you'll be able to see where you went wrong (hopefully) and be able to make the desired object properly the second time around.

So try it out, it's a very user friendly software!

Blender Tutorials

Where do I begin?

Blender is an absolutely fantastic opensource 3D modeling software. Not only does it have a vast number of built in tools ready to be used by the individual, you can encorporate your own Python scripts into Blender. This software has a large number of users who are very knowledgable of the software and are willing to help you with any question you have. Along with help, the other Blender users are very kind when it comes to providing add-ons that one can use in Blender. 

Now for the nitty-gritty.

If you go to, you will find a large number of tutorials that the makers of Blender provide to help anyone from beginners to long time users learn how to use this software. 

Once again, back to the online users. If you venture to youtube, you will find a large number of tutorials that people have made in an attempt to teach you how to become very efficient with the software. This software has shortcuts galore, which at first can be a lot to handle, but with some practice, you will find that these shortcuts makes the creation of complex 3D meshes so much easier.

So hopefully this little post will help you get some good use out of this wonderful free software!

Tuesday, June 11, 2013


Like GrabCAD (, This site allows you to download STLs from a large selection of user-made files. Unlike GrabCAD, you do not need to make an account to download the 'thing's. There seems to be quite a large selection of mathematical type of objects contained within the site. Beyond that, one is able to find a large assortment of 3D objects from jewelry to gadgets. One of the things interesting I found on here was the ability to edit some of the projects and the capabilities these projects had. For example, there was a project I found that was able to take any image you wanted to make 3D and place it within a 100x100 mm square frame. ( Altogether, this site is a good go-to for quickly finding a variety of 3D printable objects.

3D Printing a Photo

This is not my code, however, this tutorial helps by laying out nice step by step instructions that will help any user be able to accomplish this project.

For a more detailed explanation, please visit:

Now for my personal experience in downloading this software:

For this to work, you will need to download the following:

Now that you have the three of these downloaded, move the modelbuilder folder into the processing library folder. 

Now copy the following code into Processing:

//3D printed photograph
//by Amanda Ghassaei (w bugfix by Pete Blacker)
//May 2013

 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 3 of the License, or
 * (at your option) any later version.
import processing.opengl.*;
import unlekker.util.*;
import unlekker.modelbuilder.*;
import ec.util.*;

String name = "YOUR_FILE_NAME.jpg";//name of file

//storage for dimensions
int widthRes;
int heightRes;
float widthDim = 8;//width dimension (in inches)
float widthScaled;
float heightScaled;
float zDim = 0.1;//max vertical displacement (in inches)
float thickness = 0.02;//base thickness (in inches)

boolean invert = true;//if true, then white areas are lower than black, if not true white areas are taller

PImage img;//storage for image
float pixeldata[];//storage for pixel array
UVertexList v1,v2,v3,v4;//storage for verticies
UGeometry geo;//storage for stl geometry

void setup(){
  img = loadImage(name);//load image
  //get dimensions of image
  widthRes = img.width;
  heightRes =img.height;
  size(widthRes,heightRes,P3D);//set dimensions of output
  image(img, 0,0);//display image
  loadPixels();//poad pixels into array
  pixeldata = new float[widthRes*heightRes];//initialize storage for pixel data
  for(int index=0;index<widthRes*heightRes;index++){
    int getPixelData = pixels[index];//get data from pixels[] array
    pixeldata[index] = getPixelData&255;//convert to greyscale byte (0-255)
  //initialize storage for stl
  geo = new UGeometry();
  v1 = new UVertexList();
  v2 = new UVertexList();
  v3 = new UVertexList();
  v4 = new UVertexList();
  //draw stl
    //draw top
    for(int i=0;i<(heightRes-1);i++){
      for(int j=0;j<widthRes;j++){
        widthScaled = j/float(widthRes)*widthDim;
        //top layer
    //draw sides
    for(int j=0;j<widthRes;j++){
      widthScaled = j/float(widthRes)*widthDim;
    //draw sides
    for(int i=0;i<heightRes;i++){
      heightScaled = i/float(widthRes)*widthDim;
        //draw top
    for(int i=0;i<(heightRes-1);i++){
      for(int j=0;j<widthRes;j++){
        widthScaled = j/float(widthRes)*widthDim;
        //top layer
    //draw sides
    for(int j=0;j<widthRes;j++){
      widthScaled = j/float(widthRes)*widthDim;
    //draw sides
    for(int i=0;i<heightRes;i++){
      heightScaled = i/float(widthRes)*widthDim;
  //draw bottom
  //add bottom four corners

  //change extension of file name
  int dotPos = name.lastIndexOf(".");
  if (dotPos > 0)
    name = name.substring(0, dotPos);




Click the arrow pointing down to save the code. (This is a necessary step). 

Now find a jpg you would like to make into a 3D model. Open up the image editing software called Gimp. Import your jpg file and desaturate the image by clicking colors->desaturate. Export the image as a jpg file. After doing this, move the desaturated jpg file that you would like to make 3D into the sketch folder that Processing made when you saved it.

Close Processing and click on the .pde file to open the code in Processing. Towards the top of your code, you will see the words: String name = "YOUR_FILE_NAME.jpg"; Replace 'YOUR_FILE_NAME' with the name of your jpeg and press the play button (run). You may receive an error. If this happens, go to processing->preferences and click 'Increase maximum available memory'. After some failed a few tests, I just changed the maximum size to about 2000MB. Click run again, and after a few moments, you should see a message that it is making your STL and that it is finished.

TADA! You have successfully converted your photo to a 3D image.

This is the result from my 3D print. For better results, scale up the z-axis and make the size of the 3D print altogether larger. (This was only about 73x73 mm, and only about 1mm high)

Parts you'll find around the department-slide holder

A slide holder designed and built for Dr. Eva Strawbridge's lab.

Printing with Afinia H-series

TIP:to save time, you can start pre-heating the table by clicking 3D print>Maintenance table heat 1 hr.
TIP:If you are printing something over 50 centimeters tall on the blue tape then it may curl off the plate and cause a burn or jam, stopping the print.  Printing directly on the perf board makes tall prints more stable.

1.You can import your model from either an STL or UP3 file by clicking file>open (largest model allowed with yellow clips is 125.5LX140WX130.7H mm, see below for definition of Width and Length).
2.Press the Auto Placement button, this usually works pretty well. This places them off the build plate by 3mm to give space for the highly recommended raft (I think). The models should be as close to centered as possible and no closer that 12 mm to each other to prevent them from sticking.
3.If any of your models are red when you click on them, you will need to click Tools>Autofix. This will try and fix an STL file where some of the normal vectors are not pointing outwards. (To learn more about STL files, try wikipedia)
4.Once you are satisfied with the arrangement, check the printing settings by clicking 3D Print>Setup from the dropdown menu (or 3D Print>Preferences from the button). There are a lot of settings here that can be read in the manual on pg 22-24 but the most important one is the Fill. There is a trade off here between part strength and material/time used. The one that uses the most material and produces the strongest parts is the solid, then loose, then hollow and then big hole. Checking 'shell' will use the least material/time and weakest parts regardless of what fill option is pressed by simply creating a 'shell' of the part. Below you can see what each setting means. If you aren't sure what settings to use clicking 'resotre defults' should usually work.
5.Make sure that the table has been at 105 C for at least 10 minutes and that the build plate is level (very important for the print to come out right). Click 3D print up at the top left corner of the program (or 3D print>print from the menu bar). Quality controls how fast the print head moves, leave it at fine unless you are in a hurry or your print seems to fail at fine. Rafts are usually good. If you get errors trying to print an STL file, checking 'unsolid model' may help it print, otherwise leave unchecked.
6.Once everything is good, select print to send the file to the printer. If you will be printing another model after this, it is helpful to set "heat platform after finish" to a time greater than zero min. After it is sent, the computer does not need to be on/connected to the printer. To cancel a print click 3D print>Maintenance then click 'Stop All'. The printer will need to be re-Initialized after this button is pressed.
7 .Save this file to google drive LIBRARY/ 6-D Lab>3-D Team>Archived prints>Afinia Archived prints and record the necessary information on the sheet next to the printer--including what you saved the archive file as.

This is what happens when the tray is not heated all the way before a print is started:

Build volume
For the extruder to not bump the yellow clips, the Length dimension must not exceed 125.5 mm. This can be seen in the picture below.
 Or from the program:

TIP:There is also a extruder vent "wind barrier" that has the following effects:

Door Closed
  • Each printed layer bonds to the previous layer better, making for a stronger part.
  • The under sides of printed curves have a rougher finish.
  • Recommend for large parts.
  • Support material is harder to remove.
  • The heated platform is not affected by the airflow, so reduces warping of the raft from the platform. Having the door open during pre-heating can cool the platform unevenly thus resulting in warping.

Door Open
  • Each printed layer bonds to the previous layer less, making for a weaker part.
  • The under sides of printed curves have a smoother finish
  • Recommend for small and intricate parts
  • Support material is easier to remove.
  • Delaminating can occur in the model, try with the door closed.
  • Recommend to keep the door closed during pre-heating of the platform, and open the door after the raft section has been com- pleted to reduce chances of warping.

Setting up the Afinia H-series printer

The user manual can be found in the lab or here. Useful information starts at page 11.
Here is the best way we found to set up the printer to print:
1.Turn on the printer using the switch on the back
2.Start the Afinia software, its logo looks like this:
3.Click from the menu bar 3D print>Initialize the printer should beep and the light should turn solid green (indicating printer ready).
4.It is best to start the table heat as long as possible. (so prints will stick to the build plate). To do this click 3D print>Maintenance then click 'Table heat 1 hr'. It takes about 15 minuets to reach the recommended temperature of 105 C. (This is the minimum time needed before printing, it should be on longer so the whole table)
5.put down blue masking tape on the FR-4 Board (Glass-reinforced Epoxy Laminate, shown below). I recommend 3M scotch-blue painter's tape for multi-surfaces #2090. It is nice and wide and you only have to put down two strips to cover the whole plate. In the picture below you can see one board covered on the left and another uncovered. The surface doesn't have to be perfectly flat but close.
6.Place the board on the (now heating) plate and secure with the yellow clips as shown.

7.If you happen to have moved the printer, changed build plates or your prints aren't coming out right, you have to level the build plate and set nozzle height. Follow steps 7.1-7.9 (reproduced from the manual) below.
7.1 Open the Maintenance dialog box from the 3D Print menu and click the Center button to begin the leveling process.
Maintenance dialoge box
7.2 We want to raise the platform so that it is 2 mm away from the nozzle. If you already know about what that height, should be, enter that height in the To: box, then click the To: button. If you do not yet know this height, Click the To: button to bring the platform to the displayed height, then slowly increment the height until the platform is about 2 mm from the nozzle, clicking To: after each increase.
7.3 Check that the platform is 2 mm away from the nozzle at the center point. If it is not, raise or lower the platform using the To: button so that it is. Then check all four corners and the center are the same distance (2 mm) from the nozzle. Use the blue or orange 2 mm indicator plastic pieces in the afinia parts drawer to determine this.
The 2 mm indicator strips
7.4 If the platform is not the same distance from the nozzle at all five points, you will need to adjust the platform until it is level. There are 3 screws under the platform that are used to level the platform. Loosening a screw will raise the related corner of the platform, while tightening the screw will lower the same part of the platform. So you don't burn your hands, use the short philips screw driver to adjust the leveling screws as shown below.
TIP: Start the table off by screwing the leveling screws all the way in and then loosening each one by 1.25 revolutions.
Adjusting the table level
7.5 Next we want to move the table up so that the nozzle is 0.2 mm away from the table. Once you are about 1mm away from the nozzle, increase the number in the text box by 0.1mm increments and click the To button. Repeat until you get 0.2mm from the nozzle.

TIP: An easy way to check the distance between the nozzle and platform is to fold a piece of paper in two, which will be about 0.2mm thick. Use this as a spacer to gauge the distance between the nozzle and platform.
Using folded paper as a 0.2 mm indicator

7.6 Once the table is 0.2 mm away from the nozzle, we have to set the nozzle height. To do this, click the Set Nozzle Height button to save the current height to the printer's memory.

Next see printing with the Afinia H-series printer to start a print!