Generate wood patterns with temperature changes
by MoonCactus, published
Liked ByView All
Give a Shout Out
If you print this Thing and display it in public proudly give attribution by printing and displaying this tag.Print Thing Tag
Script to generate texture via temperature gradients to get horizontal stripes that "look like wood". The last and only updated source code is now on github at https://github.com/MoonCactus/gcode_postprocessors/tree/master/wood
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.
Download the python script from https://github.com/MoonCactus/gcode_postprocessors/tree/master/wood
This script was designed and works with Python 2.X, it may have some issues with Unicode and Python 3.
Installation: move the .py file to the plugin folder in Cura (like /usr/share/cura/plugins or ~/.cura/plugins/). The Ultimaker website does not tell which one really, but look with your file manager for a folder named "plugins", or better, for a plugin which is shipped by default (e.g. TweakAtZ.py). Then simply copy/paste this file alongside, and restart Cura.
This is the code of my post here: http://betterprinter.blogspot.fr/2012/10/shades-of-brown-with-wood-filament-via.html
Wed Mar 29 18:53:31 CEST 2017
Moved to github! This is the terminal update that will appear here!
Wed Sep 28 12:41:55 CEST 2016
Instructions cleanup and cosmetic fix to the python script
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
- there is a limited web service hosted on https://www.tecrd.com/tools/stl_wood (but it may refuse your file because it is too big, or because the server is busy doing something else)
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+). But the support for Cura at Ultimaker is gone for years now (why?).
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 2.7 on your computer. Then run the wood.py script as follows:
python wood.py --min minTemp --max maxTemp --grain grainSize --file gcodeFile
or in brief mode:
python wood.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(float:180) Minimum print temperature (degree C)
- maxTemp(float:230) Maximum print temperature (degree C)
- grainSize(float:3.0) Average "wood grain" size (mm)
- firstTemp(float:0) Starting temperature (degree C, zero to disable)
- spikinessPower(float:1.0) Relative thickness of light bands (power, >1 to make dark bands sparser)
- maxUpward(float:0) Instant temperature increase limit, as required by some firmwares (C). In some case they would seemingly stop the printer because of the thermal inertia of the head (no harm really, it only uselessly triggers a safety in the firmware). You may get fuzzier transitions from light to dark when you use this option.
- zOffset(float:0) Vertical shift of the variations, as shown at the end of the gcode file (mm)
The gcodeFile is the only compulsory parameter. Check the source code for more information.
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
Upgrade this Thing with Thingiverse Apps
Generate wood patterns with temperature changes by MoonCactus is licensed under the Creative Commons - Attribution - Share Alike license.
What does this mean?
- You must attribute (give credit) to the creator of this Thing.
- You must distribute Remixes under the same license as the original.
- Remixing or Changing this Thing is allowed.
- Commercial use is allowed.
Show Some Love
Say thanks by giving MoonCactus a tip and help them continue to share amazing Things with the Thingiverse community.Tip Designer
We're sure MoonCactus would love to see what you've printed. Please document your print and share a Make with the community.
To post a Make simply visit this Thing again and click I Made One to start uploading your photo. It’s even easier to post a Make via the Thingiverse Mobile app (available via Google Play and Apple App Store).