Cura command line for multi-material slicing
December 17, 2013 11:58PM
This forum has no folder for Cura, and there is no general section within the software folder, so since Cura is (or was) descended from skeinforge, I will ask my question here.

I am looking at Cura right now only because Slic3r has some limitations in the way it handles multi-material objects. Specifically, with 0.9b, at least on Ubuntu, I am unable to use the [previous_extruder] and [next_extruder] placeholders in my custom g code. These strings are simply literally copied to the output. And I can't use 1.0RC1 in this environment because the package for Linux is missing the XML:confused smileyAX library and I am thus unable to parse ANY multi-material file.

So anyway, I'm looking at Cura. I can use it interactively, but I'd prefer to hook into it from my host software, and that implies using the command line interface. I searched all over ultimaker's site, and I find no documentation about the use of the command line. I actually had to look at the python code to figure out what the options are. It looks to me like I can specify an ini file to load and one or more stl files to slice, but I see no way to combine two separate stl files into a two color print. I've done it inside the program GUI, but I see no command line equivalent.

Am I missing something here?

Thanks
Re: Cura command line for multi-material slicing
December 20, 2013 04:20PM
You too are trying to understand CuraEngine...

In the Git repository there are some indirect indications:

Nearly at the beggining of main.cpp, a list of config settings, and start /end gcodes hardcoded. Here the start gcode isn't the same as displayed when typing "./CuraEngine -v" in a command line.

At the beggining of settings.cpp, another list of config settings, a little different. I suppose thoses two lists contains the names of parameters we can use with the command line.

When we type "./CuraEngine -h" we get this:

Cura_SteamEngine version 13.11.2
usage: CuraEngine [-h] [-v] [-m 3x3matrix] [-s <settingkey>=<value>] -o <output.gcode> <model.stl>

I would like to know what means 3x3matrix... and to get a real documentation as you...

What is the host software you made? I made a web interface for Skeinforge and now, because there is no further Skeinforge development, I am asking myself: making a web (other? GTK+? Qt?) interface for Cura...


François
Re: Cura command line for multi-material slicing
December 21, 2013 11:02AM
I saw the curaengine interface. It looks to me that I'd have to build up a command line by specifying all of the settings that are normally in the profile and preferences. I'm just using the cura.py entry with a "-i -s -o " on the command line. The way I finally got it to work was to use an AMF file instead of multiple STL files.

My host program is my home-grown replacement for pronterface. I kept wishing for additional features in pronterface and finally decided to just write my own. I'm happy with the current state of it, but it's only ever been used with Marlin firmware, and although it's written in Python and wxPython, I've only ever verified that it works on an Ubuntu system. If you want to take a look at it, it can be found here. Just a word of warning, though. I use github as the way to pass the program between my Windows machine, where I do most of my coding and my Linux machine where it will actually run. In fact I've never really taken the time to configure the slicers and such on my Windows machine so I don't even know if I can bring it up in that environment. The point is that at any given time, you might be getting a "development" version of the program.

I built the program around a notebook interface. The first page of the notebook is the log. The second page is the plater - similar to the plater in slic3r. The third page is the file preparation page where I can invoke a slicer (skeinforge, slic3r, or, now, cura), load G code directly, merge stl files into AMF files, edit G Code, etc. The G code can be passed from here to the print monitor page from where it is printed. This allows me to prepare a file for printing while printing is actually going on. The 4th page is for manual control - axis movement, heater control, extruder control, etc, as well as a widget for entering any G code command. Finally, the 5th page is for monitoring a print in progress. And I have a host of features in my to-do list.

I've always felt that this hobby was more about the journey than the destination. I'm never finished with the printer; there are always things to add, parts to design and print. This same idea now also extends to the software.
Sorry, only registered users may post in this forum.

Click here to login