Combining gcode files

590 views
Skip to first unread message

Paul Neil

unread,
May 14, 2013, 4:09:42 PM5/14/13
to make...@googlegroups.com
Hi

I have a part that I would like to print on my Rep2 , my Rep2 is running the latest sailfish firmware and I'm using ReplicatorG for slicing.
It's 6mm high and I would like to print the first 4mm with a 10% infill and the top 2mm with a 100% infill.
I have tried using gblend https://github.com/wd5gnr/gblend but haven't been able to get a working print.
I have tried manaully replacing the lines of gcode from a file generated at 10% with one generated at 100% but when the print just pauses when it gets to the layer where I have spliced the file.

Has anyone been able to get this to work? I have around 100 prints that I need to do with this method so really looking for some ideas.

Cheers

Paul

Damian Gto

unread,
May 16, 2013, 6:48:27 AM5/16/13
to make...@googlegroups.com
You are thinking the wrong way.
What you want to do is have the top layers solid.
Im not sure how to do this in skenforge, but with Slic3r its easy. You just add how many solid layers you want on the top and bottom.

Jetguy

unread,
May 16, 2013, 7:27:14 AM5/16/13
to MakerBot Operators
Let me be more specific that Damian.
The reason it is failing is that the E distance for the extruder in
all those gcode moves is cumulative. Think of it like an odometer.
So, you are correct in the that standard X, Y ,Z codes copy/paste
works.
However, the lowers infill would obivously be less total E distance at
the end of the 10% section.
When it hits the first line of the 100% section, the E numbers are
much longer because you had cut out the short section of 100% fill.
The extruder attemmpts to catch up on the very first segement and go
whatever it was at for the correct last layer of 10% and now attempt
to jam the equivalent 100 percent fill into the very first move line
of the 100% obviously failing.
The math is, you need to take whatever the E number is for the last
line of 10% code, and what would be the exact same move of 100% code,
and subtract the difference now for every single line upwards of the
100% code.
Again it has to be the difference of the last 2 same exact lines to do
this right, and then take that difference and subtract it from every
single E value in the 100% code.

At least that is my understanding because we use code that just keeps
counting up.


On May 16, 6:48 am, Damian Gto <damian...@gmail.com> wrote:
> You are thinking the wrong way.
> What you want to do is have the top layers solid.
> Im not sure how to do this in skenforge, but with Slic3r its easy. You just
> add how many solid layers you want on the top and bottom.
>
>
>
> On Tuesday, May 14, 2013 10:09:42 PM UTC+2, Paul Neil wrote:
>
> > Hi
>
> > I have a part that I would like to print on my Rep2 , my Rep2 is running
> > the latest sailfish firmware and I'm using ReplicatorG for slicing.
> > It's 6mm high and I would like to print the first 4mm with a 10% infill
> > and the top 2mm with a 100% infill.
> > I have tried using gblendhttps://github.com/wd5gnr/gblendbut haven't

Eighty

unread,
May 16, 2013, 9:32:58 AM5/16/13
to make...@googlegroups.com
Theoretically, it should be possible to simply insert the following command at the "splice" point of your gcode.
G92 Exx 
Where xx is the first E value in your second set of gcode.  This simply resets the E odometer, so that the later values are correct.
 
I could be wrong about this, as I've never tried it.

Paul Neil

unread,
May 16, 2013, 4:15:24 PM5/16/13
to make...@googlegroups.com
Hi Jetguy

Thanks for the really full explanation, I'll try doing that manually to test then try and write a simple application that will do it automatically.
I'll post when when I have some results

Thanks

Paul

James McCracken

unread,
May 16, 2013, 7:00:16 PM5/16/13
to make...@googlegroups.com

G92 Exxx

This works at the start of a print I can confirm.  I print a thin wall at the edge of my platform as part of my start.gcode to prime the extruder...

--
You received this message because you are subscribed to the Google Groups "MakerBot Operators" group.
To unsubscribe from this group and stop receiving emails from it, send an email to makerbot+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

James McCracken

unread,
May 16, 2013, 7:01:34 PM5/16/13
to make...@googlegroups.com

Btw thanks to this, endstops, and sailfish, now have 100% success rate starting prints in my frankencake.

Paul Neil

unread,
May 20, 2013, 5:24:27 AM5/20/13
to make...@googlegroups.com
Hi

Thanks for this I have tested this on the problem I had and this works.

Cheers

Paul

Eighty

unread,
May 20, 2013, 10:10:22 AM5/20/13
to make...@googlegroups.com
So to be clear, using the "G92 Exx" command is what worked?

Paul Neil

unread,
May 21, 2013, 3:48:56 PM5/21/13
to make...@googlegroups.com
Hi

Yes I sliced the 3d model at 20% and the at 100% and cut out and replaced the lines up to the layer I wanted the change in infill.
I then added the "G92 Exx" command in between the <layer> commands and replaced the "xx" with the first "E" value of the next layer.
The part printed correctly and when it gets the layer where the infill changes the % complete value changes.

I'm going have a look at creating an application to automatically splice the files and add the correct command.
I'm also looking at using Jetty's method but that means replacing all the "E" values after the splice point.

Cheers

Paul
Reply all
Reply to author
Forward
0 new messages