Welcome! Log In Create A New Profile

Advanced

Post processing scripts for Slic3r 0.7.0 and up

Posted by DeuxVis 
Post processing scripts for Slic3r 0.7.0 and up
March 02, 2012 05:35AM
How about a post to gather those scripts ? I'll start with mine.


[Slic3r version] 0.7.0

[Tested on] Linux 64 and 32 bits. Windows would probably needs a way to run perl scripts.

[Purpose] Allow a Techzone Huxley to use the output of Slic3r. To do so the scripts needs to :
  • Remove M109 gcodes : seems to pause for ever on Monotronics with TZ modified FiveD firmware, even if temperature is already reached.
  • Use a different speed for Z movements (my Huxley is very limited in Z speed). You can change variables to set your own Z speed at start and end of move.
  • Change gcodes that would run accelerated moves so that the movements use a constant speed (because movements starting slowly leads to more plastic ooze on that Huxley).
  • Remove anything that doesn't look like a proper GCode (lines not starting with a ';' or a 'G' or a 'M') to workaround the "_BRIDGE_FAN_END" bug of Slic3r 0.7.0.

[Usage] Drop the perl file in a folder that is registered in your PATH environment variable, then add its name to the post processing scripts section of the Start/End GCODE tab in slic3r.


My perl is a bit rusty and my knowledge of Slic3r is recent, so feel free to use, comment, suggest, improve and correct - as long you give back winking smiley


Most of my technical comments should be correct, but is THIS one ?
Anyway, as a rule of thumb, always double check what people write.
Attachments:
open | download - TZ_Huxley.pl (2.6 KB)
Re: Post processing scripts for Slic3r 0.7.0 and up
March 29, 2012 10:01AM
Somebody requested help about using the script.
Here's my attempt at a step by step howto for linux (ubuntu, but should be pretty generic) :

1) put the script in a directory which is in your path (i used my personal bin folder, see bold entry) :

[email protected]:~$ echo $PATH
/home/username/devkitpro/devkitARM/bin:/home/username/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games


2) make it executable :

[email protected]:~$ chmod u+x /home/username/bin/slic3r_postprocess.pl


3) edit it to suit your needs :

Use your favorite text editor. You can change those variables around top of the file :
- $Z_start_speed is the speed at which Z movements will start.
- $Z_full_speed is the target speed reached at the end of Z movements.

anything else should only be modified by people who know what they are doing.


4) tell Slic3r to use that script :




5) slice a stl, you should see this message on the progress bar at the end of the process :




6) verify the script has been applied by inspecting the resulting gcode. looks at the bold part here, it shows the Z movement separated from other axis movements :

; generated by Slic3r 0.7.0 on 2012-03-29 at 15:44:51

; layer_height = 0.4

[..snip..]

M104 S200 ; set temperature
G28 ; home all axes
;M109 S200 ; wait for temperature to be reached
G90 ; use absolute coordinates
G21 ; set units to millimeters
G92 E0 ; reset extrusion distance
M82 ; use absolute distances for extrusion
G1 F80.0
G1 Z0.400 F110.0
G1 F7800.000
G1 X78.270 Y79.340
G1 F1800.000
G1 E1.00000
G1 F540.000
G1 X79.600 Y78.020 E1.05510
G1 X81.040 Y76.760 E1.11137
G1 X83.750 Y74.790 E1.20988



Note I have fixed a bad copy/paste operation, the corrected script is attached.


Most of my technical comments should be correct, but is THIS one ?
Anyway, as a rule of thumb, always double check what people write.

Attachments:
open | download - Slic3r_1.jpg (45.1 KB)
open | download - Slic3r_2.jpg (40.2 KB)
open | download - slic3r_postprocess.pl (2.5 KB)
Re: Post processing scripts for Slic3r 0.7.0 and up
May 28, 2012 03:40AM
Hi DeuxVis, thanks for the tip and instructions. I followed your instructions and used your post-processing file. Now, I'm using slic3r to generate gcode for my TechZone Huxley. I'm not good at coding, so I don't have any code to contribute. But, I at least wanted to say thank you for sharing.

Now, I can start fine tuning my settings in slic3r.

Edited 4 time(s). Last edit at 05/29/2012 08:39PM by MikeMike.
Re: Post processing scripts for Slic3r 0.7.0 and up
May 30, 2012 06:28AM
Glad I could help.

On a side note if you ever want to plug a fan in your monotronics, there is a slight modification to apply to techzone firmware so it starts working, remind me to publish that someday if you need it.


Most of my technical comments should be correct, but is THIS one ?
Anyway, as a rule of thumb, always double check what people write.
Re: Post processing scripts for Slic3r 0.7.0 and up
June 20, 2012 04:51PM
I created a script to extrude a brim around the edge of the print bed before starting the actual print (helps with priming the extruder).

[Slic3r version] 0.8.3 and up

[Tested on] Linux 64 and 32 bits. Other platforms are on my todo-list.

[Purpose] Print a brim close to the edge of the print bed at the start of the print, to give the extruder a chance to get started properly before getting to the actual print.

[Usage] See the instructions at the Slic3r-brim github page.

Comments are very welcome!


--------
Visit my blog: [blog.agten.net]
Sorry, only registered users may post in this forum.

Click here to login