Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
Onboard Cura slicer problem with cura ini import #1708
What were you doing?
slicing an stl using the onboard cura engine.
What did you expect to happen?
cura engine was supposed to use my start.gcode and end.gcode to compensate for my printer type as described in the cura ini file. I have included several files that show the problem and may be used to reproduce this.
What happened instead?
it did not include those gcodes and made a starup of its own from somewhere
Branch & Commit or Version of OctoPrint
Version: 1.3.0 (master branch)
Printer model & used firmware incl. version
Qidi Tech 1, sailfish 7.8 (new printer)
Browser and Version of Browser, Operating System running Browser
Firefox latest, Win10
Link to octoprint.log
included in attached zip file
Link to contents of terminal tab or serial.log
not printing yet..
Screenshot(s) showing the problem:
Including screenshots and other files from above
You've configured your printer profile in OctoPrint as having two extruders but haven't defined any start or end code in Cura for prints in dual extruder configuration:
My guess is that your Cura Desktop profile is set up with one extruder because it's using the custom start.gcode there just fine, could you check this please?
For reference, available gcode scripts editable in Cura for two extruders:
vs just one in the machine settings:
Extruder count in the machine settings:
OctoPrint takes the settings from your OctoPrint printer profile since they are not contained in Cura's slicing profile export. Your extruder count needs to match (or your start code needs to be set correctly for all possible extruder counts you want your slicing profile to work with). If OctoPrint (or Cura Desktop for that matter, the implementation here is identical) does find an empty start code/a start code without at least temperature commands it generates a stock one that should at least take care of properly heating up. That's what you saw since
Just for reference, here's your slicing profile imported in OctoPrint, slicing an STL for a printer profile with just one extruder:
That "bizarre formatting" is due to how the profile data format works. Multiline strings in YAML (which it is) require double spacing for actual line breaks. The additional gcode definitions you see in the generated
Thank you very much for the prompt response. I actually did have cura set to 2 extruders, but had removed any start2/end2.gcode to make it simple for me to troubleshoot.
It's not a case of nozzle 0 vs nozzle 1 code, it's more like "If the printer has one extruder, use this snippet of start code, if it has two, use that snippet". So it's irrelevant if you actually are using the second extruder, as long as your printer has two,
So you don't need to "change nozzles" in OctoPrint in any way, you just have to make sure that the start code for the number of extruders you've configured (regardless of if you use all of them or not) is properly filled in.
It slips the pre-generated code in there because in your start code it can't find the mentioned
Correction: Apparently Cura does an analysis of how many extruders are used for a given object after all. Which in all likelihood I'll not be able to do from within OctoPrint due to performance limitations, at least not the same way that Cura itself does. So that makes things tricky.
Fixed in the above commit. OctoPrint should now actually behave like Cura and use
If OctoPrint's slicer support ever gets extended to allow slicing of multi-extrusion files (e.g. multiple joined STLs, OBJs or AMFs), this will have to be changed, but for now it's the only valid approach.
I've also fixed the placeholder handling for
Both fixes are already pushed to the
As an additional side note regarding the automatically generated prefix: OctoPrint (and Cura) will check the provided start code for the
referenced this issue
Jan 26, 2017
How should I configure my ini files to prevent the adding of extruder temperature gcode in the sliced file?
In OctoPrint's printer profile I configured 2 extruders. But when I want to use only 1 for a print it still adds gcode to set the temperature for the 2nd extruder. For example I've sliced a simple XYZ calibration cube:
Why is this temperature setting for T1 also added to the gcode file generated?
I've confgured my ini file like this: