Jump to content

sending an STL or GCODE directly to printer by command line


JewelryMaker

Recommended Posts

Posted · sending an STL or GCODE directly to printer by command line

Thanks for the previous answers, but unfortunate not very helpful. I wasn't clear enough about my objective being to send a file to printer directly by command line. It is true that curaEngine can be run from the command line, however it only creates a gcode file from an stl file. Another drawback of curaEngine is that every single setting must be set on the command line. There is no ini or config file option for loading these settings. The config file in Cura is not related to these settings.

If I go back to running Cura.exe form command line, it launches the GUI. There is no documentation on how to use as a command line option, if it is even possible.

The goal is as follows:

(1) pass an stl file + config settings (ideally a file) to curaEngine to create a gcode file

(2) send the gcode to the printer.

If this can be managed through Cura.exe by suppressing the GUI it would be easier.

I don't think this should require coding my own solution. If it does I would need to find the firmware interface documentation. Perhaps I'm the only odd-ball who is trying send prints from another external program..?

  • Link to post
    Share on other sites

    Posted · sending an STL or GCODE directly to printer by command line
    Another drawback of curaEngine is that every single setting must be set on the command line. There is no ini or config file option for loading these settings.

    Not true. You can send it .ini files

    If I go back to running Cura.exe form command line, it launches the GUI. There is no documentation on how to use as a command line option, if it is even possible.

    That's because it's a GUI application, not a command line one ;)

    Streaming g-code to the printer isn't that hard of a task. I'm pretty sure you can pipe the results from the engine into a serial connection (So a single bash script should do the trick).

  • Link to post
    Share on other sites

    • 1 month later...
    Posted · sending an STL or GCODE directly to printer by command line

     

    Another drawback of curaEngine is that every single setting must be set on the command line. There is no ini or config file option for loading these settings.

    Not true. You can send it .ini files

     

    Nallath, can you elaborate how to pass .ini files to the cura engine command line slicer? When looking at the help page (CuraEngine help), I don't see any option to pass a ini file.

    If this is not possible to add the ini file, I wonder if it is possible to add the ini variables to the json file provided in the Cura/resources/machines/ directory.

  • Link to post
    Share on other sites

    Posted · sending an STL or GCODE directly to printer by command line

    The .ini files are for a older version of the engine (the one used by 15.04).

    If you want to use the latest and greatest, you only have to provide the command line option with all settings that you want to change, or adjust the json files so that the defaults match the values that you need.

  • Link to post
    Share on other sites

    Posted · sending an STL or GCODE directly to printer by command line

    I am trying to better automate the build of various parts using CuraEngine directly. At the moment I do this by using cura:

     

    cura \-i part1.ini \-o part1.gcode \-s part1.stl

     

    I want to switch to using CuraEngine directly for automated builds since the needed command line options seem to be missing on the new Cura rewrite (Cura-2.1.2).

     

    The .ini files are for a older version of the engine (the one used by 15.04).

     

    So how exactly can I use the shipped version of CuraEngine with the ini files?

    I can't seem to get it to work (cura 15.04.06; ubuntu 16.04).

     

    /usr/share/cura/CuraEngine -c part1.ini -o part1.gcode part1.stl 

     

    gives the following error:

     

     Default config 'default.cfg' not usedConfig(part1.ini): Line 1: No key value pair foundFailed to read config 'part1.ini'Failed to open part1.gcode for output.

     

  • Link to post
    Share on other sites

    Posted · sending an STL or GCODE directly to printer by command line

    The errors are pretty clear. The contents of the .ini file isn't correct. It's also unable to open / create the .gcode file (probably due to rights)

  • Link to post
    Share on other sites

    Posted (edited) · sending an STL or GCODE directly to printer by command line

    The errors are pretty clear. The contents of the .ini file isn't correct. It's also unable to open / create the .gcode file (probably due to rights)

     

    Yeah I got that. The gcode file is created fine if I don't try to load an ini file.

    Maybe I misunderstood you. From the post before:

     

    The .ini files are for a older version of the engine (the one used by 15.04).

    If you want to use the latest and greatest, you only have to provide the command line option with all settings that you want to change, or adjust the json files so that the defaults match the values that you need.

     

    I took that to mean that the shipped version of CuraEngine is able to parse ini files directly.

    If I misunderstood you:

    - Is there a way to do translate the ini files to CuraEngine config files easily?

    - Or are there plans to re-implement the missing command line functionality in Cura >2.1.2?

    ---------------------------------

    BTW: My use case is that I first use and iterate in cura with the gui. But once I lock down the printer settings for a certain part I use a small script to render it in the future (even if there are slight changes in the stl), as I have various parts I print again and again, but many with somewhat different printer settings.

    No Idea how common this scenario is, but it works great with version control.

    Using Ultimaker 2; recently upgraded to 2+

    Edited by Guest
  • Link to post
    Share on other sites

    Posted · sending an STL or GCODE directly to printer by command line

    As far as I know is that the guy that works on the engine just gives all the commands in commandline (without the .ini file). I don't think he has plans to make any changes to it.

    It shouldn't be that hard to write a little script that generates that though.

  • Link to post
    Share on other sites

    Posted · sending an STL or GCODE directly to printer by command line

    Hi,

    Can we run the curaengine by command prompt in windows?

    Can we run it using cigwin or CMD prompt?

    Please let me know the exact command to run in cigwin and CMD prompt in windows.

    Thanks & Regards,

    Debakanta

  • Link to post
    Share on other sites

    Posted · sending an STL or GCODE directly to printer by command line

    Can we run the curaengine by command prompt  in windows?

     

    Yep

     

    Can we run it using cigwin or CMD prompt?

     

    Both are possible

     

    Please let me know the exact command to run in cigwin and CMD prompt in windows.

     

    See https://github.com/Ultimaker/curaengine#running

  • Link to post
    Share on other sites

    Posted · sending an STL or GCODE directly to printer by command line

    Hi,

    We are using Cura-15.04.3. I need the command to convert a STL file to GCode file and send the request to the printer to print it.

    Can you please let us know the command to convert a STL file to GCode file.

    Kindly let us know the command to print a GCode file from the CMD prompt.

    I don't find the .ini file inside my cura folder as well.

    Thanks & Regards,

    Debakanta

  • Link to post
    Share on other sites

    Posted · sending an STL or GCODE directly to printer by command line

    Click the link. It's explained there.

  • Link to post
    Share on other sites

    Posted (edited) · sending an STL or GCODE directly to printer by command line

    Hi,

    I have installed with Cura-15.04.3

    I'm giving the command to slice a STL file to GCode file

    The command is as below:

    CuraEngine -s "C:\path\to\STL File\" -o "C:\path\to\test.gcode"

    Though it is producing  a test.gcode file it is not the proper one.

    Only heading porting is coming as contents in the .gcode file.

    Please correct the command and let me know the proper one.

    Thanks,

    Debakanta

    Edited by Guest
  • Link to post
    Share on other sites

    Posted (edited) · sending an STL or GCODE directly to printer by command line

    Hi,

    While running CuraEngine -s "C:\path\to\STL File\"  I'm getting the below output:-

    This program is free software: you can redistribute it and/or modify

    it under the terms of the GNU Affero General Public License as published by

    the Free Software Foundation, either version 3 of the License, or

    (at your option) any later version.

    This program is distributed in the hope that it will be useful,

    but WITHOUT ANY WARRANTY; without even the implied warranty of

    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the

    GNU Affero General Public License for more details.

    You should have received a copy of the GNU Affero General Public License

    along with this program.  If not, see .

    Default config 'default.cfg' not used

    M107

    G1 F2700 E-4.50000

    G0 F9000 X0.00 Y0.00 Z5.00

    M104 S0                     ;extruder heater off

    M140 S0                     ;heated bed heater off (if you have it)

    G91                            ;relative positioning

    G1 E-1 F300                    ;retract the filament a bit before lifting the

    nozzle, to release some of the pressure

    G1 Z+0.5 E-5 X-20 Y-20 F9000   ;move Z up a bit and retract filament even more

    G28 X0 Y0                      ;move X/Y to min endstops, so the head is out of

    the way

    M84                         ;steppers off

    G90                         ;absolute positioning

    Please let me know how can I get a correct gcode file

    Thanks & Regards,

    Debakanta

    Edited by Guest
  • Link to post
    Share on other sites

    Posted · sending an STL or GCODE directly to printer by command line

    Hi,

    Have any one tried using cura command to convert the .json file to .gcode. If so please let us know.

    Thanks & Regards,

    Debakanta

  • Link to post
    Share on other sites

    Posted · sending an STL or GCODE directly to printer by command line

    Did you see my reply on one of your other of many duplicate posts you made on this subject?

    Keep your question to a single post and it'll easier to keep track of...

  • Link to post
    Share on other sites

    Posted · sending an STL or GCODE directly to printer by command line

    Hi,

    Usually I'm getting GNU Affero General Public Licence message and default.cfg file not found while running CuraEngine from CMD Command prompt. Kindly let me know how to overcome this issue.

    Though the .gcode file is produced its contents are not expected and not similar to the gcode file produced using GUI.

    Using the command as below;

    CuraEngine -o C:\Path\to\the\file.gcode C:\Path\to\the\file.stl

    The Cura Version I'm using is:

    Cura-15.04.4

    Please help me producing a correct gcode file.

    Thanks & Regards,

    Debakanta

  • Link to post
    Share on other sites

    Posted · sending an STL or GCODE directly to printer by command line

    Use the 2.1 version and the instructions on the github.

  • Link to post
    Share on other sites

    Posted · sending an STL or GCODE directly to printer by command line

    Hi,

    Using Cura-15.04.3 and not able to see definitions/dual_extrusion_printer.def.json file.

    Please let me know how do I set the environment variable in CMD Command prompt in windows. Where to feed the line CURA_ENGINE_SEARCH_PATH=/path/to/Cura/resources/definitions:/user/defined/path if definition folder is missing.

    Do I need to buy a paid Cura software if I want to run it from command prompt.

    Can I use GNU Affero General Public License additionally. If so then how?

    Using CuraEngine -s "C:\path\to\STL File\" -o "C:\path\to\test.gcode" command and getting

    Default Config 'default.cfg' not used message.

    Thanks,

    Debakanta

  • Link to post
    Share on other sites

    Posted · sending an STL or GCODE directly to printer by command line

    Cura 15.04.3 doesn't work with the def.json files, those were introduced for 2.2 or higher.

    There is no paid Cura software (You could pay us, we don't mind, but you don't have to).

  • Link to post
    Share on other sites

    Posted · sending an STL or GCODE directly to printer by command line

    Hi,

    Now, I'm able to produce the .gcode file from .stl file but failing for other files like .obj and .amf etc.

    Using the command as below;

    CuraEngine -c .cura\15.04.3\preferences.ini -o C:\Path\to\the\file.gcode C:\Path\to\the\file.stl

    The Cura Version I'm using is:

    Cura-15.04.4

    Please guide me how to produce .gcode from .obj and .amf files.

    Thanks & Regards,

    Debakanta

  • Link to post
    Share on other sites

    Posted (edited) · sending an STL or GCODE directly to printer by command line

    You cant.

    Edited by Guest
  • Link to post
    Share on other sites

    Posted · sending an STL or GCODE directly to printer by command line

    Hi,

    Is it possible to generate gcode files from .obj, .amf files using windows command prompt?

    Can we convert .obj and .amf files to .stl by windows command prompt.

    Thanks & Regards,

    Debakanta

  • Link to post
    Share on other sites

    Posted · sending an STL or GCODE directly to printer by command line

    Not with CuraEngine. It could be that there is software that can do it, but i'm not aware of any.

  • Link to post
    Share on other sites

    Posted · sending an STL or GCODE directly to printer by command line

    What is the command to print a stl file or its gcode from windows command prompt.

    Thanks & Regards,

    Debakanta

  • 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...