In addition to this question: Is there a (common) way to embed used Slicer settings inside the G-code file?.

I'm considering writing a Cura script and OctoPrint plugin because what I want seems to be not available. I suggest adding, for example, a Base64 encoded JSON array with metadata (see previously mentioned question) into each generated G-code that then can be read by the OctoPrint plugin (or, even better, understood in the Marlin firmware).

Related to that, I would want OctoPrint, or the Marlin firmware, to know the installed nozzle size. That way, my OctoPrint plugin (or the firmware) can check and match the installed nozzle size versus the nozzle size used for slicing that G-code. If mismatched, prevent the printer from printing, advise to reslice, or warn about the mismatch.

As we speak, I'm printing a physical nozzle size indicator, a physical "label" hanging on my printer. That's ridiculous and should be in the software.

I couldn't find such features in OctoPrint and Marlin documentation. This would be a great addition as it prevents errors and facilitates what some more expensive printers with "easy nozzle change" can do automatically.

First side-note: This could be easily implemented in a cross-compatible way with Prusa/Cura/Octo/Marlin, et cetera because a fundamental data structure containing the mentioned metadata (other question) is easy to implement for all without having compatibility issues.

Second side note: The same concept can also be applied to the filament color installed. If you can set the desired color in the metadata inside the G-code and the printer knows which color is installed, it can warn about mismatches.

  • $\begingroup$ I regularly print 0.8 mm with a 0.4 mm nozzle without a problem, so what are the errors you encounter. This question is not very clear. How many printers do you have to worry about the nozzle sizes? Maybe the following is a good read for you: Where can I change the nozzle diameter in Cura? Why is mine missing?! $\endgroup$
    – 0scar
    Commented Nov 27, 2023 at 9:34
  • $\begingroup$ I have only one printer, I don't print too regularly, so I kept forgetting which nozzle I installed, hence the physical nozzle indicator. The issue is my g-code files are saved in OctoPrint, and they don't contain easily visible information about which settings it was sliced with (for a .2, .4, .8 nozzle) and for what layer height. I sometimes want to reprint something I already sliced with another nozzle size for higher quality or for faster printing speeds. If Octo or Marlin knows what size is installed, and the g-code contains this info, too, it can be matched and warn about a mismatch. $\endgroup$
    – Bob Ortiz
    Commented Nov 27, 2023 at 9:43
  • $\begingroup$ I know how to change the nozzle diameter and layer height in Cura, and I usually end up reslicing it (meaning I lose scaling and other custom settings I've used for a particular object). My issue is with properly documenting what settings are used in a machine-readable format that can be used smartly by Octo or Marlin, the same for filament color, sliced in blue but red installed, warning (that can be ignored). $\endgroup$
    – Bob Ortiz
    Commented Nov 27, 2023 at 9:45
  • $\begingroup$ I usually make a folder structure in my OctoPrint storage where I distinguish the prints based on the material (PLA, generic PETG, NGEN, Nylon, etc.) you could do the same for nozzle diameter, once stored in that specific location you instantly see what the code was meant for. I wonder why you change nozzles frequently I've printed more than 10 years with the (now CHT) 0.4 mm nozzle, which is capable of printing wider. I used to put the most important setting in the G-code file name, that is also a solution. $\endgroup$
    – 0scar
    Commented Nov 27, 2023 at 10:37
  • $\begingroup$ That's my solution for now 3dprinting.stackexchange.com/questions/21563/… but it doesn't feel like a techy solution as of 2023, there should be better options to achieve it. I change nozzles often between .4 and .6 because of the huge speed difference. A 0.6mm nozzle at 0.32 or even at 0.20 layer height is fine for most prints and gives a huge speed benefit over using 0.4mm nozzle at 0.20 layer height. But sometimes I do need more detail and switch back to the slower 0.4mm nozzle with .20/.16/.12 layer height. $\endgroup$
    – Bob Ortiz
    Commented Nov 27, 2023 at 10:46


You must log in to answer this question.

Browse other questions tagged .