Jump to content

CuraEngine.exe from the command line - slicing - UM3


jeromechrist

Recommended Posts

Posted (edited) · CuraEngine.exe from the command line - slicing - UM3

Hey,

I'm trying to get a GCODE from a STL via invoking CuraEngine.exe.

From cura.log i can see that it's sending a whole bunch of parameters to a socket instead of the command line and returns all the settings value.

I could copy/paste all these parameters but it's way too long for Windows and hit the limit of args for a process.

I also see that it's using fdmprinter.def.json instead of ultimaker3.def.json.

I've tried doing this :

CuraEngine.exe slice -v -j "C:\Program Files\Ultimaker Cura 3.0\resources\definitions\ultimaker3.def.json" -s material_bed_temperature_layer_0="80" -s material_print_temperature_layer_0="235" -s layer_height="0.1" -s layer_height_0="0.27" -s material_diameter="2.85" -e0 -l "C:\Users\***\Desktop\cura\screw.stl" -o "C:\Users\****\Desktop\cura\test.gcode"

But the generated GCODE is pretty different from the one generated by CURA (the UI) ~20k more lines in the one generated by CURA.

Is there a simple way to generate a GCODE equivalent as CURA for the ultimaker 3 for a preset like ABS - Fine - no support - generate build plate adhesion - using CuraEngine.exe ?

Thank you.

