The more "official" way to do what you describe is to write an OutputDevicePlugin.
See https://github.com/Ultimaker/Cura/wiki/Plugin-Directory and specifically https://github.com/Ultimaker/UraniumExampleOutputDevicePlugin
That way you would not have to create an intermediate file on disk, but just send the gcode to your http connection.
For inspiration you might also want to check out http://github.com/fieldOfView/OctoPrintPlugin which sends gcode to OctoPrint over an HTTP connection, but that is a rather bigger plugin (that also provides monitoring).
A postprocessing script could work in some cases, but is really meant for something else. It does not give you access to the gcode file (just the raw gcode as a string), and is actually run *before* the gcode is handed over to an OutputDevicePlugin.
Edited by ahoeben- 1
Recommended Posts
BoostedGcode 2
Try the PostProcessingPlugin Extension.
I've implemented a post processing plugin that does very similar thing - except is for post processing a gcode with a cloud function.
Here's the installation instruction:
http://www.customize-3d.com/faster-high-resolution-3d-printing.html
And here's the code that uploads the generated file to the code:
https://github.com/csabag/BoostedGcodeCuraPlugin
Link to post
Share on other sites