Generate wood patterns with temperature changes 3D model preview
View source Save
8,802 downloads 1,004 likes 78,763 views Free price

About this 3D model

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 This is the code of my post here: http://betterprinter.blogspot.fr/2012/10/shades-of-brown-with-wood-filament-via.html The owl is Cushwa's popular design at http://www.thingiverse.com/thing:18218 The picture which highlights the effect on a regular polygonal vas comes from mttwinmill (https://www.thingiverse.com/make:657526) --- This thing is not an object to print, but a set of instruction that will "patch" your gcode file in place (it will be modified), so keep a backup if you need one. 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=230 and grainSize=3. Higher temperatures produce darker bands (due to the wood being burnt). Do not let the wood stay too long in your nozzle else you might end up clogging it with carbon (which is quite hard to clean up)! Download the latest python script from https://github.com/MoonCactus/gcode_postprocessors/tree/master/wood This script was designed and works with "Python" (https://www.python.org/downloads/) How to run it on windows (thanks to Nic/@nd1985): - Install python from https://www.python.org/downloads/windows/ or check http://docs.python.org/2/faq/windows.html - Open the windows command prompt. - If you search for cmd, it will pop up. - Drag the python file into the command prompt - Type `-f` and drag in the gcode file you want to modify - Type `-i` and enter the minimum temp you want (e.g. `-i 180`, with a space between the option and the Celcius degree) - idem, use `-a maxtemp` if you want - also `-g grainsize` if you want. I used the default 3.0 - Hit enter. The script will process. When finished, the command prompt will reset to the state it was in when you first started. The original gcode you entered has now been modified. **Basic parameters** * `-f` aka `--file ` G-code file to process (with complete path if needed). This is the only required parameter. * `-i` aka `--min ` Minimum allowed temperature (too low and the filament will not extrude!). Default is 180 * `-a` aka `--max ` Maximum allowed temperature (too high and the filament will carbonize!). Default is 230 **Aesthetics** * `-g` aka `--grain ` Average "width" of the patterns (smaller means faster variations). Default is 3.0 * `-z` aka `--z-offset ` Shift the pattern vertically (e.g. if you want it to match some geometrical feature of your design). Default is 0.0 * `-r` aka `--random-seed ` Use a completely different pattern * `-s` aka `--spikiness-power ` How "spiky" are the dark bands (sets the imbalance of light/dark bands). With higher values (eg 2 or 3), the dark stripes will be made sparser. You can get the opposite effect with value between 0 and 1 (eg. 0.5 will generate fatter dark bands, convenient for filament that get lighter with temperature). Values below 0.2 or above 3.0 are probably useless. **Advanced options** These are mostly to play nice with a few printer firmwares. Use only when needed! * `-k` aka `--skip-start-z ` Do not change temperatures until provided height (e.g. when you are using a support/raft) * `-t` aka `--first-temp ` Which temperature to start with. Default is to set it. * `-u` aka `--max-upward ` Cap instant temperatures increases (in °C/layer), default is no cap! * `-d` aka `--max-downward ` Cap instant temperatures decreases (in °C/layer) * `-c` aka `--scan-for-z-hop ` Try to detect the "Z-hop" that some slicer do. Default is 5mm, use 0 to disable it. * `-w` aka `--temp-command ` set the temperature g-code command to use (defaut is M104, but you might want M109 that waits for the temperature to settle before moving on, some printers may need this) If you are using a command line interpreter and you have Python installed on your machine, you can run it like this, e.g. to generate temperatures that vary within 205 and 235°C use the following: ``` python wood.py --min 205 --max 235 --file myfile.gcode ``` When you want "faster" variations, just change the default 3mm `--grain` and use a smaller value, like ``` python wood.py --min 205 --max 235 --grain 1.5 --file myfile.gcode ``` If your printer stops with a "thermal runaway" error, you can tell the script to go slower and wait for temperatures to settle on each change, by using an alternate g-code command, e.g.: ``` python wood.py -w M109 --file myfile.gcode ``` (see https://www.simplify3d.com/support/articles/3d-printing-gcode-tutorial/#M104-M109 about the issue) ** About Cura and Cura plugins ** After multiple requests and at last, I converted the initial Cura p