Edited by Guest
  • Link to post
    Share on other sites

    Posted · CuraEngine.exe from the command line - slicing - UM3
    I could copy/paste all these parameters but it's way too long for Windows and hit the limit of args for a process.

    That's pretty much why Cura does not use the command line, and instead uses that socket.

    What you could do is create a .def.json file that contains all the values you see being sent to CuraEngine as default_value (in addition to what's in ultimaker3.def.json).

    • Like 2
    Link to post
    Share on other sites

    Posted (edited) · CuraEngine.exe from the command line - slicing - UM3

     

    I could copy/paste all these parameters but it's way too long for Windows and hit the limit of args for a process.

    That's pretty much why Cura does not use the command line, and instead uses that socket.

    What you could do is create a .def.json file that contains all the values you see being sent to CuraEngine as default_value (in addition to what's in ultimaker3.def.json).

     

    I guess that could work if i can create a definition that inherits ultimaker3.def.json with the extra values.

    Edited by Guest
  • Link to post
    Share on other sites

    Posted (edited) · CuraEngine.exe from the command line - slicing - UM3

    The json file references per-extruder json files. Create your own per-extruder json files, based on the UM3 extruder files, and add your settings.

    NB: I never run curaengine from the command line myself, so I don't know if this will work.

    Edited by Guest
    • Like 1
    Link to post
    Share on other sites

    Posted · CuraEngine.exe from the command line - slicing - UM3

    Almost there.

    The gcode produced has invalid headers :

    ;START_OF_HEADER
    ;HEADER_VERSION:0.1
    ;FLAVOR:Griffin
    ;GENERATOR.NAME:Cura_SteamEngine
    ;GENERATOR.VERSION:3.0.4
    ;GENERATOR.BUILD_DATE:2017-10-31
    ;TARGET_MACHINE.NAME:Ultimaker 3
    ;EXTRUDER_TRAIN.0.INITIAL_TEMPERATURE:235
    ;EXTRUDER_TRAIN.0.NOZZLE.DIAMETER:0.4
    ;EXTRUDER_TRAIN.0.NOZZLE.NAME:AA 0.4
    ;BUILD_PLATE.INITIAL_TEMPERATURE:80
    ;PRINT.SIZE.MIN.X:2.14748e+006
    ;PRINT.SIZE.MIN.Y:2.14748e+006
    ;PRINT.SIZE.MIN.Z:2.14748e+006
    ;PRINT.SIZE.MAX.X:-2.14748e+006
    ;PRINT.SIZE.MAX.Y:-2.14748e+006
    ;PRINT.SIZE.MAX.Z:-2.14748e+006
    ;END_OF_HEADER

    this is from the file with -o, what is weird is the output from the console has the correct values :

    ;START_OF_HEADER
    ;HEADER_VERSION:0.1
    ;FLAVOR:Griffin
    ;GENERATOR.NAME:Cura_SteamEngine
    ;GENERATOR.VERSION:3.0.4
    ;GENERATOR.BUILD_DATE:2017-10-31
    ;TARGET_MACHINE.NAME:Ultimaker 3
    ;EXTRUDER_TRAIN.0.INITIAL_TEMPERATURE:235
    ;EXTRUDER_TRAIN.0.MATERIAL.VOLUME_USED:813
    ;EXTRUDER_TRAIN.0.MATERIAL.GUID:60636bb4-518f-42e7-8237-fe77b194ebe0
    ;EXTRUDER_TRAIN.0.NOZZLE.DIAMETER:0.4
    ;EXTRUDER_TRAIN.0.NOZZLE.NAME:AA 0.4
    ;BUILD_PLATE.INITIAL_TEMPERATURE:80
    ;PRINT.TIME:999
    ;PRINT.SIZE.MIN.X:9
    ;PRINT.SIZE.MIN.Y:6
    ;PRINT.SIZE.MIN.Z:0.27
    ;PRINT.SIZE.MAX.X:130.787
    ;PRINT.SIZE.MAX.Y:121.784
    ;PRINT.SIZE.MAX.Z:5.97
    ;END_OF_HEADER

    How do i get the correct headers in the file ?

  • Link to post
    Share on other sites

    Posted · CuraEngine.exe from the command line - slicing - UM3

    The Cura front end fixes the headers for normal prints (not the engine), so this might be a situation of the command line never being used so that part might be broken without anybody noticing...

  • Link to post
    Share on other sites

    Posted · CuraEngine.exe from the command line - slicing - UM3

    The Cura front end fixes the headers for normal prints (not the engine), so this might be a situation of the command line never being used so that part might be broken without anybody noticing...

    Well I noticed :D I've added an issue in the github repo : https://github.com/Ultimaker/CuraEngine/issues/660

    Anyway, i'm now able to generate a gcode for differents settings, thanks for the guidance on this.

    Hopefully this gets fixed so we can fully automate the slicing for UM3 with the command line.

  • Link to post
    Share on other sites

    Posted · CuraEngine.exe from the command line - slicing - UM3

    Anyway, i'm now able to generate a gcode for differents settings, thanks for the guidance on this.

    Hello, Did you created it manually with tons of parameters to set, or did you find a trick to generate if from Cura ?

  • Link to post
    Share on other sites

    Posted · CuraEngine.exe from the command line - slicing - UM3

    One more bit of info. If you invoke CuraEngine with the "-v" parameter, you'll get a valid header *after* slicing. I had the same issue and wrote a script to process the gcode after slicing to cut the header off and insert the new one.

  • Link to post
    Share on other sites

    Posted (edited) · CuraEngine.exe from the command line - slicing - UM3

    If I try capturing the output from the command-line with -v parameter, the valid header *after* slicing is not caught. Although the valid header is displayed on the screen, the captured output contains output only till the "END of Gcode". How could I get the valid header details after running the command.

    Edited by Devang
  • Link to post
    Share on other sites

    Posted (edited) · CuraEngine.exe from the command line - slicing - UM3

    never mind....

    It seems silly that I can't delete a post, but I was incorrect.

    Edited by robinmdh
  • Link to post
    Share on other sites

    Posted · CuraEngine.exe from the command line - slicing - UM3

    @Devang You could capture stdout and parse the header and cut it out. That‘s what I did back then. 

  • Link to post
    Share on other sites

    Posted · CuraEngine.exe from the command line - slicing - UM3

    Thanks @Nikolinux ,it seems the final header is coming in the stderr instead of the stdout, and I was trying to capture it through the stdout.

  • Link to post
    Share on other sites

    Create an account or sign in to comment

    You need to be a member in order to leave a comment

    Create an account

    Sign up for a new account in our community. It's easy!

    Register a new account

    Sign in

    Already have an account? Sign in here.

    Sign In Now
    • Our picks

      • Introducing Universal Cura Projects in the UltiMaker Cura 5.7 beta
        Strap in for the first Cura release of 2024! This 5.7 beta release brings new material profiles as well as cloud printing for Method series printers, and introduces a powerful new way of sharing print settings using printer-agnostic project files! Also, if you want to download the cute dinosaur card holder featured below, it was specially designed for this release and can be found on Thingiverse! 
          • Like
        • 10 replies
      • S-Line Firmware 8.3.0 was released Nov. 20th on the "Latest" firmware branch.
        (Sorry, was out of office when this released)

        This update is for...
        All UltiMaker S series  
        New features
         
        Temperature status. During print preparation, the temperatures of the print cores and build plate will be shown on the display. This gives a better indication of the progress and remaining wait time. Save log files in paused state. It is now possible to save the printer's log files to USB if the currently active print job is paused. Previously, the Dump logs to USB option was only enabled if the printer was in idle state. Confirm print removal via Digital Factory. If the printer is connected to the Digital Factory, it is now possible to confirm the removal of a previous print job via the Digital Factory interface. This is useful in situations where the build plate is clear, but the operator forgot to select Confirm removal on the printer’s display. Visit this page for more information about this feature.
          • Like
        • 0 replies
    ×
    ×
    • Create New...