Generate wood patterns with temperature changes
by MoonCactus, published
Script to generate texture via temperature gradients to get horizontal stripes that "look like wood".
Update: this script is also available as a simpler webservice here: http://www.tecrd.com/page/liens/stl_wood&lang=fr (it will refuse and fail too big input files though as long as I have to pay for my CPU, sorry).
The owl is Cushwa's popular design at http://www.thingiverse.com/thing:18218
It was printed here with LAYWOO-D3 wood filament http://www.thingiverse.com/thing:30552
It works also somehow with some other filament (just tweak the temperature), with a less drastic effect.
This is a piece of source code of mine, originally made for Skeinforge within Cura 12.08, now part of the official releases, and is now also an independent standalone Python script.
This is the code of my post here: http://betterprinter.blogspot.fr/2012/10/shades-of-brown-with-wood-filament-via.html
Fri Jan 10 14:32:52 CET 2014
wood31 Fixed obsolete syntax that made Python3 fail (thanks @Mysli)
wood32 is for Python3, should work also on Python2 but untested by me!
Thu Jan 9 23:10:51 CET 2014
Added some more options, and a Windows-friendly zipped version with windows line ends and zipped so that it does not get corrupted when downloaded or opened (this OS sucks so much that you have to pay for it, and you get a notepad as useful as an ashtray on a motorbike, so ridiculous!)
Sun Jul 7 21:43:12 UTC 2013
- web service hosted on http://www.tecrd.com/page/liens/stl_wood&lang=fr
Tue Feb 12 08:35:53 UTC 2013
- more readable ASCII art plot
- can be re-run on itself, it will no more duplicate the commands and graph
- fixed a bug in the numeric arguments (thanks to Fused3D)
This script was an official plugin in Cura (version 12.11+). Check it here: http://wiki.ultimaker.com/CuraPlugin:_Wood Thanks to Daid for porting my old Skeinforge/Cura version to the new and much cleaner plugin system. The tgz archive could be useful only to Skeinforge users or old-timers of Cura. Better ignore it ;)
After multiple requests and at last, I finally converted it to a standalone Python script that no more needs Cura nor Skeinforge. I documented the process here by the way: http://betterprinter.blogspot.fr/2013/02/how-tun-run-python-cura-plugin-without.html
You'll need Python on your computer. Then run the wood_standalone.py script as follows:
python wood_standalone.py --min minTemp --max maxTemp --grain grainSize --file gcodeFile
or in brief mode:
python wood_standalone.py -i minTemp -a maxTemp -g grainSize -f gcodeFile
This will "patch" your gcode file in place (it will be modified), so keep a backup if you need one.
- minTemp is the minimum temperature to use (the code ensures that it is reached)
- maxTemp is the maximum temperature to use (the code ensures that it is reached)
- grainSize lets you tweak the "average thickness" of the layers
The gcodeFile is the only compulsory parameter.
Initial temperature settings will be overridden by the varying pattern that is generated by this script (a variant of recursive Perlin noise). You can run it multiple times to test different values and generated temperature curve until you like it.
Default values are minTemp=190, maxTemp=240 and grainSize=3. Higher themperature give darker bands (due to the wood being burnt). Do not let the wood stay too long in your nozzle else you will most probably clog it with carbon!
Finally, to run it on windows you may want to check the FAQ here: http://docs.python.org/2/faq/windows.html