Jump to content

PYTHON OR BASH CURA INTERFACE


navarro_lautaro

Recommended Posts

  • 4 weeks later...
Posted · PYTHON OR BASH CURA INTERFACE

It sounds like you may want to skip the Cura frontend and slice directly using the CuraEngine slicer. This is what Cura does in the background.

 

CuraEngine does have a command-line interface, and it is possible to specify a model and all the settings. As an aside, Cura does not use the command line to communicate with the CuraEngine, but it uses a socket to send models and settings to the engine (using a protocol named "Arcus", see https://github.com/Ultimaker/libArcus).

 

The CuraEngine command-line interface has the following options for slicing:

CuraEngine slice [-v] [-p] [-j <settings.json>] [-s <settingkey>=<value>] [-g] [-e<extruder_nr>] [-o <output.gcode>] [-l <model.stl>] [--next]
  -v
        Increase the verbose level (show log messages).
  -m<thread_count>
        Set the desired number of threads.
  -p
        Log progress information.
  -j
        Load settings.def.json file to register all settings and their defaults.
  -s <setting>=<value>
        Set a setting to a value for the last supplied object,
        extruder train, or general settings.
  -l <model_file>
        Load an STL model.
  -g
        Switch setting focus to the current mesh group only.
        Used for one-at-a-time printing.
  -e<extruder_nr>
        Switch setting focus to the extruder train with the given number.
  --next
        Generate gcode for the previously supplied mesh group and append that to
        the gcode of further models for one-at-a-time printing.
  -o <output_file>
        Specify a file to which to write the generated gcode.

The resulting gcode contains a comment with how much material is used (in meters). You can calculate the weight from the filament diameter and the density of the material.

  • Like 1
Link to post
Share on other sites

Posted · PYTHON OR BASH CURA INTERFACE

For example settings.def.json files you should look around in the folders that Cura creates.  For example on windows I think maybe it's in %appdata%/cura.   On linux I think it's in ~/cura/share/cura/resources/

 

Just search for files on your computer *.def.json.

 

 

  • Link to post
    Share on other sites

    Posted · PYTHON OR BASH CURA INTERFACE
    3 hours ago, gr5 said:

    For example settings.def.json files you should look around in the folders that Cura creates

     

    Except those folders will rarely contain any .def.json files. Files ending with .def.json are mostly "machine definitions", and they are located in the resources folder of the application bundle.

    https://github.com/Ultimaker/Cura/tree/master/resources/definitions

    One thing to note is that CuraEngine only ever uses "default_value" and completely ignores "value".

  • Link to post
    Share on other sites

    Posted · PYTHON OR BASH CURA INTERFACE
    On 12/18/2019 at 1:21 PM, gr5 said:

    For example settings.def.json files you should look around in the folders that Cura creates.  For example on windows I think maybe it's in %appdata%/cura.   On linux I think it's in ~/cura/share/cura/resources/

     

    Just search for files on your computer *.def.json.

     

     

    Can you provide me a json example? I was not able to find it on my linux computer!

  • Link to post
    Share on other sites

    Posted · PYTHON OR BASH CURA INTERFACE

    On linux just type "locate .def.json"

     

    Anyway you can see all of them here just as easily as ahoeben says: https://github.com/Ultimaker/Cura/tree/master/resources/definitions

     

  • Link to post
    Share on other sites

    Posted · PYTHON OR BASH CURA INTERFACE
    18 hours ago, gr5 said:

    On linux just type "locate .def.json"

     

    Anyway you can see all of them here just as easily as ahoeben says: https://github.com/Ultimaker/Cura/tree/master/resources/definitions

     

    That's perfect! Thanks you guys for your support!

  • Link to post
    Share on other sites

    Posted · PYTHON OR BASH CURA INTERFACE

    Hey together,

     

    did anyone try here the libArcus library or the python bindings from https://github.com/Ultimaker/pyArcus ?

  • 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

      • UltiMaker Cura 5.7 stable released
        Cura 5.7 is here and it brings a handy new workflow improvement when using Thingiverse and Cura together, as well as additional capabilities for Method series printers, and a powerful way of sharing print settings using new printer-agnostic project files! Read on to find out about all of these improvements and more. 
         
          • Like
        • 18 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...