Notifications
Clear all

Need help modifying gcode  

  RSS
charlie.g
(@charlie-g)
Eminent Member
Need help modifying gcode

I have purchased a g code file that has been designed to run on generic printers. However i have been trying to run it on my mk4 and due to it not having meshbed level and the other parts of the initial process i am getting poor results in the first layer. 

I have been playing around with the gcode to try and figure what and where it is i need to add to the start of the file so that it does what it needs to before continuing with the file as intended. i think im close as i got it to do most of it but when it started trying to print the extrusion rates were all messed up.

At the moment the bellow photo is how the original file starts  ( sorry i cant seam to figure how to post the gcode without it turning into one line)

If anyone can help it would be much appreciated and i can share the file directly with you if needs along with what i have tried. 

many thanks

Opublikowany : 03/11/2024 10:18 pm
Diem
 Diem
(@diem)
Illustrious Member

Forget it, the g-code file is almost useless; OK, it's technically possible to fix it (perhaps by pasting in some of the start of a working file) but in practice the quickest way will be to redesign the part from scratch then export an .stl and slice a new g-code.

So go back to the vendor and insist on either a .step file or an .stl - then import it into PrusaSlicer and prepare your own g-code.

After that, learn how to design your own parts; perhaps 75% of practical, working parts are simple enough for a beginner to design in the first few months.

Cheero,

Opublikowany : 04/11/2024 3:57 am
charlie.g
(@charlie-g)
Eminent Member
Topic starter answered:
RE: Need help modifying gcode

don’t worry CAD and CNC and designing things is nothing new to me I have been doing it for 15+ years but sadly this is an incredibly complex thing to design that has had years of development and involves a lot of fluid dynamics and not something that can not be easily copied or else I defiantly would have. It’s the first file I have ever purchased in 10years of printing and frustratingly the designer will only give this gcode file to work with so don’t have a huge number of options. 

the file itself is good once if it can get past the first layer but that is giving mixed results as it is not consistent across the build plate hense needing to modify the start of the file. 

Opublikowany : 04/11/2024 7:22 am
charlie.g
(@charlie-g)
Eminent Member
Topic starter answered:
RE:

I have just learnt about getting taking the starting gcode file from prusa slicer (not from a old file) however i'm not to sure how to integrate it with the original file and if there are parts of the original file i need to remove? 

 

Opublikowany : 04/11/2024 11:03 am
Diem
 Diem
(@diem)
Illustrious Member

How critical is the first layer of your file?   The suggestion below will still have a less than perfect first layer but it should be consistent and has a good chance of being useable.

Presuming the file *is* fundamentally compatible, g-code comes in a lot of different flavours, I would begin by designing a simple shape with a similar footprint and enabling a raft - this raises the print by a definable number of layers and, crucially, handles the mesh-bed levelling, homing and general setting up.

Then search the file for the ...

;LAYER_CHANGE;

... marker comments and make your cut and paste join at the start of the true printing layer.

Because you have raised the print you will have to edit all of the 'G1 Z ...  '  commands to add the extra height; I would write a short perl script to do the job but use whatever you are familiar with.

You may still have to modify/copy any non-standard startup settings but it should get off to a decent start.

Hmmmm ... another, slightly off the wall option, if you can get access to one, try running this on a Mk2 with its simpler startup or even put your Mk4 in Mk3 compatibility mode...

Cheerio,

Opublikowany : 04/11/2024 4:28 pm
Volker
(@volker)
Estimable Member
RE: Need help modifying gcode

you can also try a gcode - stl converter:
Convert GCODE to STL 3D Model Files With Our Free Converter (fabconvert.com)

Opublikowany : 04/11/2024 4:39 pm
Share: