Page 1 of 1

Layer Change Script for Raft

Posted: Sat Nov 07, 2015 8:40 pm
by nka
Hello,

I'm currently adding this before my layer 7 (layer 6 is the last layer of my Raft).

Code: Select all

; nka adding
G1 E-5.0000 F1800
G1 Z10 F1800
M109 S110 T0
M109 S210 T0
; copy last line above
G1 E-2.0000 F1800
G1 Z2.997 F7200
I'm wondering if there's any way to do it directly with the "layer change script" ?

The goal of that, is to raise the nozzle, retract a lot and make the printer "wait" a little (using the trick of cooling and heating the nozzle) to let the raft cooling so the print don't stick too much on it.

Re: Layer Change Script for Raft

Posted: Sun Nov 08, 2015 11:03 am
by JoeJ
Just add the following command into your post processing commands section (on the Scripts tab)

{REPLACE "; layer 7\n" "; layer 7\nCommand 1\nCommand 2\nCommand 3\n"}

Where command 1, command 2, and command 3 are just whatever commands you want to insert. So it may look like:

{REPLACE "; layer 7\n" "; layer 7\nG1 E-5.0000 F1800\nG1 Z10 F1800\nM109 S110 T0\n"}

And so on

Re: Layer Change Script for Raft

Posted: Sun Nov 08, 2015 12:38 pm
by nka
Oh, so I must use post processing... thanks!

Re: Layer Change Script for Raft

Posted: Fri Nov 20, 2015 1:07 am
by Nightram
can this be used to change the speed of a certain layer?

Re: Layer Change Script for Raft

Posted: Fri Nov 20, 2015 9:03 am
by nka
I guess you could, but it will be a lot of job, as you will have to modify EACH commands under the layer you wish... better go edit the .gcode directly, changing the Fxxx for that layer.

Re: Layer Change Script for Raft

Posted: Wed Dec 23, 2015 7:43 pm
by nka
So, I finally did it... working, but with some bugs.

This is the line I need to add.

Code: Select all

{REPLACE "; layer 7, Z = 2.4973" "\n; nka adding\nG1 E-5.0000 F1800\nG1 Z10 F1800\nM109 S110 T0\nM109 S210 T0\nG1 E-2.0000 F1800\nG1 Z2.997 F9000\n\n; layer 7, Z = 2.4973"}
But there's two problems.

1) Simplify3D add a "post-processing" line in the header (sumarry setting), that contain those line return. There for, they are considered as commands.

2) When reloading Simply3D, he's getting ride of the ',' in the line, so it's not matching anymore.

:(

Re: Layer Change Script for Raft

Posted: Thu Dec 24, 2015 4:15 am
by Tesse
Hi,

I got the same problem. See viewtopic.php?f=8&t=1959&p=17737#p17737


Tesse

Re: Layer Change Script for Raft

Posted: Fri Dec 25, 2015 6:20 am
by CompoundCarl
nka wrote:But there's two problems.

1) Simplify3D add a "post-processing" line in the header (sumarry setting), that contain those line return. There for, they are considered as commands.

2) When reloading Simply3D, he's getting ride of the ',' in the line, so it's not matching anymore.
If you want to get rid of that one line in the header, just put the following at the beginning of your post-processing commands (before the replacement commands)
{STRIP "; postProcessing"}

Then to fix your replacement stuff, try the line below. It works fine for me!
{REPLACE "Z = 2.4973\n" "Z = 2.4973\n; nka adding\nG1 E-5.0000 F1800\nG1 Z10 F1800\nM109 S110 T0\nM109 S210 T0\nG1 E-2.0000 F1800\nG1 Z2.997 F9000\n"}

Re: Layer Change Script for Raft

Posted: Fri Dec 25, 2015 8:49 am
by nka
Oh good idea, thanks!