We recently had our 1st graders each create a 3D-printed ruler as a part of a science unit on measurement. Finding a method to create the rulers that wouldn’t require a large time investment was a concern. Using the tool
OmNomNom to extrude a black and white image into a
OpenSCAD script, which will then become an .stl file, ready for 3D printing. The really exciting thing about this method is that it forces students to change the OpenSCAD script variables to adjust their model, driving home the relationship between the code and the physical object. Students gain an understanding that code not only changes the object on their screen, but also the final object in ‘real life’!
A note on logistics: this was a class of 1st graders, so the image editing was done by a teacher between classes. Students created their paper rulers, we then scanned and edited the photo and came back to the next class with the new black and white images for students to process through OmNomNom and into OpenSCAD. In the future, we’d like to find a way where students could do the image editing as well, but found it just a bit too time-consuming and troublesome. After students created the makerware files, we then printed them on our printer. Printing this many objects did take some time, but we loaded an SD card with the files and had older students unload and start the next print as they noticed the jobs finish.
Below you’ll find a step by step walk through on how to turn a scan or photo into a 3D-printed object.
Edit the image
You can use your favorite image editor, in this case we are using pixelmator for the mac.
Rotate the image if needed.
If needed, rotate the image.
Crop the image as needed.
Crop the image so only the desired area remains.
Use levels to adjust the image
Your goal is a nice black and white only (2 color) image. Most image editing software has a levels feature.
Apply levels
In Pixelmator, drag the levels on the image.
Adjust levels as needed
Notice the resulting image – high contrast, only black or white.
Export as jpg
Save the .jpg
Open the image in OmNomNom
Drag and drop image to open.
Settings
For this project, we will use 2 levels with a width of 443×165
Export as Logo
Export as a logo
The object will open in OpenSCAD
Hit F5 (on some macs FN+F5) to see the preview
Editing variables
reduce surfaceheight to 2
Editing variables
To make getting the proper size simpler, we will remove any border by changing the baseWidth multiplier to 1 instead of 1.2
Preview and render the model
F5 to preview, then F6 to render. Rendering might take a while.
Prepare to wait
By a while I mean 10-15 minutes.
Prepare (slice) your file for your 3D printer
In this case we’ll be using a MakerBot Replicator 1 Dual and using MakerWare to slice our model.
Scale object as needed
In this case, the ruler is approximately 7.75 inches, so the setting the X value with uniform scaling on will result in the proper size.
Final scaled object. Click Make to export your file.
Export to file
We use a raft to make removing the object easier. Be sure to adjust your settings for your specific 3D printer.
Print and enjoy!