2012-02-19 23:30:49 +00:00
#!/usr/bin/python
"""
This page is in the table of contents .
== Overview ==
== = Introduction == =
2012-03-24 09:51:52 +00:00
Cura is a GPL tool chain to forge a gcode skein for a model . Based on Skeinforge .
2012-02-19 23:30:49 +00:00
The slicing code is the same as Skeinforge . But the UI has been revamped to be . . . sane .
"""
from __future__ import absolute_import
2012-03-09 14:14:12 +00:00
import __init__
2012-02-19 23:30:49 +00:00
2012-02-23 13:08:34 +00:00
import sys
import platform
2012-02-19 23:30:49 +00:00
from optparse import OptionParser
2012-03-27 15:20:30 +00:00
2012-03-30 11:54:49 +00:00
from util import profile
2012-03-28 12:26:40 +00:00
from util import sliceRun
2012-02-21 14:27:03 +00:00
2012-02-19 23:30:49 +00:00
__author__ = ' Daid '
__credits__ = """
Enrique Perez ( perez_enrique @yahoo.com )
Adrian Bowyer < http : / / forums . reprap . org / profile . php ? 12 , 13 >
Brendan Erwin < http : / / forums . reprap . org / profile . php ? 12 , 217 >
Greenarrow < http : / / forums . reprap . org / profile . php ? 12 , 81 >
Ian England < http : / / forums . reprap . org / profile . php ? 12 , 192 >
John Gilmore < http : / / forums . reprap . org / profile . php ? 12 , 364 >
Jonwise < http : / / forums . reprap . org / profile . php ? 12 , 716 >
Kyle Corbitt < http : / / forums . reprap . org / profile . php ? 12 , 90 >
Michael Duffin < http : / / forums . reprap . org / profile . php ? 12 , 930 >
Marius Kintel < http : / / reprap . soup . io / >
Nophead < http : / / www . blogger . com / profile / 12801535866788103677 >
PJR < http : / / forums . reprap . org / profile . php ? 12 , 757 >
Reece . Arnott < http : / / forums . reprap . org / profile . php ? 12 , 152 >
Wade < http : / / forums . reprap . org / profile . php ? 12 , 489 >
Xsainnz < http : / / forums . reprap . org / profile . php ? 12 , 563 >
Zach Hoeken < http : / / blog . zachhoeken . com / >
Organizations :
Art of Illusion < http : / / www . artofillusion . org / > """
__license__ = ' GNU Affero General Public License http://www.gnu.org/licenses/agpl.html '
def main ( ) :
2012-03-30 11:54:49 +00:00
parser = OptionParser ( usage = " usage: % prog [options] <filename>.stl " )
2012-05-16 11:52:42 +00:00
parser . add_option ( " -i " , " --ini " , action = " store " , type = " string " , dest = " profileini " , help = " Load settings from a profile ini file " )
2012-04-17 17:12:40 +00:00
parser . add_option ( " -P " , " --project " , action = " store_true " , dest = " openprojectplanner " , help = " Open the project planner " )
2012-04-13 16:14:38 +00:00
parser . add_option ( " -r " , " --print " , action = " store " , type = " string " , dest = " printfile " , help = " Open the printing interface, instead of the normal cura interface. " )
2012-05-16 11:52:42 +00:00
parser . add_option ( " -p " , " --profile " , action = " store " , type = " string " , dest = " profile " , help = " Internal option, do not use! " )
2012-02-19 23:30:49 +00:00
( options , args ) = parser . parse_args ( )
2012-03-30 11:54:49 +00:00
if options . profile != None :
profile . loadGlobalProfileFromString ( options . profile )
2012-05-16 11:52:42 +00:00
if options . profileini != None :
profile . loadGlobalProfile ( options . profileini )
2012-04-17 17:12:40 +00:00
if options . openprojectplanner != None :
from gui import projectPlanner
projectPlanner . main ( )
return
2012-04-13 16:14:38 +00:00
if options . printfile != None :
from gui import printWindow
printWindow . startPrintInterface ( options . printfile )
return
2012-02-19 23:30:49 +00:00
if len ( args ) > 0 :
2012-03-22 19:29:03 +00:00
sliceRun . runSlice ( args )
2012-02-19 23:30:49 +00:00
else :
2012-03-27 15:20:30 +00:00
from gui import mainWindow
2012-02-19 23:30:49 +00:00
mainWindow . main ( )
if __name__ == ' __main__ ' :
main ( )