Jump to content

Cura Command line


brictone

Recommended Posts

Posted · Cura Command line

Hey Daid! Love the work! I still can't figure out the logic behind the command line. I've spent the last week trying to update my thing for 1303 and I'm just spinning my wheels. I don't know why it's so hard for me.

This was working for the last 6 months or so since 12.12A came out and I asked about it then. At that point you mentioned it would change from Cura.cura to Cura.slice. So that's what I did... I got nothing. well I was able to get the help info out of the command line and learned I needed to add an output and change an -i to a -p. I think. Well anyways this is what I have...

"C:\Software\Cura\pypy\pypy.exe" "C:\Software\Cura\Cura\cura.py" -m Cura.slice -p "C:\Queue\Cura.ini" "C:\Queue\Pyramid2x10.stl" -o "C:\Queue\Pyramid2x10.gcode"

And this is the error I get.

File "app_main.py", line 51, in run_toplevel

File "Z:\Projects\Prototypes\Software\Cura\Cura\cura.py", line 15, in <module>

from Cura.util import profile

ImportError: No module named Cura

 

I've lost my progress and can't even replicate how I got it to work in the first place now. Is there a way you can teach me how this works so you don't have to help me every release? I just can't seam to figure this out on my own. I've learned a bit about python recently and I've tried digging through the python files to see if I can understand what cura needs but... I'm still not there.

 

I've got another question. Is there a way to import the cura python slicer into another python script? reason I ask is because I'm using this for my MayaToGcode scripty-do and right now I'm using python to export an stl file and then build a command line and call up cura to slice it. It would be righteous to stay away from the windows cmd line and just call it from python.

 

Anyone else maybe know enough about python that would be interested in helping out?

 

Brictone

 

  • Link to post
    Share on other sites

    Posted · Cura Command line

    You're almost there ;-)

    I wouldn't recommend trying to run Cura.slice, which has a different interface and is used internally. And bound to change when I introduce my new engine.

    The best way would be:

     


    cd C:\Software\Cura\
    C:\Software\Cura\pypy\pypy.exe -m Cura.cura -p "C:\Queue\Cura.ini" -s "C:\Queue\Pyramid2x10.stl"
  • Link to post
    Share on other sites

    Posted · Cura Command line

    ok so it looks about the same as 12.12, I'll give that a whirl tonight.

    What do you think about importing cura into another script so I could slice with it that way? I guess what I'm trying to do is turn cura into a plugin for maya.

     

  • Link to post
    Share on other sites

    Posted · Cura Command line

    Well you said it would be madness, but you didn't say it wouldn't be possible. That gives me hope! :grin: I might be able to bring pypy into maya as well. I'll let you know if I can get that far. :smile:

     

  • Link to post
    Share on other sites

    Posted · Cura Command line

    ok, I tried to get the command line to work this time. I did with 12.12 again... sorta with errors.

    Here's what I did. I tried exactly what you said Navigated to the software\Cura folder


    "C:\Software\Cura\pypy\pypy.exe" -m Cura.cura -p "C:\Queue\Cura.ini" -s "C:\Queue\Pyramid2x10.stl

    This is the error I got:


    Traceback (most recent call last):
    File "app_main.py", line 51, in run_toplevel
    File "C:\Software\Cura\pypy\lib-python\2.7\runpy.py", line 162, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
    File "C:\Software\Cura\pypy\lib-python\2.7\runpy.py", line 72, in _run_code
    exec code in run_globals
    File "C:\Software\Cura\Cura\cura.py", line 80, in <module>
    main()
    File "C:\Software\Cura\Cura\cura.py", line 58, in main
    profile.loadGlobalProfileFromString(options.profile)
    File "Cura\util\profile.py", line 247, in loadGlobalProfileFromString
    options = zlib.decompress(options)
    error: Error -3 while decompressing data: incorrect header check

    So I thought ok, maybe I mangeled the INI file so I omitted that part and it worked with 12.12... sorta. So I tried it 13.03


    "C:\Software\Cura\pypy\pypy.exe" -m Cura.cura -s "C:\Queue\Pyramid2x10.stl

    and got...


    Traceback (most recent call last):
    File "app_main.py", line 51, in run_toplevel
    File "C:\Software\Cura\pypy\lib-python\2.7\runpy.py", line 162, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
    File "C:\Software\Cura\pypy\lib-python\2.7\runpy.py", line 72, in _run_code
    exec code in run_globals
    File "C:\Software\Cura\Cura\cura.py", line 80, in <module>
    main()
    File "C:\Software\Cura\Cura\cura.py", line 67, in main
    sliceRun.runSlice(args)
    AttributeError: 'module' object has no attribute 'runSlice'

    I'm going to reinstall cura and try again... I'll be back if anything changes.

     

  • Link to post
    Share on other sites

    Posted · Cura Command line

    Oh, I could have broken something then...

     

  • Link to post
    Share on other sites

    Posted · Cura Command line

    I reinstalled, same problem. It seams weird that my previous install of cura 12.12A that was working, is not now. When I run it without a profile (INI file) it makes it most of the way and crashes on something, I can't remember the exact part of the slicing. I can look that tonight up if it would help.

    Works great on 12.11 still, I'll just use that in the mean time I guess. I hope I'm not missing out on any slicing enhancements.

     

  • 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
          • Thanks
          • Like
        • 3 replies
    ×
    ×
    • Create New...