4 hours ago, LauraBrown said:
This should be a "Plan D" for if you can't get retraction working well enough no matter how much you play around with it.
Remember folks, small scale testing is your friend.
Disclaimer: If this goes wrong, I'm not responsible for anything that happens. If you're not sure about the gcode file you produced, post it here before you print it.
Also, make sure your parts are far enough apart that the print head won't collide with the existing part.
You want a narrow model to print like this? Sorry, no can do.
So here's a very simplified version of that sort of model:
But if I look in the preview mode and turn on lines for travels, we see it goes back and forth between the two raised bits each layer:
This can leave stringing, which we're trying to avoid. And as I said, play around with your retraction settings before you resort to this. Especially with PLA, you should be able to pretty much eliminate stringing.
Step 1: Produce a version of the model with only one "fin":
How you do this obviously depends on how you created the model. I whipped up this quick example in OpenSCAD in about 30 seconds, so to get rid of one of them I just had to comment out two lines. I can't tell you how to do it for your model because it depends on the program you used.
Step 2: Slice it and save the gcode:
There really isn't a picture for this one. If you don't know how to save a gcode file to your hard drive, you're not ready for this. Give it a name which tells you which side it is (in my case it's combine_gcode_left_wing.gcode)
Step 3: Select your model and mirror it:
Make sure you're in Prepare mode for this one. Select your model by clicking on it then click the Mirror tool on the toolbar on the left and click one of the arrows for the axis you want to mirror it on (in my case the X axis, so the red arrows):
Step 4: Slice it and save the gcode:
In this case I saved it as combine_gcode_right_wing.gcode.
Step 5: Figure out what layer your base ends on:
Go to Preview mode and move the slider down so you can see what the last layer of the base is, before only the fin goes up:
In my case it's pretty easy: 5mm base height / 0.2mm layer height = 25 layers.
Step 6: Open your gcode files in a decent text editor:
I like Notepad++ personally.
Step 7: In the file for the right half, scroll down (or search for) the line that says ";LAYER:25" (or whatever layer you figured out it was in step 5):
The gcode files actually start the layer number at 0, so this is the 26th layer, or the first layer of the right section. Exactly where we want to be.
Step 8: Find the last ";MESH:NOMESH" line before that layer starts:
This is where it actually moves to the start of the next layer so we need those movement commands.
Step 9: Select all the gcode for that part of the model:
You want to select up to the last line that starts with ";TIME ELAPSED".
Step 9: Copy the code:
Ctrl+C. Or , whatever floats your boat.
Step 10: In the gcode file for your left half, scroll down to the bottom and find last that ";TIME ELAPSED" line, and press enter to create a new line:
Step 11: Paste the code:
Ctrl+V. Or . You get the idea.
Step 12: Go back to the gcode file for your right half, and find the last E value before the code you copied:
Step 13: Go back to the gcode file for your left half and insert a gcode line to set the current extruder value to that, before the code you pasted in:
The line you want is
G92 E<last E value>
so in my case
G92 E2619.69032
Step 14: Split up the next move command with a Z so the Z comes second:
The first lines after that ";MESH:NOMESH" are movement commands that will move the print head to the start of that section, but more importantly, down. If the print head is in the wrong position to start with it'll collide with the first part on the way down. So take the F and Z values out of the first line that contains a Z value (if it doesn't have an F, don't worry) and put it on a new G0 line below.
That makes the print head move to where it'll print the second section then go down.
Step 15: "Save as" to a new gcode file:
Again, no screenshot. But you want to leave the originals there in case you need to try again. I named it combine_gcode_both_wings.gcode. But you name it whatever you want.
Step 16: Open your modified gcode file in Cura and make sure it looks right:
The travel lines are still on. But you'd hardly know it!
If you click the play button to watch the simulation, it probably won't show it doing one then the other, because we never changed the layer numbers in the gcode file and that's what Cura uses for its simulation view. But the printer doesn't (or shouldn't) care about those since any line that starts with ";" is a comment and the printer should ignore it.
Step 17: Copy your modified gcode file to SD card/whatever and print... AND WATCH IT LIKE A HAWK
Seriously. Especially if you're new at this sort of thing. If your printer looks like it's about to do something bad, head straight for that "cancel" button. Or the power switch.
Recommended Posts
Slashee_the_Cow 479
Possible? Yes. Fiddly? Also yes. Hard? Depends on how much you've fiddled with gcode in the past.
But: you're probably a lot better off tuning your retraction settings to prevent the strings in the first place. Based on the picture, it looks like you're using PLA? Any half decent printer should be able to print PLA without much stringing if you get the retraction settings right.
To try and dial the settings in correctly, you can use a plugin like AutoTowers Generator (just click Marketplace at the top right and search for it):
That will let you print calibration towers where it changes a setting at every level so you can see what gets the best result, in this case you're mainly looking at retraction distance and retraction speed but you could also potentially make improvements at a different print temperature, for example. If you have a printer with a direct drive extruder (filament goes straight into the print head rather than into an external extruder which feeds the filament through a tube to the print head) you'll probably need to download OpenSCAD like the plugin instructs because it doesn't have a built in preset for the shorter retraction distances a direct drive extruder requires.
If you really need to mess with the gcode because you can't get your retraction under control:
(and I really mean that you should try and get your retraction under control first)
The "easiest" way (at least would be to make a version of your model without one of the fins (just the part which sticks out above the base, you'd need the whole base), slice it, mirror the model (so the fin is on the other side), slice it again and save it as a different file, then take the gcode from all layers above the base (i.e. just the fin which is missing in the first file) and append it to the first file, just before the finishing gcode. And then before the bit you just moved over, you'll at least need to add a line to set the current extruder position to the first value before the code you copied over from the second file.
Remember how I said how hard it is depends on how much you've fiddled with gcode? Not too hard for someone like me. If you've never fiddled with gcode, then my advice would be "let the experts look at your gcode before you try to print it".
As someone with too much free time, if you want to slice the two versions separately like I described earlier and post the gcode for both of them, I can put them together for you.
Link to post
Share on other sites
LauraBrown 0
Confused.
Please explain process of combining two sliced versions of a model into a single g code file as mentioned in the post
Link to post
Share on other sites