Jump to content
Cura Connect | Survey Read more... ×
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

    • Architect Design Contest | People
      The goal of this contest is to design a set of people figurines that could be used in such a project to make an area, office or mall seem populated. 
      Think of different types of people in different environments, like walking people, people standing still, working people, and both men and women.
       
      • 9 replies
    • Taking Advantage of DfAM
      This is a statement that’s often made about AM/3DP. I'll focus on the way DfAM can take advantage of some of the unique capabilities that AM and 3DP have to offer. I personally think that the use of AM/3DP for light-weighting is one of it’s most exciting possibilities and one that could play a key part in the sustainability of design and manufacturing in the future.
        • Like
      • 3 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!