Notifications
Clear all

G Code Editing  

  RSS
Kotaztrafee
(@kotaztrafee)
Eminent Member
G Code Editing

I did search the web to try and find the answer to this but no solid understanding.

I would like to remove a couple lines of g code to eliminate unnecessary moves. 
In my image you can see that there are two dots and a dash that are unnecessary and visibly distort the outer perimeter.
Is there a way to delete g code lines/commands such as this? I have seen reference to g code being a text file.
Can someone please give the the procedure for doing this?

Napsal : 31/07/2025 4:11 pm
Diem
 Diem
(@diem)
Illustrious Member

Save the gcode file - it must not be in binary mode; uncheck the option in Preferences. Open the gcode as text, edit to taste, and save.

Cheerio,

Napsal : 31/07/2025 4:36 pm
1 lidem se líbí
gb160
(@gb160)
Reputable Member
RE:

You need to disable binary gcode in the Prusaslicer (Printers->General) , then export the file from prusaslicer (make sure it has .gcode extension)
Then you can edit the gcode file in any text editor.

You'll probably end up with gaps in the print if you take this approach. You'd be better off finding out why those small extrusions are being generated in the first place, then see if there's a way to avoid it. 

Napsal : 31/07/2025 4:36 pm
2 lidem se líbí
Kotaztrafee
(@kotaztrafee)
Eminent Member
Topic starter answered:
RE: G Code Editing

I think your advice is solid.  I could go into blender and make a change I think would work but that entails redoing all my fuzzy skin and seams and perhaps lots of trial and error. Also I had other areas that have useless actions that I would like to eliminate.
I was hoping all I had to do was delete certain lines of code and move on.

Napsal : 31/07/2025 9:43 pm
Raaz
 Raaz
(@raaz-2)
Reputable Member
RE:

You could try to switch between Classic and Arachne Perimeter generation.

You can also look up  the Arachne settings and some other perimeter generating settings to clean up such spots.

Sadly, I don't have much experience with it, so can't really guide you into the right direction, but it should be possible without changing the object.

Napsal : 31/07/2025 9:50 pm
1 lidem se líbí
Kotaztrafee
(@kotaztrafee)
Eminent Member
Topic starter answered:
RE: G Code Editing

You could try to switch between Classic and Arachne Perimeter generation.

Tried it. Classic made no difference. I was hoping your suggestion was going to be the easy way out. No such luck.

Napsal : 31/07/2025 11:44 pm
Share: