Jump to content
Ultimaker Community of 3D Printing Experts


  • Posts

  • Joined

  • Last visited

mafi's Achievements



  1. I don't know what a stage in CURA is, so far i trag n drop presliced gcode on my EXE and i can ajust the MultiExtrusion setting for Hight, Infill or change speed at specifig Z hight. So far i have my Profiles where i dont have to ajust anything. And up to now i have to click slice, go up to file Export and export the gcode. When i am finisched i hopefully only click on my Workflow button. Will have a look on Weekend on your suggestion.
  2. from . import Prozessor from UM.i18n import i18nCatalog catalog = i18nCatalog("cura") def getMetaData(): return { "mesh_writer": { "output": [{ "description": catalog.i18nc("@item:inlistbox", "00MyOWN00"), "mime_type": "text/00foo00", "mode": Prozessor.MyOWNGCodeWriter.OutputMode.TextMode }] } } def register(app): return {"mesh_writer": Prozessor.MyOWNGCodeWriter()} from UM.PluginRegistry import PluginRegistry from UM.Mesh.MeshWriter import MeshWriter from UM.Application import Application from UM.Logger import Logger from typing import cast import subprocess import pathlib class MyOWNGCodeWriter(MeshWriter): version = 3 def __init__(self): super().__init__(add_to_recent_files = False) self._application = Application.getInstance() def write(self, stream, nodes, mode = MeshWriter.OutputMode.TextMode): gcode_writer = cast(MeshWriter, PluginRegistry.getInstance().getPluginObject("GCodeWriter")) success = gcode_writer.write(stream, None) stream.close() if not success: self.setInformation(gcode_writer.getInformation()) return False this_file_path = pathlib.Path(__file__).parent exe_path = str(this_file_path.joinpath("Prozessor.exe").absolute()) command = ["cmd", "/c", exe_path, stream.name] Logger.log("i", "-=-=-=-=-=-=-=-=-=-=> Execute: "+str(" ".join(command))) process = subprocess.Popen(command) process.wait() if process.returncode == 0: Logger.log("i", "-=-=-=-=-=-=-=-=-=-=> processing was succesfull") else: Logger.log("w", "-=-=-=-=-=-=-=-=-=-=> execution failed") return True If you delet all the logging its only 5 lines 😉 (maybe more) Its not big. How do i get the cast if i am not a export plugin? cast(MeshWriter, PluginRegistry.getInstance().getPluginObject("GCodeWriter")) How do i get a button in gui if i am not a tool plugin? How do i start slicing via code?
  3. My post processing script is a complet standalone qui where i can modify multi extruder settings for each model for infill. All based on comments in the final gcode. So i want to do my own export function in cura. i dont want to do the three extra clicks on slicing, file export .... espacially i have to save the gcode data twice to disk. First before postprocessing and after. Would be very nice to grap the mesh stream from export and a custom button in gui.
  4. So maybe not as tool, then a custom button where i can start slicing and grap the mesh stream?
  5. This would be a great feature, i have all my sliced gcodes in cloud so i could sort them by name and see how often i have sliced this part for diffrent printers. I would love that feature.
  6. Hello, I use a 2in1out hotend, and i really like the print function one at a time. Until no i have set my printsettings to one extruder because with two or more this function is not possible. So i use my own post processing script to set extruder values afterwards. If this function cannot be realised for all, can you give me a hint where i can tweak this check to get arround this? kind regards
  7. Hello, I want to run my own post processsing script via a nice tool button in cura. i have it running in file/export ... but this is so much more work 😉 It would be nice to have it on the left side and when i click on and i haven't clicked slice than it starts slicing and when finished it directly starts my srcipt. I don't want to get a file which i have to pass to my script where i have to read and overwrite. It should be possible to directly pipe the stream to my scritp so only one time a file is written. I know its a difficult question, if you need more information pleas let me know. kind regards
  • Create New...