Generate wood patterns with temperature changes
Description
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 <Pathtofile.Gcode>` G-Code File To Process (With Complete Path If Needed). This Is The Only Required Parameter. * `-I` Aka `--Min <Celciusdegrees>` Minimum Allowed Temperature (Too Low And The Filament Will Not Extrude!). Default Is 180 * `-A` Aka `--Max <Celciusdegrees>` Maximum Allowed Temperature (Too High And The Filament Will Carbonize!). Default Is 230 **Aesthetics** * `-G` Aka `--Grain <Millimeters>` Average "Width" Of The Patterns (Smaller Means Faster Variations). Default Is 3.0 * `-Z` Aka `--Z-Offset <Millimeters>` 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 <Integer>` Use A Completely Different Pattern * `-S` Aka `--Spikiness-Power <Float>` 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 <Millimeters>` Do Not Change Temperatures Until Provided Height (E.G. When You Are Using A Support/Raft) * `-T` Aka `--First-Temp <Celciusdegrees>` Which Temperature To Start With. Default Is To Set It. * `-U` Aka `--Max-Upward <Celciusdegrees>` Cap Instant Temperatures Increases (In °C/Layer), Default Is No Cap! * `-D` Aka `--Max-Downward <Celciusdegrees>` Cap Instant Temperatures Decreases (In °C/Layer) * `-C` Aka `--Scan-For-Z-Hop <Millimeters>` Try To Detect The "Z-Hop" That Some Slicer Do. Default Is 5Mm, Use 0 To Disable It. * `-W` Aka `--Temp-Command <String>` 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 Plugin 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 This Script Was An Early But Official Plugin In Cura (Version 12.11+). But Ultimaker Broke Its Own Support To The Plugins With Almost Each New Release (Why?). I Hope Forthcoming Cura 4 Will Eventually Settle To Something That Would Not Require Me To Fix The Script With Each New Release. Sorry, But There Will Be No More Support For Cura Until They Make Their Mind! ** Last Updates ** - 20190307-113457 Clearer Documentation - 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 I Added 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)
Statistics
Likes
753
Downloads
0