Jump to content
Ultimaker Community of 3D Printing Experts
erri

CuraEngine command line: use Cura profiles instead of "-s" options?

Recommended Posts

Hi,

i'm working with Cura (2.3.1) under linux. I have created a custom UM2 machine profile and some material/quality profiles.

Slicing with the Cura GUI is going well.

Now i want to atomate things, i.e. i want to use CuraEngine (from a Makefile) to slice my STL files into gcode.

To do this i would have to use many "-s" commandline options to specify the non-default slicer options (a look into cura.log reveals that it is calling CuraEngine with about 330 "-s" options, for example).

Now the question is:

Is it possible to use the Cura(-GUI) generated profiles (.cfg files stored in HOME/.local/share/cura) instead of listing them one by one on the CuraEngine command line? It seems that there is no commandline option to specify Cura profiles :-(

Or is there some other way like generating a list of "-s" options from the Cura profiles?

Share this post


Link to post
Share on other sites

The logs output them when a slice starts. You can just copy them from there.

 

Of course i can copy it from cura.log... But i am looking for a more integrated/elegant way, something that is more 'single source'.

Problem is, for example, if i change the machine/profile in cura, i have to remember all places (scripts, Makefiles) where this profile is used (hardcoded settings) and have to update them by hand... This is duplicated and error-prone work.

I would like to avoid such hardcoded settings and instead reference the cura profiles at theese places.

Share this post


Link to post
Share on other sites

We don't have that. The setting architecture is quite complex. Porting it to the engine would only increase the odds of it going wrong (as we'd be re-implementing a bunch of code in another language). As we don't even use it, i don't think it's likely that we're going to spend time on this. We have a lot more stuff that has higher priority.

Share this post


Link to post
Share on other sites

Hi,

i have written a python program cura-engine-wrapper.py that reads the slicing parameters from Cura machine and quality/material profiles and calls CuraEngine with them to slice a model (stl file).

You can overwrite specific profile parameters on the command line and there are some additional use cases like listing available Cura containers/profiles or dumping the parameters of a given profile.

You can find it here: http://github.com/ErwinRieger/ddprint/tree/master/scripts.

More information here: http://ibrieger.de/cura-engine-wrapperpy-helper-to-call-curaengine-from-command-line.html.

Share this post


Link to post
Share on other sites

Hi,

i have written a python program cura-engine-wrapper.py that reads the slicing parameters from Cura machine and quality/material profiles and calls CuraEngine with them to slice a model (stl file).

You can overwrite specific profile parameters on the command line and there are some additional use cases like listing available Cura containers/profiles or dumping the parameters of a given profile.

You can find it here: http://github.com/ErwinRieger/ddprint/tree/master/scripts.

More information here: http://ibrieger.de/cura-engine-wrapperpy-helper-to-call-curaengine-from-command-line.html.

 

Protip; use the CuraContainerRegistry. It does a bit more magic. If you ask the value from a stack that is returned there, it should also handle the resolve. Should be a simple as switching out the ContainerRegistry with the CuraContainerRegistry.

Also; Very nice work!

Edited by Guest

Share this post


Link to post
Share on other sites

Protip; use the CuraContainerRegistry. It does a bit more magic. If you ask the value from a stack that is returned there, it should also handle the resolve. Should be a simple as switching out the ContainerRegistry with the CuraContainerRegistry.

Updated the script, replaced ContainerRegistry with CuraContainerRegistry.

@@Nallath: The value for *infill_overlap* is not resolved/evaluated (neither by using ContainerRegistry nor by using CuraContainerRegistry):

infill_overlap = =10 if infill_sparse_density < 95 and infill_pattern != 'concentric' else 0

I think this code has to be evaluated somehow before it gets passed over to curaEnginge?

Any hints?

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

    • How to 3D print with reinforced engineering materials
      Ultimaker is hosting a webinar where we explain how you can achieve and maintain a high print success rate using these new reinforced engineering materials. Learn from Ultimaker's Product Manager of Materials and top chemical engineer Bart van As how you can take your 3D printing to that next level.
      • 0 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!