3 This page is in the table of contents.
6 Cura is a GPL tool chain to forge a gcode skein for a model. Based on Skeinforge.
8 The slicing code is the same as Skeinforge. But the UI has been revamped to be... sane.
11 from __future__ import absolute_import
15 from optparse import OptionParser
17 from Cura.util import profile
21 David Braam (daid303@gmail.com)
22 Enrique Perez (perez_enrique@yahoo.com)
23 Adrian Bowyer <http://forums.reprap.org/profile.php?12,13>
24 Brendan Erwin <http://forums.reprap.org/profile.php?12,217>
25 Greenarrow <http://forums.reprap.org/profile.php?12,81>
26 Ian England <http://forums.reprap.org/profile.php?12,192>
27 John Gilmore <http://forums.reprap.org/profile.php?12,364>
28 Jonwise <http://forums.reprap.org/profile.php?12,716>
29 Kyle Corbitt <http://forums.reprap.org/profile.php?12,90>
30 Michael Duffin <http://forums.reprap.org/profile.php?12,930>
31 Marius Kintel <http://reprap.soup.io/>
32 Nophead <http://www.blogger.com/profile/12801535866788103677>
33 PJR <http://forums.reprap.org/profile.php?12,757>
34 Reece.Arnott <http://forums.reprap.org/profile.php?12,152>
35 Wade <http://forums.reprap.org/profile.php?12,489>
36 Xsainnz <http://forums.reprap.org/profile.php?12,563>
37 Zach Hoeken <http://blog.zachhoeken.com/>
38 Ilya Kulakov (kulakov.ilya@gmail.com)
41 Ultimaker <http://www.ultimaker.com>
42 Art of Illusion <http://www.artofillusion.org/>"""
44 __license__ = 'GNU Affero General Public License http://www.gnu.org/licenses/agpl.html'
48 parser = OptionParser(usage="usage: %prog [options] <filename>.stl")
49 parser.add_option("-i", "--ini", action="store", type="string", dest="profileini",
50 help="Load settings from a profile ini file")
51 parser.add_option("-P", "--project", action="store_true", dest="openprojectplanner",
52 help="Open the project planner")
53 parser.add_option("-F", "--flat", action="store_true", dest="openflatslicer",
54 help="Open the 2D SVG slicer (unfinished)")
55 parser.add_option("-r", "--print", action="store", type="string", dest="printfile",
56 help="Open the printing interface, instead of the normal cura interface.")
57 parser.add_option("-p", "--profile", action="store", type="string", dest="profile",
58 help="Internal option, do not use!")
59 parser.add_option("-s", "--slice", action="store_true", dest="slice",
60 help="Slice the given files instead of opening them in Cura")
61 (options, args) = parser.parse_args()
63 if options.profile is not None:
64 profile.loadGlobalProfileFromString(options.profile)
65 if options.profileini is not None:
66 profile.loadGlobalProfile(options.profileini)
68 if options.openprojectplanner is not None:
69 from Cura.gui import projectPlanner
71 elif options.openflatslicer is not None:
72 from Cura.gui import flatSlicerWindow
73 flatSlicerWindow.main()
74 elif options.printfile is not None:
75 from Cura.gui import printWindow
76 printWindow.startPrintInterface(options.printfile)
77 elif options.slice is not None:
78 from Cura.util import sliceRun
79 sliceRun.runSlice(args)
82 profile.putPreference('lastFile', ';'.join(args))
85 from Cura.gui import splashScreen
87 class CuraApp(wx.App):
88 def MacOpenFile(self, path):
91 except Exception as e:
92 warnings.warn("File at {p} cannot be read: {e}".format(p=path, e=str(e)))
94 def mainWindowRunCallback(splash):
95 from Cura.gui import mainWindow
96 if splash is not None:
101 # Apple discurage usage of splash screens on a mac.
102 if sys.platform.startswith('darwin'):
103 mainWindowRunCallback(None)
105 splashScreen.splashScreen(mainWindowRunCallback)
108 if __name__ == '__main__':