Jump to content
Ultimaker Community of 3D Printing Experts
jeromechrist

CuraEngine.exe from the command line - slicing - UM3

Recommended Posts

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

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites

 

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

Share this post


Link to post
Share on other sites

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 ?

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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

Share this post


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 Ultimaker Cura 3.6 | Beta
      Ultimaker Cura 3.6 | Beta is available. It comes with new features, bug fixes, and UX improvements. We would really like to have your feedback on it to make our stable release as good as it can be. As always, you can download the beta for free from our website, for Windows, MacOS, and Linux.
        • Like
      • 82 replies
    • Print Core CC | Red for Ruby
      Q: For some users, abrasive materials may be a new subject matter. Can you explain what it is that makes a material abrasive when you are not sure which print core to use?
      A: Materials which are hard in a solid piece (like metals, ceramics and carbon fibers) will generally also wear down the nozzle. In general one should assume...
        • Like
      • 30 replies
    • "Back To The Future" using Generative Design & Investment Casting
      Designing for light-weight parts is becoming more important, and I’m a firm believer in the need to produce lighter weight, less over-engineered parts for the future. This is for sustainability reasons because we need to be using less raw materials and, in things like transportation, it impacts the energy usage of the product during it’s service life.
        • Like
      • 12 replies
×

Important Information

Welcome to the Ultimaker Community of 3D printing experts. Visit the following links to read more about our Terms of Use or our Privacy Policy. Thank you!