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.8 Stable released 🎉
        In the Cura 5.8 stable release, everyone can now tune their Z seams to look better than ever. Method series users get access to new material profiles, and the base Method model now has a printer profile, meaning the whole Method series is now supported in Cura!
        • 5 replies
      • Introducing the UltiMaker Factor 4
        We are happy to announce the next evolution in the UltiMaker 3D printer lineup: the UltiMaker Factor 4 industrial-grade 3D printer, designed to take manufacturing to new levels of efficiency and reliability. Factor 4 is an end-to-end 3D printing solution for light industrial applications
        • 3 replies
    ×
    ×
    • Create New...