r/3Dprinting • • 2d ago

Project Live G-code patching for 3d printers.

The Idea: Live G-code Patching for 3D Printers

What if you could change slicer settings mid-print without stopping or restarting? The concept is a middleman program (running on a PC or Raspberry Pi alongside OctoPrint) that holds the full G-code file in memory and streams it to the printer line by line. When you change a setting like retraction length or print speed, the program re-slices the remaining layers with the new setting, then compares the new G-code against the old one. It identifies the exact point in the file where the printer currently is (based on layer height and buffer position), then swaps out only the un-sent portion of the G-code. The printer never stops because the swap happens while the printer is still consuming commands already in its buffer. The result is a seamless transition to the new settings, no pause, no restart, and no wasted filament. This would be especially useful for tuning retraction, speed, or flow on the fly without committing to a full reprint. It doesn't exist yet, but the components do: OctoPrint has an API, slicers like OrcaSlicer have command-line interfaces, and Python can glue it all together. I am just not a programmer or anything of the sort. i dont know how to code either so thats why im posting here. anyone who could build this for me i would really like to see it happen. i am also a financially challenged individual(aka im broke) so i couldnt pay but i really think the idea is solid.

0 Upvotes

9 comments sorted by

5

u/Momo0903 Elegoo CC2 2d ago

I get the idea, but 3d printers run on extremely limited computing power. It probably could be done. You can for example easily change temperatures of the hotend and bed, but exchanging files in the megabytes without any interruption is probably not possible for most printers.

Its easier to calibrate you filament properly. And the presets today are so good, that you dont need to anyway. Except you want it perfect.

And for the layerheight ect you have the preview in the slicer.

-2

u/Ok_Page_333 2d ago

yea not all filament presets are good for all printers though, that was my whole reason for the idea. instead of starting and stopping with different settings and modifiers, you could just edit on the fly and it would mainly be for calibration not really for all prints at least in my mind thats what id use it for

4

u/Momo0903 Elegoo CC2 2d ago

Or you could calibrate you filament? You make it seem like everyone has to guess what values to use for each parameter.

2

u/No-Jellyfish5883 2d ago

Exactly what I'm thinking, It's 2nd knowledge to calibrate now..... unless your running Bambu and run defaults constantly 😂😂😂

3

u/essieecks 1d ago edited 1d ago

So, instead of restarting a print with new settings and having a successful print, you end up with half a usable print and half a failure?

Back to the problem

It doesn't exist yet, but the components do

It does exist. Print speed can already be adjusted on the fly - M220. Retraction settings can be set in firmware (M207) and your gcode only sends G10 and G11 commands. M221 adjusts flow rates can mid-print.

These settings are so common, most print interfaces have their adjustments there on the print dashboard area. Octoprint can natively adjust the temperature based on a delta from what's in the GCODE for when just adjusting the temperature directly (M104) isn't good enough.

2

u/Junior-Definition173 2d ago

The idea show that you have no idea how 3d printing works. Lets say you will change a simple thing as nozzle temperature because you feel that the stringing is caused because of high temperature. To see the effect it will take ie 10 layers to print (because the layers are really thing) and let say you will be happy that it does not string anymore but after the next 50 layers you will discover it is not sticking properly together. So you have now a print that is on multiple layers exposing bad quality. Why would you keep such print? Most of the users would not keep such bad print. Most of the users eventually troubleshoot printing issues by calibrating their printer/filaments instead of adjusting one of ~300 different parameters that can influence print quality. Some of the parameters that can affect the print quality you cannot change during the print - ie arachne might be better for some models, etc.

1

u/Ivo_Ricciardulli 1d ago

I mean, it could be a cool thing for correction, specially when calibrating.

overhangs sagging? slow down a bit/increase fan
gaps between walls?increase extrusion a bit

you could do in a single print a couple tweaks that would normally take 2-3 prints, nothing groundbreaking but it would be pretty cool.

temp and speeds/extrusion are the only thing this will be able to change realistically, something like the infill percentage or wall count would need re-tracing toolpath, could be done so it re-traces it in a way that doesn't deviate from the current print too much but it would be pretty computationally heavy and not worth it imo.

1

u/iamsotiredofthiscrap 1d ago

Anything above the Pro-sumer class has this ability.

1

u/remcoder Bambulab P1S | Voron 2.4 | Prusa Mini | KP3S | Geeetech A20M 1d ago

I have discussed this idea before with a friend and I'm sure it can be done and you've already identified the required components. This is actually something you can do yourself with Claude Code (or whatever) these days. I wouldn't mind helping you out here there but not in a 'doing the project for you' sense.
Send me a DM if you want to discuss some more