Lampshade script

235
Downloads
748
Views
Published on April 8, 2011
This thing was Featured on April 8, 2011

Description

By request, this is the famous, fabulous lampshade script. We've used it to produce lampshades, bracelets, faux ABS LPs, small storage cups, and in any situation where a hollow cylindrical or conical form optionally with a solid bottom is called for.

This script takes an image file as input and produces a gcode file that will create a conical form of the specified parameters, with the image embossed on the surface. It's recommended that you use the -c flag, which will cause the form to be built as a single, continuous spiral.

You may need to edit the script or its output to add your own pre- and post- print gcodes. Be sure to cast an eye over the output before you print!

Printing these forms in clear PLA is particularly pleasing!

The code is maintained in git; the latest version is always available at:

github.com/makerbot/Makerbot/tree/master/scripts/lampshade

Have fun!

Instructions

Here's the usage info. Go crazy!


Usage: lampshade.py [options] image.png

Options:
-h, --help show this help message and exit
-r RADIUS, --radius=RADIUS
set the top and bottom radius of a right cylinder
-l LAYERHEIGHT, --layerheight=LAYERHEIGHT
set the height of a single layer, in mm
--rtop=RTOP set the top radius of a conical shade
--rbot=RBOT set the bottom radius of a conical shade
-H HEIGHT, --height=HEIGHT
set the height of the shade
-s SPEEDFACTOR, --speed-factor=SPEEDFACTOR
the factor to multiply the feedrate by for a
completely dark pixel
-c, --continuous use continuous Z movement
-a, --ABP use automated build platform
--bottom-layers=BOTTOM
number of layers in the floor
-f FEEDRATE, --feedrate=FEEDRATE
set the base feedrate
Report as inappropriate

You must be logged in to post a comment.

I wonder if you could make a replica of early record players with these cylinders. Early record players used wax cylinders with grooves in them. Maybe it is possible to encode an mp3 into these. It would be way retro.

I've got an old record player that plays wax cylinders, I could test it :)

This should be possible. Also, creating cylinders and then constructing a lathe might be a project within reach. I must admit that I used this lamp script to create the "3D Printed Vinyl Records" you might have seen on the MakerBot blog early this month...

Well I already edited the lampshade.py to automatically insert my start and end gcode settings, but for some reason I can't get this to print well. If I leave the speed setting as default, it just looks like a normal round object, nothing on the shade. If I set it low enough that something can be seen, after it is done slowing down (to make the picture visible), it speeds up for an equal amount of distance, creating a kind of smear on the lampshade.

It seems like it is trying to catchup to something after it slows down, which messes up the entire thing.

Anyone else having smear problems? *DONT_KNOW*

B.t.w. here's a patch to make it more configurable, output to a file and have 5D support for several other firmware types.

https://github.com/ErikDeBruij...

Thanks for uploading, I got the script working on my Thing-O-Matic without too much trouble. I generated the G-Code and then copied my start.gcode to the start of the script, replacing the Cupcake block.

I did have a few issues with the bot stalling when I tried to print initially but after I copied to to the SD card it was working fine. Translucent blue PLA 4043D makes it hard to take a picture of but you can see the detail. I'm not sure if it's my bot or settings but I noticed that certain parts
of the print came out much better than others (mostly the top and bottom). This was not printed using continuous mode, there is a seam at the back.

Good job! What I did was edit the lines of the lampshade.py to match my ToM settings, before I generated the gcode. It didn't work out at all. I was wondering... are you using a stepper extruder on your ToM?

Hmm, when I edit the lampshade.py file, it specifies a cupcake. What would I need to edit to get this to work on my Thing-O-Matic using PLA?

I gave it all I got to change the settings in lampshade.py to work on my Mk6 ToM.

I changed all the start.gcode to basically do most of things my start.gcode does for PLA. Whenever I try to either upload it to my ToM or build to file in repG, it just acts crazy (like flashy repeating text) and never gets past .01% done. In the console window it just repeats rapidly running warm
up commands, running build, until I press stop.

thanks for uploading this, been hoping thta you would for a while now. very cool.