diff --git a/.gitignore b/.gitignore index e872f6a5e1..6c1debd6df 100644 --- a/.gitignore +++ b/.gitignore @@ -3,7 +3,7 @@ *.pyc *.zip *.exe -osx64-SkeinPyPy-NewUI* -win32-SkeinPyPy-NewUI* -linux-SkeinPyPy-NewUI* +osx64-Cura-NewUI* +win32-Cura-NewUI* +linux-Cura-NewUI* Printrun diff --git a/SkeinPyPy/__init__.py b/Cura/__init__.py similarity index 100% rename from SkeinPyPy/__init__.py rename to Cura/__init__.py diff --git a/SkeinPyPy/skeinforge_application/alterations/end.gcode b/Cura/alterations/end.gcode similarity index 100% rename from SkeinPyPy/skeinforge_application/alterations/end.gcode rename to Cura/alterations/end.gcode diff --git a/SkeinPyPy/skeinforge_application/alterations/start.gcode b/Cura/alterations/start.gcode similarity index 100% rename from SkeinPyPy/skeinforge_application/alterations/start.gcode rename to Cura/alterations/start.gcode diff --git a/SkeinPyPy/avr_isp/__init__.py b/Cura/avr_isp/__init__.py similarity index 100% rename from SkeinPyPy/avr_isp/__init__.py rename to Cura/avr_isp/__init__.py diff --git a/SkeinPyPy/avr_isp/chipDB.py b/Cura/avr_isp/chipDB.py similarity index 100% rename from SkeinPyPy/avr_isp/chipDB.py rename to Cura/avr_isp/chipDB.py diff --git a/SkeinPyPy/avr_isp/intelHex.py b/Cura/avr_isp/intelHex.py similarity index 100% rename from SkeinPyPy/avr_isp/intelHex.py rename to Cura/avr_isp/intelHex.py diff --git a/SkeinPyPy/avr_isp/ispBase.py b/Cura/avr_isp/ispBase.py similarity index 100% rename from SkeinPyPy/avr_isp/ispBase.py rename to Cura/avr_isp/ispBase.py diff --git a/SkeinPyPy/avr_isp/stk500v2.py b/Cura/avr_isp/stk500v2.py similarity index 100% rename from SkeinPyPy/avr_isp/stk500v2.py rename to Cura/avr_isp/stk500v2.py diff --git a/SkeinPyPy/skeinpypy.py b/Cura/cura.py similarity index 76% rename from SkeinPyPy/skeinpypy.py rename to Cura/cura.py index f307961794..2d2d7e43eb 100644 --- a/SkeinPyPy/skeinpypy.py +++ b/Cura/cura.py @@ -3,7 +3,7 @@ This page is in the table of contents. ==Overview== ===Introduction=== -SkeinPyPy is a GPL tool chain to forge a gcode skein for a model. Based on Skeinforge. +Cura is a GPL tool chain to forge a gcode skein for a model. Based on Skeinforge. The slicing code is the same as Skeinforge. But the UI has been revamped to be... sane. @@ -14,9 +14,10 @@ import __init__ import sys import platform - from optparse import OptionParser -from newui import sliceRun + +from util import profile +from util import sliceRun __author__ = 'Daid' __credits__ = """ @@ -43,13 +44,15 @@ Art of Illusion """ __license__ = 'GNU Affero General Public License http://www.gnu.org/licenses/agpl.html' def main(): - parser = OptionParser() + parser = OptionParser(usage="usage: %prog [options] .stl") + parser.add_option("-p", "--profile", action="store", type="string", dest="profile", help="Use these profile settings instead of loading current_profile.ini") (options, args) = parser.parse_args() - sys.argv = [sys.argv[0]] + args + if options.profile != None: + profile.loadGlobalProfileFromString(options.profile) if len( args ) > 0: sliceRun.runSlice(args) else: - from newui import mainWindow + from gui import mainWindow mainWindow.main() if __name__ == '__main__': diff --git a/SkeinPyPy/SkeinforgeVersion b/Cura/cura_sf/SkeinforgeVersion similarity index 100% rename from SkeinPyPy/SkeinforgeVersion rename to Cura/cura_sf/SkeinforgeVersion diff --git a/SkeinPyPy/skeinforge_application/__init__.py b/Cura/cura_sf/__init__.py similarity index 100% rename from SkeinPyPy/skeinforge_application/__init__.py rename to Cura/cura_sf/__init__.py diff --git a/SkeinPyPy/fabmetheus_utilities/__init__.py b/Cura/cura_sf/fabmetheus_utilities/__init__.py similarity index 100% rename from SkeinPyPy/fabmetheus_utilities/__init__.py rename to Cura/cura_sf/fabmetheus_utilities/__init__.py diff --git a/SkeinPyPy/fabmetheus_utilities/archive.py b/Cura/cura_sf/fabmetheus_utilities/archive.py similarity index 100% rename from SkeinPyPy/fabmetheus_utilities/archive.py rename to Cura/cura_sf/fabmetheus_utilities/archive.py diff --git a/SkeinPyPy/fabmetheus_utilities/euclidean.py b/Cura/cura_sf/fabmetheus_utilities/euclidean.py similarity index 100% rename from SkeinPyPy/fabmetheus_utilities/euclidean.py rename to Cura/cura_sf/fabmetheus_utilities/euclidean.py diff --git a/SkeinPyPy/fabmetheus_utilities/fabmetheus_tools/__init__.py b/Cura/cura_sf/fabmetheus_utilities/fabmetheus_tools/__init__.py similarity index 100% rename from SkeinPyPy/fabmetheus_utilities/fabmetheus_tools/__init__.py rename to Cura/cura_sf/fabmetheus_utilities/fabmetheus_tools/__init__.py diff --git a/SkeinPyPy/fabmetheus_utilities/fabmetheus_tools/alphabetize.py b/Cura/cura_sf/fabmetheus_utilities/fabmetheus_tools/alphabetize.py similarity index 100% rename from SkeinPyPy/fabmetheus_utilities/fabmetheus_tools/alphabetize.py rename to Cura/cura_sf/fabmetheus_utilities/fabmetheus_tools/alphabetize.py diff --git a/SkeinPyPy/fabmetheus_utilities/fabmetheus_tools/fabmetheus_interpret.py b/Cura/cura_sf/fabmetheus_utilities/fabmetheus_tools/fabmetheus_interpret.py similarity index 100% rename from SkeinPyPy/fabmetheus_utilities/fabmetheus_tools/fabmetheus_interpret.py rename to Cura/cura_sf/fabmetheus_utilities/fabmetheus_tools/fabmetheus_interpret.py diff --git a/SkeinPyPy/fabmetheus_utilities/fabmetheus_tools/interpret_plugins/__init__.py b/Cura/cura_sf/fabmetheus_utilities/fabmetheus_tools/interpret_plugins/__init__.py similarity index 100% rename from SkeinPyPy/fabmetheus_utilities/fabmetheus_tools/interpret_plugins/__init__.py rename to Cura/cura_sf/fabmetheus_utilities/fabmetheus_tools/interpret_plugins/__init__.py diff --git a/SkeinPyPy/fabmetheus_utilities/fabmetheus_tools/interpret_plugins/csv.py b/Cura/cura_sf/fabmetheus_utilities/fabmetheus_tools/interpret_plugins/csv.py similarity index 100% rename from SkeinPyPy/fabmetheus_utilities/fabmetheus_tools/interpret_plugins/csv.py rename to Cura/cura_sf/fabmetheus_utilities/fabmetheus_tools/interpret_plugins/csv.py diff --git a/SkeinPyPy/fabmetheus_utilities/fabmetheus_tools/interpret_plugins/gts.py b/Cura/cura_sf/fabmetheus_utilities/fabmetheus_tools/interpret_plugins/gts.py similarity index 100% rename from SkeinPyPy/fabmetheus_utilities/fabmetheus_tools/interpret_plugins/gts.py rename to Cura/cura_sf/fabmetheus_utilities/fabmetheus_tools/interpret_plugins/gts.py diff --git a/SkeinPyPy/fabmetheus_utilities/fabmetheus_tools/interpret_plugins/obj.py b/Cura/cura_sf/fabmetheus_utilities/fabmetheus_tools/interpret_plugins/obj.py similarity index 100% rename from SkeinPyPy/fabmetheus_utilities/fabmetheus_tools/interpret_plugins/obj.py rename to Cura/cura_sf/fabmetheus_utilities/fabmetheus_tools/interpret_plugins/obj.py diff --git a/SkeinPyPy/fabmetheus_utilities/fabmetheus_tools/interpret_plugins/slc.py b/Cura/cura_sf/fabmetheus_utilities/fabmetheus_tools/interpret_plugins/slc.py similarity index 100% rename from SkeinPyPy/fabmetheus_utilities/fabmetheus_tools/interpret_plugins/slc.py rename to Cura/cura_sf/fabmetheus_utilities/fabmetheus_tools/interpret_plugins/slc.py diff --git a/SkeinPyPy/fabmetheus_utilities/fabmetheus_tools/interpret_plugins/stl.py b/Cura/cura_sf/fabmetheus_utilities/fabmetheus_tools/interpret_plugins/stl.py similarity index 100% rename from SkeinPyPy/fabmetheus_utilities/fabmetheus_tools/interpret_plugins/stl.py rename to Cura/cura_sf/fabmetheus_utilities/fabmetheus_tools/interpret_plugins/stl.py diff --git a/SkeinPyPy/fabmetheus_utilities/fabmetheus_tools/interpret_plugins/svg.py b/Cura/cura_sf/fabmetheus_utilities/fabmetheus_tools/interpret_plugins/svg.py similarity index 100% rename from SkeinPyPy/fabmetheus_utilities/fabmetheus_tools/interpret_plugins/svg.py rename to Cura/cura_sf/fabmetheus_utilities/fabmetheus_tools/interpret_plugins/svg.py diff --git a/SkeinPyPy/fabmetheus_utilities/fabmetheus_tools/prepare.py b/Cura/cura_sf/fabmetheus_utilities/fabmetheus_tools/prepare.py similarity index 100% rename from SkeinPyPy/fabmetheus_utilities/fabmetheus_tools/prepare.py rename to Cura/cura_sf/fabmetheus_utilities/fabmetheus_tools/prepare.py diff --git a/SkeinPyPy/fabmetheus_utilities/fabmetheus_tools/wikifier.py b/Cura/cura_sf/fabmetheus_utilities/fabmetheus_tools/wikifier.py similarity index 100% rename from SkeinPyPy/fabmetheus_utilities/fabmetheus_tools/wikifier.py rename to Cura/cura_sf/fabmetheus_utilities/fabmetheus_tools/wikifier.py diff --git a/SkeinPyPy/fabmetheus_utilities/gcodec.py b/Cura/cura_sf/fabmetheus_utilities/gcodec.py similarity index 100% rename from SkeinPyPy/fabmetheus_utilities/gcodec.py rename to Cura/cura_sf/fabmetheus_utilities/gcodec.py diff --git a/SkeinPyPy/fabmetheus_utilities/geometry/__init__.py b/Cura/cura_sf/fabmetheus_utilities/geometry/__init__.py similarity index 100% rename from SkeinPyPy/fabmetheus_utilities/geometry/__init__.py rename to Cura/cura_sf/fabmetheus_utilities/geometry/__init__.py diff --git a/SkeinPyPy/fabmetheus_utilities/geometry/creation/__init__.py b/Cura/cura_sf/fabmetheus_utilities/geometry/creation/__init__.py similarity index 100% rename from SkeinPyPy/fabmetheus_utilities/geometry/creation/__init__.py rename to Cura/cura_sf/fabmetheus_utilities/geometry/creation/__init__.py diff --git a/SkeinPyPy/fabmetheus_utilities/geometry/creation/_drill.py b/Cura/cura_sf/fabmetheus_utilities/geometry/creation/_drill.py similarity index 100% rename from SkeinPyPy/fabmetheus_utilities/geometry/creation/_drill.py rename to Cura/cura_sf/fabmetheus_utilities/geometry/creation/_drill.py diff --git a/SkeinPyPy/fabmetheus_utilities/geometry/creation/_svg.py b/Cura/cura_sf/fabmetheus_utilities/geometry/creation/_svg.py similarity index 100% rename from SkeinPyPy/fabmetheus_utilities/geometry/creation/_svg.py rename to Cura/cura_sf/fabmetheus_utilities/geometry/creation/_svg.py diff --git a/SkeinPyPy/fabmetheus_utilities/geometry/creation/circle.py b/Cura/cura_sf/fabmetheus_utilities/geometry/creation/circle.py similarity index 100% rename from SkeinPyPy/fabmetheus_utilities/geometry/creation/circle.py rename to Cura/cura_sf/fabmetheus_utilities/geometry/creation/circle.py diff --git a/SkeinPyPy/fabmetheus_utilities/geometry/creation/concatenate.py b/Cura/cura_sf/fabmetheus_utilities/geometry/creation/concatenate.py similarity index 100% rename from SkeinPyPy/fabmetheus_utilities/geometry/creation/concatenate.py rename to Cura/cura_sf/fabmetheus_utilities/geometry/creation/concatenate.py diff --git a/SkeinPyPy/fabmetheus_utilities/geometry/creation/extrude.py b/Cura/cura_sf/fabmetheus_utilities/geometry/creation/extrude.py similarity index 100% rename from SkeinPyPy/fabmetheus_utilities/geometry/creation/extrude.py rename to Cura/cura_sf/fabmetheus_utilities/geometry/creation/extrude.py diff --git a/SkeinPyPy/fabmetheus_utilities/geometry/creation/gear.py b/Cura/cura_sf/fabmetheus_utilities/geometry/creation/gear.py similarity index 100% rename from SkeinPyPy/fabmetheus_utilities/geometry/creation/gear.py rename to Cura/cura_sf/fabmetheus_utilities/geometry/creation/gear.py diff --git a/SkeinPyPy/fabmetheus_utilities/geometry/creation/grid.py b/Cura/cura_sf/fabmetheus_utilities/geometry/creation/grid.py similarity index 100% rename from SkeinPyPy/fabmetheus_utilities/geometry/creation/grid.py rename to Cura/cura_sf/fabmetheus_utilities/geometry/creation/grid.py diff --git a/SkeinPyPy/fabmetheus_utilities/geometry/creation/heightmap.py b/Cura/cura_sf/fabmetheus_utilities/geometry/creation/heightmap.py similarity index 100% rename from SkeinPyPy/fabmetheus_utilities/geometry/creation/heightmap.py rename to Cura/cura_sf/fabmetheus_utilities/geometry/creation/heightmap.py diff --git a/SkeinPyPy/fabmetheus_utilities/geometry/creation/lathe.py b/Cura/cura_sf/fabmetheus_utilities/geometry/creation/lathe.py similarity index 100% rename from SkeinPyPy/fabmetheus_utilities/geometry/creation/lathe.py rename to Cura/cura_sf/fabmetheus_utilities/geometry/creation/lathe.py diff --git a/SkeinPyPy/fabmetheus_utilities/geometry/creation/line.py b/Cura/cura_sf/fabmetheus_utilities/geometry/creation/line.py similarity index 100% rename from SkeinPyPy/fabmetheus_utilities/geometry/creation/line.py rename to Cura/cura_sf/fabmetheus_utilities/geometry/creation/line.py diff --git a/SkeinPyPy/fabmetheus_utilities/geometry/creation/linear_bearing_cage.py b/Cura/cura_sf/fabmetheus_utilities/geometry/creation/linear_bearing_cage.py similarity index 100% rename from SkeinPyPy/fabmetheus_utilities/geometry/creation/linear_bearing_cage.py rename to Cura/cura_sf/fabmetheus_utilities/geometry/creation/linear_bearing_cage.py diff --git a/SkeinPyPy/fabmetheus_utilities/geometry/creation/lineation.py b/Cura/cura_sf/fabmetheus_utilities/geometry/creation/lineation.py similarity index 100% rename from SkeinPyPy/fabmetheus_utilities/geometry/creation/lineation.py rename to Cura/cura_sf/fabmetheus_utilities/geometry/creation/lineation.py diff --git a/SkeinPyPy/fabmetheus_utilities/geometry/creation/mechaslab.py b/Cura/cura_sf/fabmetheus_utilities/geometry/creation/mechaslab.py similarity index 100% rename from SkeinPyPy/fabmetheus_utilities/geometry/creation/mechaslab.py rename to Cura/cura_sf/fabmetheus_utilities/geometry/creation/mechaslab.py diff --git a/SkeinPyPy/fabmetheus_utilities/geometry/creation/peg.py b/Cura/cura_sf/fabmetheus_utilities/geometry/creation/peg.py similarity index 100% rename from SkeinPyPy/fabmetheus_utilities/geometry/creation/peg.py rename to Cura/cura_sf/fabmetheus_utilities/geometry/creation/peg.py diff --git a/SkeinPyPy/fabmetheus_utilities/geometry/creation/polygon.py b/Cura/cura_sf/fabmetheus_utilities/geometry/creation/polygon.py similarity index 100% rename from SkeinPyPy/fabmetheus_utilities/geometry/creation/polygon.py rename to Cura/cura_sf/fabmetheus_utilities/geometry/creation/polygon.py diff --git a/SkeinPyPy/fabmetheus_utilities/geometry/creation/shaft.py b/Cura/cura_sf/fabmetheus_utilities/geometry/creation/shaft.py similarity index 100% rename from SkeinPyPy/fabmetheus_utilities/geometry/creation/shaft.py rename to Cura/cura_sf/fabmetheus_utilities/geometry/creation/shaft.py diff --git a/SkeinPyPy/fabmetheus_utilities/geometry/creation/solid.py b/Cura/cura_sf/fabmetheus_utilities/geometry/creation/solid.py similarity index 100% rename from SkeinPyPy/fabmetheus_utilities/geometry/creation/solid.py rename to Cura/cura_sf/fabmetheus_utilities/geometry/creation/solid.py diff --git a/SkeinPyPy/fabmetheus_utilities/geometry/creation/sponge_slice.py b/Cura/cura_sf/fabmetheus_utilities/geometry/creation/sponge_slice.py similarity index 100% rename from SkeinPyPy/fabmetheus_utilities/geometry/creation/sponge_slice.py rename to Cura/cura_sf/fabmetheus_utilities/geometry/creation/sponge_slice.py diff --git a/SkeinPyPy/fabmetheus_utilities/geometry/creation/square.py b/Cura/cura_sf/fabmetheus_utilities/geometry/creation/square.py similarity index 100% rename from SkeinPyPy/fabmetheus_utilities/geometry/creation/square.py rename to Cura/cura_sf/fabmetheus_utilities/geometry/creation/square.py diff --git a/SkeinPyPy/fabmetheus_utilities/geometry/creation/teardrop.py b/Cura/cura_sf/fabmetheus_utilities/geometry/creation/teardrop.py similarity index 100% rename from SkeinPyPy/fabmetheus_utilities/geometry/creation/teardrop.py rename to Cura/cura_sf/fabmetheus_utilities/geometry/creation/teardrop.py diff --git a/SkeinPyPy/fabmetheus_utilities/geometry/creation/text.py b/Cura/cura_sf/fabmetheus_utilities/geometry/creation/text.py similarity index 100% rename from SkeinPyPy/fabmetheus_utilities/geometry/creation/text.py rename to Cura/cura_sf/fabmetheus_utilities/geometry/creation/text.py diff --git a/SkeinPyPy/fabmetheus_utilities/geometry/geometry_tools/__init__.py b/Cura/cura_sf/fabmetheus_utilities/geometry/geometry_tools/__init__.py similarity index 100% rename from SkeinPyPy/fabmetheus_utilities/geometry/geometry_tools/__init__.py rename to Cura/cura_sf/fabmetheus_utilities/geometry/geometry_tools/__init__.py diff --git a/SkeinPyPy/fabmetheus_utilities/geometry/geometry_tools/dictionary.py b/Cura/cura_sf/fabmetheus_utilities/geometry/geometry_tools/dictionary.py similarity index 100% rename from SkeinPyPy/fabmetheus_utilities/geometry/geometry_tools/dictionary.py rename to Cura/cura_sf/fabmetheus_utilities/geometry/geometry_tools/dictionary.py diff --git a/SkeinPyPy/fabmetheus_utilities/geometry/geometry_tools/face.py b/Cura/cura_sf/fabmetheus_utilities/geometry/geometry_tools/face.py similarity index 100% rename from SkeinPyPy/fabmetheus_utilities/geometry/geometry_tools/face.py rename to Cura/cura_sf/fabmetheus_utilities/geometry/geometry_tools/face.py diff --git a/SkeinPyPy/fabmetheus_utilities/geometry/geometry_tools/path.py b/Cura/cura_sf/fabmetheus_utilities/geometry/geometry_tools/path.py similarity index 100% rename from SkeinPyPy/fabmetheus_utilities/geometry/geometry_tools/path.py rename to Cura/cura_sf/fabmetheus_utilities/geometry/geometry_tools/path.py diff --git a/SkeinPyPy/fabmetheus_utilities/geometry/geometry_tools/path_elements/__init__.py b/Cura/cura_sf/fabmetheus_utilities/geometry/geometry_tools/path_elements/__init__.py similarity index 100% rename from SkeinPyPy/fabmetheus_utilities/geometry/geometry_tools/path_elements/__init__.py rename to Cura/cura_sf/fabmetheus_utilities/geometry/geometry_tools/path_elements/__init__.py diff --git a/SkeinPyPy/fabmetheus_utilities/geometry/geometry_tools/path_elements/arc.py b/Cura/cura_sf/fabmetheus_utilities/geometry/geometry_tools/path_elements/arc.py similarity index 100% rename from SkeinPyPy/fabmetheus_utilities/geometry/geometry_tools/path_elements/arc.py rename to Cura/cura_sf/fabmetheus_utilities/geometry/geometry_tools/path_elements/arc.py diff --git a/SkeinPyPy/fabmetheus_utilities/geometry/geometry_tools/path_elements/cubic.py b/Cura/cura_sf/fabmetheus_utilities/geometry/geometry_tools/path_elements/cubic.py similarity index 100% rename from SkeinPyPy/fabmetheus_utilities/geometry/geometry_tools/path_elements/cubic.py rename to Cura/cura_sf/fabmetheus_utilities/geometry/geometry_tools/path_elements/cubic.py diff --git a/SkeinPyPy/fabmetheus_utilities/geometry/geometry_tools/path_elements/quadratic.py b/Cura/cura_sf/fabmetheus_utilities/geometry/geometry_tools/path_elements/quadratic.py similarity index 100% rename from SkeinPyPy/fabmetheus_utilities/geometry/geometry_tools/path_elements/quadratic.py rename to Cura/cura_sf/fabmetheus_utilities/geometry/geometry_tools/path_elements/quadratic.py diff --git a/SkeinPyPy/fabmetheus_utilities/geometry/geometry_tools/vertex.py b/Cura/cura_sf/fabmetheus_utilities/geometry/geometry_tools/vertex.py similarity index 100% rename from SkeinPyPy/fabmetheus_utilities/geometry/geometry_tools/vertex.py rename to Cura/cura_sf/fabmetheus_utilities/geometry/geometry_tools/vertex.py diff --git a/SkeinPyPy/fabmetheus_utilities/geometry/geometry_utilities/__init__.py b/Cura/cura_sf/fabmetheus_utilities/geometry/geometry_utilities/__init__.py similarity index 100% rename from SkeinPyPy/fabmetheus_utilities/geometry/geometry_utilities/__init__.py rename to Cura/cura_sf/fabmetheus_utilities/geometry/geometry_utilities/__init__.py diff --git a/SkeinPyPy/fabmetheus_utilities/geometry/geometry_utilities/boolean_geometry.py b/Cura/cura_sf/fabmetheus_utilities/geometry/geometry_utilities/boolean_geometry.py similarity index 100% rename from SkeinPyPy/fabmetheus_utilities/geometry/geometry_utilities/boolean_geometry.py rename to Cura/cura_sf/fabmetheus_utilities/geometry/geometry_utilities/boolean_geometry.py diff --git a/SkeinPyPy/fabmetheus_utilities/geometry/geometry_utilities/boolean_solid.py b/Cura/cura_sf/fabmetheus_utilities/geometry/geometry_utilities/boolean_solid.py similarity index 100% rename from SkeinPyPy/fabmetheus_utilities/geometry/geometry_utilities/boolean_solid.py rename to Cura/cura_sf/fabmetheus_utilities/geometry/geometry_utilities/boolean_solid.py diff --git a/SkeinPyPy/fabmetheus_utilities/geometry/geometry_utilities/evaluate.py b/Cura/cura_sf/fabmetheus_utilities/geometry/geometry_utilities/evaluate.py similarity index 100% rename from SkeinPyPy/fabmetheus_utilities/geometry/geometry_utilities/evaluate.py rename to Cura/cura_sf/fabmetheus_utilities/geometry/geometry_utilities/evaluate.py diff --git a/SkeinPyPy/fabmetheus_utilities/geometry/geometry_utilities/evaluate_elements/__init__.py b/Cura/cura_sf/fabmetheus_utilities/geometry/geometry_utilities/evaluate_elements/__init__.py similarity index 100% rename from SkeinPyPy/fabmetheus_utilities/geometry/geometry_utilities/evaluate_elements/__init__.py rename to Cura/cura_sf/fabmetheus_utilities/geometry/geometry_utilities/evaluate_elements/__init__.py diff --git a/SkeinPyPy/fabmetheus_utilities/geometry/geometry_utilities/evaluate_elements/creation.py b/Cura/cura_sf/fabmetheus_utilities/geometry/geometry_utilities/evaluate_elements/creation.py similarity index 100% rename from SkeinPyPy/fabmetheus_utilities/geometry/geometry_utilities/evaluate_elements/creation.py rename to Cura/cura_sf/fabmetheus_utilities/geometry/geometry_utilities/evaluate_elements/creation.py diff --git a/SkeinPyPy/fabmetheus_utilities/geometry/geometry_utilities/evaluate_elements/document.py b/Cura/cura_sf/fabmetheus_utilities/geometry/geometry_utilities/evaluate_elements/document.py similarity index 100% rename from SkeinPyPy/fabmetheus_utilities/geometry/geometry_utilities/evaluate_elements/document.py rename to Cura/cura_sf/fabmetheus_utilities/geometry/geometry_utilities/evaluate_elements/document.py diff --git a/SkeinPyPy/fabmetheus_utilities/geometry/geometry_utilities/evaluate_elements/setting.py b/Cura/cura_sf/fabmetheus_utilities/geometry/geometry_utilities/evaluate_elements/setting.py similarity index 100% rename from SkeinPyPy/fabmetheus_utilities/geometry/geometry_utilities/evaluate_elements/setting.py rename to Cura/cura_sf/fabmetheus_utilities/geometry/geometry_utilities/evaluate_elements/setting.py diff --git a/SkeinPyPy/fabmetheus_utilities/geometry/geometry_utilities/evaluate_enumerables/__init__.py b/Cura/cura_sf/fabmetheus_utilities/geometry/geometry_utilities/evaluate_enumerables/__init__.py similarity index 100% rename from SkeinPyPy/fabmetheus_utilities/geometry/geometry_utilities/evaluate_enumerables/__init__.py rename to Cura/cura_sf/fabmetheus_utilities/geometry/geometry_utilities/evaluate_enumerables/__init__.py diff --git a/SkeinPyPy/fabmetheus_utilities/geometry/geometry_utilities/evaluate_enumerables/dictionary_attribute.py b/Cura/cura_sf/fabmetheus_utilities/geometry/geometry_utilities/evaluate_enumerables/dictionary_attribute.py similarity index 100% rename from SkeinPyPy/fabmetheus_utilities/geometry/geometry_utilities/evaluate_enumerables/dictionary_attribute.py rename to Cura/cura_sf/fabmetheus_utilities/geometry/geometry_utilities/evaluate_enumerables/dictionary_attribute.py diff --git a/SkeinPyPy/fabmetheus_utilities/geometry/geometry_utilities/evaluate_enumerables/list_attribute.py b/Cura/cura_sf/fabmetheus_utilities/geometry/geometry_utilities/evaluate_enumerables/list_attribute.py similarity index 100% rename from SkeinPyPy/fabmetheus_utilities/geometry/geometry_utilities/evaluate_enumerables/list_attribute.py rename to Cura/cura_sf/fabmetheus_utilities/geometry/geometry_utilities/evaluate_enumerables/list_attribute.py diff --git a/SkeinPyPy/fabmetheus_utilities/geometry/geometry_utilities/evaluate_enumerables/string_attribute.py b/Cura/cura_sf/fabmetheus_utilities/geometry/geometry_utilities/evaluate_enumerables/string_attribute.py similarity index 100% rename from SkeinPyPy/fabmetheus_utilities/geometry/geometry_utilities/evaluate_enumerables/string_attribute.py rename to Cura/cura_sf/fabmetheus_utilities/geometry/geometry_utilities/evaluate_enumerables/string_attribute.py diff --git a/SkeinPyPy/fabmetheus_utilities/geometry/geometry_utilities/evaluate_fundamentals/__init__.py b/Cura/cura_sf/fabmetheus_utilities/geometry/geometry_utilities/evaluate_fundamentals/__init__.py similarity index 100% rename from SkeinPyPy/fabmetheus_utilities/geometry/geometry_utilities/evaluate_fundamentals/__init__.py rename to Cura/cura_sf/fabmetheus_utilities/geometry/geometry_utilities/evaluate_fundamentals/__init__.py diff --git a/SkeinPyPy/fabmetheus_utilities/geometry/geometry_utilities/evaluate_fundamentals/_math.py b/Cura/cura_sf/fabmetheus_utilities/geometry/geometry_utilities/evaluate_fundamentals/_math.py similarity index 100% rename from SkeinPyPy/fabmetheus_utilities/geometry/geometry_utilities/evaluate_fundamentals/_math.py rename to Cura/cura_sf/fabmetheus_utilities/geometry/geometry_utilities/evaluate_fundamentals/_math.py diff --git a/SkeinPyPy/fabmetheus_utilities/geometry/geometry_utilities/evaluate_fundamentals/euclid.py b/Cura/cura_sf/fabmetheus_utilities/geometry/geometry_utilities/evaluate_fundamentals/euclid.py similarity index 100% rename from SkeinPyPy/fabmetheus_utilities/geometry/geometry_utilities/evaluate_fundamentals/euclid.py rename to Cura/cura_sf/fabmetheus_utilities/geometry/geometry_utilities/evaluate_fundamentals/euclid.py diff --git a/SkeinPyPy/fabmetheus_utilities/geometry/geometry_utilities/evaluate_fundamentals/measure.py b/Cura/cura_sf/fabmetheus_utilities/geometry/geometry_utilities/evaluate_fundamentals/measure.py similarity index 100% rename from SkeinPyPy/fabmetheus_utilities/geometry/geometry_utilities/evaluate_fundamentals/measure.py rename to Cura/cura_sf/fabmetheus_utilities/geometry/geometry_utilities/evaluate_fundamentals/measure.py diff --git a/SkeinPyPy/fabmetheus_utilities/geometry/geometry_utilities/evaluate_fundamentals/print.py b/Cura/cura_sf/fabmetheus_utilities/geometry/geometry_utilities/evaluate_fundamentals/print.py similarity index 100% rename from SkeinPyPy/fabmetheus_utilities/geometry/geometry_utilities/evaluate_fundamentals/print.py rename to Cura/cura_sf/fabmetheus_utilities/geometry/geometry_utilities/evaluate_fundamentals/print.py diff --git a/SkeinPyPy/fabmetheus_utilities/geometry/geometry_utilities/example.csv b/Cura/cura_sf/fabmetheus_utilities/geometry/geometry_utilities/example.csv similarity index 100% rename from SkeinPyPy/fabmetheus_utilities/geometry/geometry_utilities/example.csv rename to Cura/cura_sf/fabmetheus_utilities/geometry/geometry_utilities/example.csv diff --git a/SkeinPyPy/fabmetheus_utilities/geometry/geometry_utilities/matrix.py b/Cura/cura_sf/fabmetheus_utilities/geometry/geometry_utilities/matrix.py similarity index 100% rename from SkeinPyPy/fabmetheus_utilities/geometry/geometry_utilities/matrix.py rename to Cura/cura_sf/fabmetheus_utilities/geometry/geometry_utilities/matrix.py diff --git a/SkeinPyPy/fabmetheus_utilities/geometry/manipulation_matrix/__init__.py b/Cura/cura_sf/fabmetheus_utilities/geometry/manipulation_matrix/__init__.py similarity index 100% rename from SkeinPyPy/fabmetheus_utilities/geometry/manipulation_matrix/__init__.py rename to Cura/cura_sf/fabmetheus_utilities/geometry/manipulation_matrix/__init__.py diff --git a/SkeinPyPy/fabmetheus_utilities/geometry/manipulation_matrix/_scale.py b/Cura/cura_sf/fabmetheus_utilities/geometry/manipulation_matrix/_scale.py similarity index 100% rename from SkeinPyPy/fabmetheus_utilities/geometry/manipulation_matrix/_scale.py rename to Cura/cura_sf/fabmetheus_utilities/geometry/manipulation_matrix/_scale.py diff --git a/SkeinPyPy/fabmetheus_utilities/geometry/manipulation_matrix/rotate.py b/Cura/cura_sf/fabmetheus_utilities/geometry/manipulation_matrix/rotate.py similarity index 100% rename from SkeinPyPy/fabmetheus_utilities/geometry/manipulation_matrix/rotate.py rename to Cura/cura_sf/fabmetheus_utilities/geometry/manipulation_matrix/rotate.py diff --git a/SkeinPyPy/fabmetheus_utilities/geometry/manipulation_matrix/transform.py b/Cura/cura_sf/fabmetheus_utilities/geometry/manipulation_matrix/transform.py similarity index 100% rename from SkeinPyPy/fabmetheus_utilities/geometry/manipulation_matrix/transform.py rename to Cura/cura_sf/fabmetheus_utilities/geometry/manipulation_matrix/transform.py diff --git a/SkeinPyPy/fabmetheus_utilities/geometry/manipulation_matrix/translate.py b/Cura/cura_sf/fabmetheus_utilities/geometry/manipulation_matrix/translate.py similarity index 100% rename from SkeinPyPy/fabmetheus_utilities/geometry/manipulation_matrix/translate.py rename to Cura/cura_sf/fabmetheus_utilities/geometry/manipulation_matrix/translate.py diff --git a/SkeinPyPy/fabmetheus_utilities/geometry/manipulation_meta/__init__.py b/Cura/cura_sf/fabmetheus_utilities/geometry/manipulation_meta/__init__.py similarity index 100% rename from SkeinPyPy/fabmetheus_utilities/geometry/manipulation_meta/__init__.py rename to Cura/cura_sf/fabmetheus_utilities/geometry/manipulation_meta/__init__.py diff --git a/SkeinPyPy/fabmetheus_utilities/geometry/manipulation_meta/_array.py b/Cura/cura_sf/fabmetheus_utilities/geometry/manipulation_meta/_array.py similarity index 100% rename from SkeinPyPy/fabmetheus_utilities/geometry/manipulation_meta/_array.py rename to Cura/cura_sf/fabmetheus_utilities/geometry/manipulation_meta/_array.py diff --git a/SkeinPyPy/fabmetheus_utilities/geometry/manipulation_meta/_carve.py b/Cura/cura_sf/fabmetheus_utilities/geometry/manipulation_meta/_carve.py similarity index 100% rename from SkeinPyPy/fabmetheus_utilities/geometry/manipulation_meta/_carve.py rename to Cura/cura_sf/fabmetheus_utilities/geometry/manipulation_meta/_carve.py diff --git a/SkeinPyPy/fabmetheus_utilities/geometry/manipulation_meta/_copy.py b/Cura/cura_sf/fabmetheus_utilities/geometry/manipulation_meta/_copy.py similarity index 100% rename from SkeinPyPy/fabmetheus_utilities/geometry/manipulation_meta/_copy.py rename to Cura/cura_sf/fabmetheus_utilities/geometry/manipulation_meta/_copy.py diff --git a/SkeinPyPy/fabmetheus_utilities/geometry/manipulation_meta/disjoin.py b/Cura/cura_sf/fabmetheus_utilities/geometry/manipulation_meta/disjoin.py similarity index 100% rename from SkeinPyPy/fabmetheus_utilities/geometry/manipulation_meta/disjoin.py rename to Cura/cura_sf/fabmetheus_utilities/geometry/manipulation_meta/disjoin.py diff --git a/SkeinPyPy/fabmetheus_utilities/geometry/manipulation_meta/import.py b/Cura/cura_sf/fabmetheus_utilities/geometry/manipulation_meta/import.py similarity index 100% rename from SkeinPyPy/fabmetheus_utilities/geometry/manipulation_meta/import.py rename to Cura/cura_sf/fabmetheus_utilities/geometry/manipulation_meta/import.py diff --git a/SkeinPyPy/fabmetheus_utilities/geometry/manipulation_meta/write.py b/Cura/cura_sf/fabmetheus_utilities/geometry/manipulation_meta/write.py similarity index 100% rename from SkeinPyPy/fabmetheus_utilities/geometry/manipulation_meta/write.py rename to Cura/cura_sf/fabmetheus_utilities/geometry/manipulation_meta/write.py diff --git a/SkeinPyPy/fabmetheus_utilities/geometry/manipulation_paths/__init__.py b/Cura/cura_sf/fabmetheus_utilities/geometry/manipulation_paths/__init__.py similarity index 100% rename from SkeinPyPy/fabmetheus_utilities/geometry/manipulation_paths/__init__.py rename to Cura/cura_sf/fabmetheus_utilities/geometry/manipulation_paths/__init__.py diff --git a/SkeinPyPy/fabmetheus_utilities/geometry/manipulation_paths/bevel.py b/Cura/cura_sf/fabmetheus_utilities/geometry/manipulation_paths/bevel.py similarity index 100% rename from SkeinPyPy/fabmetheus_utilities/geometry/manipulation_paths/bevel.py rename to Cura/cura_sf/fabmetheus_utilities/geometry/manipulation_paths/bevel.py diff --git a/SkeinPyPy/fabmetheus_utilities/geometry/manipulation_paths/convex.py b/Cura/cura_sf/fabmetheus_utilities/geometry/manipulation_paths/convex.py similarity index 100% rename from SkeinPyPy/fabmetheus_utilities/geometry/manipulation_paths/convex.py rename to Cura/cura_sf/fabmetheus_utilities/geometry/manipulation_paths/convex.py diff --git a/SkeinPyPy/fabmetheus_utilities/geometry/manipulation_paths/outline.py b/Cura/cura_sf/fabmetheus_utilities/geometry/manipulation_paths/outline.py similarity index 100% rename from SkeinPyPy/fabmetheus_utilities/geometry/manipulation_paths/outline.py rename to Cura/cura_sf/fabmetheus_utilities/geometry/manipulation_paths/outline.py diff --git a/SkeinPyPy/fabmetheus_utilities/geometry/manipulation_paths/overhang.py b/Cura/cura_sf/fabmetheus_utilities/geometry/manipulation_paths/overhang.py similarity index 100% rename from SkeinPyPy/fabmetheus_utilities/geometry/manipulation_paths/overhang.py rename to Cura/cura_sf/fabmetheus_utilities/geometry/manipulation_paths/overhang.py diff --git a/SkeinPyPy/fabmetheus_utilities/geometry/manipulation_paths/round.py b/Cura/cura_sf/fabmetheus_utilities/geometry/manipulation_paths/round.py similarity index 100% rename from SkeinPyPy/fabmetheus_utilities/geometry/manipulation_paths/round.py rename to Cura/cura_sf/fabmetheus_utilities/geometry/manipulation_paths/round.py diff --git a/SkeinPyPy/fabmetheus_utilities/geometry/manipulation_paths/segment.py b/Cura/cura_sf/fabmetheus_utilities/geometry/manipulation_paths/segment.py similarity index 100% rename from SkeinPyPy/fabmetheus_utilities/geometry/manipulation_paths/segment.py rename to Cura/cura_sf/fabmetheus_utilities/geometry/manipulation_paths/segment.py diff --git a/SkeinPyPy/fabmetheus_utilities/geometry/manipulation_paths/wedge.py b/Cura/cura_sf/fabmetheus_utilities/geometry/manipulation_paths/wedge.py similarity index 100% rename from SkeinPyPy/fabmetheus_utilities/geometry/manipulation_paths/wedge.py rename to Cura/cura_sf/fabmetheus_utilities/geometry/manipulation_paths/wedge.py diff --git a/SkeinPyPy/fabmetheus_utilities/geometry/manipulation_shapes/__init__.py b/Cura/cura_sf/fabmetheus_utilities/geometry/manipulation_shapes/__init__.py similarity index 100% rename from SkeinPyPy/fabmetheus_utilities/geometry/manipulation_shapes/__init__.py rename to Cura/cura_sf/fabmetheus_utilities/geometry/manipulation_shapes/__init__.py diff --git a/SkeinPyPy/fabmetheus_utilities/geometry/manipulation_shapes/_bottom.py b/Cura/cura_sf/fabmetheus_utilities/geometry/manipulation_shapes/_bottom.py similarity index 100% rename from SkeinPyPy/fabmetheus_utilities/geometry/manipulation_shapes/_bottom.py rename to Cura/cura_sf/fabmetheus_utilities/geometry/manipulation_shapes/_bottom.py diff --git a/SkeinPyPy/fabmetheus_utilities/geometry/manipulation_shapes/_inset.py b/Cura/cura_sf/fabmetheus_utilities/geometry/manipulation_shapes/_inset.py similarity index 100% rename from SkeinPyPy/fabmetheus_utilities/geometry/manipulation_shapes/_inset.py rename to Cura/cura_sf/fabmetheus_utilities/geometry/manipulation_shapes/_inset.py diff --git a/SkeinPyPy/fabmetheus_utilities/geometry/manipulation_shapes/_outset.py b/Cura/cura_sf/fabmetheus_utilities/geometry/manipulation_shapes/_outset.py similarity index 100% rename from SkeinPyPy/fabmetheus_utilities/geometry/manipulation_shapes/_outset.py rename to Cura/cura_sf/fabmetheus_utilities/geometry/manipulation_shapes/_outset.py diff --git a/SkeinPyPy/fabmetheus_utilities/geometry/manipulation_shapes/equation.py b/Cura/cura_sf/fabmetheus_utilities/geometry/manipulation_shapes/equation.py similarity index 100% rename from SkeinPyPy/fabmetheus_utilities/geometry/manipulation_shapes/equation.py rename to Cura/cura_sf/fabmetheus_utilities/geometry/manipulation_shapes/equation.py diff --git a/SkeinPyPy/fabmetheus_utilities/geometry/manipulation_shapes/flip.py b/Cura/cura_sf/fabmetheus_utilities/geometry/manipulation_shapes/flip.py similarity index 100% rename from SkeinPyPy/fabmetheus_utilities/geometry/manipulation_shapes/flip.py rename to Cura/cura_sf/fabmetheus_utilities/geometry/manipulation_shapes/flip.py diff --git a/SkeinPyPy/fabmetheus_utilities/geometry/manipulation_shapes/mirror.py b/Cura/cura_sf/fabmetheus_utilities/geometry/manipulation_shapes/mirror.py similarity index 100% rename from SkeinPyPy/fabmetheus_utilities/geometry/manipulation_shapes/mirror.py rename to Cura/cura_sf/fabmetheus_utilities/geometry/manipulation_shapes/mirror.py diff --git a/SkeinPyPy/fabmetheus_utilities/geometry/solids/__init__.py b/Cura/cura_sf/fabmetheus_utilities/geometry/solids/__init__.py similarity index 100% rename from SkeinPyPy/fabmetheus_utilities/geometry/solids/__init__.py rename to Cura/cura_sf/fabmetheus_utilities/geometry/solids/__init__.py diff --git a/SkeinPyPy/fabmetheus_utilities/geometry/solids/cube.py b/Cura/cura_sf/fabmetheus_utilities/geometry/solids/cube.py similarity index 100% rename from SkeinPyPy/fabmetheus_utilities/geometry/solids/cube.py rename to Cura/cura_sf/fabmetheus_utilities/geometry/solids/cube.py diff --git a/SkeinPyPy/fabmetheus_utilities/geometry/solids/cylinder.py b/Cura/cura_sf/fabmetheus_utilities/geometry/solids/cylinder.py similarity index 100% rename from SkeinPyPy/fabmetheus_utilities/geometry/solids/cylinder.py rename to Cura/cura_sf/fabmetheus_utilities/geometry/solids/cylinder.py diff --git a/SkeinPyPy/fabmetheus_utilities/geometry/solids/difference.py b/Cura/cura_sf/fabmetheus_utilities/geometry/solids/difference.py similarity index 100% rename from SkeinPyPy/fabmetheus_utilities/geometry/solids/difference.py rename to Cura/cura_sf/fabmetheus_utilities/geometry/solids/difference.py diff --git a/SkeinPyPy/fabmetheus_utilities/geometry/solids/group.py b/Cura/cura_sf/fabmetheus_utilities/geometry/solids/group.py similarity index 100% rename from SkeinPyPy/fabmetheus_utilities/geometry/solids/group.py rename to Cura/cura_sf/fabmetheus_utilities/geometry/solids/group.py diff --git a/SkeinPyPy/fabmetheus_utilities/geometry/solids/intersection.py b/Cura/cura_sf/fabmetheus_utilities/geometry/solids/intersection.py similarity index 100% rename from SkeinPyPy/fabmetheus_utilities/geometry/solids/intersection.py rename to Cura/cura_sf/fabmetheus_utilities/geometry/solids/intersection.py diff --git a/SkeinPyPy/fabmetheus_utilities/geometry/solids/sphere.py b/Cura/cura_sf/fabmetheus_utilities/geometry/solids/sphere.py similarity index 100% rename from SkeinPyPy/fabmetheus_utilities/geometry/solids/sphere.py rename to Cura/cura_sf/fabmetheus_utilities/geometry/solids/sphere.py diff --git a/SkeinPyPy/fabmetheus_utilities/geometry/solids/triangle_mesh.py b/Cura/cura_sf/fabmetheus_utilities/geometry/solids/triangle_mesh.py similarity index 100% rename from SkeinPyPy/fabmetheus_utilities/geometry/solids/triangle_mesh.py rename to Cura/cura_sf/fabmetheus_utilities/geometry/solids/triangle_mesh.py diff --git a/SkeinPyPy/fabmetheus_utilities/geometry/solids/union.py b/Cura/cura_sf/fabmetheus_utilities/geometry/solids/union.py similarity index 100% rename from SkeinPyPy/fabmetheus_utilities/geometry/solids/union.py rename to Cura/cura_sf/fabmetheus_utilities/geometry/solids/union.py diff --git a/SkeinPyPy/fabmetheus_utilities/geometry/statements/__init__.py b/Cura/cura_sf/fabmetheus_utilities/geometry/statements/__init__.py similarity index 100% rename from SkeinPyPy/fabmetheus_utilities/geometry/statements/__init__.py rename to Cura/cura_sf/fabmetheus_utilities/geometry/statements/__init__.py diff --git a/SkeinPyPy/fabmetheus_utilities/geometry/statements/_print.py b/Cura/cura_sf/fabmetheus_utilities/geometry/statements/_print.py similarity index 100% rename from SkeinPyPy/fabmetheus_utilities/geometry/statements/_print.py rename to Cura/cura_sf/fabmetheus_utilities/geometry/statements/_print.py diff --git a/SkeinPyPy/fabmetheus_utilities/geometry/statements/class.py b/Cura/cura_sf/fabmetheus_utilities/geometry/statements/class.py similarity index 100% rename from SkeinPyPy/fabmetheus_utilities/geometry/statements/class.py rename to Cura/cura_sf/fabmetheus_utilities/geometry/statements/class.py diff --git a/SkeinPyPy/fabmetheus_utilities/geometry/statements/elif.py b/Cura/cura_sf/fabmetheus_utilities/geometry/statements/elif.py similarity index 100% rename from SkeinPyPy/fabmetheus_utilities/geometry/statements/elif.py rename to Cura/cura_sf/fabmetheus_utilities/geometry/statements/elif.py diff --git a/SkeinPyPy/fabmetheus_utilities/geometry/statements/else.py b/Cura/cura_sf/fabmetheus_utilities/geometry/statements/else.py similarity index 100% rename from SkeinPyPy/fabmetheus_utilities/geometry/statements/else.py rename to Cura/cura_sf/fabmetheus_utilities/geometry/statements/else.py diff --git a/SkeinPyPy/fabmetheus_utilities/geometry/statements/for.py b/Cura/cura_sf/fabmetheus_utilities/geometry/statements/for.py similarity index 100% rename from SkeinPyPy/fabmetheus_utilities/geometry/statements/for.py rename to Cura/cura_sf/fabmetheus_utilities/geometry/statements/for.py diff --git a/SkeinPyPy/fabmetheus_utilities/geometry/statements/function.py b/Cura/cura_sf/fabmetheus_utilities/geometry/statements/function.py similarity index 100% rename from SkeinPyPy/fabmetheus_utilities/geometry/statements/function.py rename to Cura/cura_sf/fabmetheus_utilities/geometry/statements/function.py diff --git a/SkeinPyPy/fabmetheus_utilities/geometry/statements/if.py b/Cura/cura_sf/fabmetheus_utilities/geometry/statements/if.py similarity index 100% rename from SkeinPyPy/fabmetheus_utilities/geometry/statements/if.py rename to Cura/cura_sf/fabmetheus_utilities/geometry/statements/if.py diff --git a/SkeinPyPy/fabmetheus_utilities/geometry/statements/return.py b/Cura/cura_sf/fabmetheus_utilities/geometry/statements/return.py similarity index 100% rename from SkeinPyPy/fabmetheus_utilities/geometry/statements/return.py rename to Cura/cura_sf/fabmetheus_utilities/geometry/statements/return.py diff --git a/SkeinPyPy/fabmetheus_utilities/geometry/statements/statement.py b/Cura/cura_sf/fabmetheus_utilities/geometry/statements/statement.py similarity index 100% rename from SkeinPyPy/fabmetheus_utilities/geometry/statements/statement.py rename to Cura/cura_sf/fabmetheus_utilities/geometry/statements/statement.py diff --git a/SkeinPyPy/fabmetheus_utilities/geometry/statements/while.py b/Cura/cura_sf/fabmetheus_utilities/geometry/statements/while.py similarity index 100% rename from SkeinPyPy/fabmetheus_utilities/geometry/statements/while.py rename to Cura/cura_sf/fabmetheus_utilities/geometry/statements/while.py diff --git a/SkeinPyPy/fabmetheus_utilities/geometry_plugins/__init__.py b/Cura/cura_sf/fabmetheus_utilities/geometry_plugins/__init__.py similarity index 100% rename from SkeinPyPy/fabmetheus_utilities/geometry_plugins/__init__.py rename to Cura/cura_sf/fabmetheus_utilities/geometry_plugins/__init__.py diff --git a/SkeinPyPy/fabmetheus_utilities/geometry_plugins/creation/__init__.py b/Cura/cura_sf/fabmetheus_utilities/geometry_plugins/creation/__init__.py similarity index 100% rename from SkeinPyPy/fabmetheus_utilities/geometry_plugins/creation/__init__.py rename to Cura/cura_sf/fabmetheus_utilities/geometry_plugins/creation/__init__.py diff --git a/SkeinPyPy/fabmetheus_utilities/geometry_plugins/manipulation_matrix/__init__.py b/Cura/cura_sf/fabmetheus_utilities/geometry_plugins/manipulation_matrix/__init__.py similarity index 100% rename from SkeinPyPy/fabmetheus_utilities/geometry_plugins/manipulation_matrix/__init__.py rename to Cura/cura_sf/fabmetheus_utilities/geometry_plugins/manipulation_matrix/__init__.py diff --git a/SkeinPyPy/fabmetheus_utilities/geometry_plugins/manipulation_meta/__init__.py b/Cura/cura_sf/fabmetheus_utilities/geometry_plugins/manipulation_meta/__init__.py similarity index 100% rename from SkeinPyPy/fabmetheus_utilities/geometry_plugins/manipulation_meta/__init__.py rename to Cura/cura_sf/fabmetheus_utilities/geometry_plugins/manipulation_meta/__init__.py diff --git a/SkeinPyPy/fabmetheus_utilities/geometry_plugins/manipulation_paths/__init__.py b/Cura/cura_sf/fabmetheus_utilities/geometry_plugins/manipulation_paths/__init__.py similarity index 100% rename from SkeinPyPy/fabmetheus_utilities/geometry_plugins/manipulation_paths/__init__.py rename to Cura/cura_sf/fabmetheus_utilities/geometry_plugins/manipulation_paths/__init__.py diff --git a/SkeinPyPy/fabmetheus_utilities/geometry_plugins/manipulation_shapes/__init__.py b/Cura/cura_sf/fabmetheus_utilities/geometry_plugins/manipulation_shapes/__init__.py similarity index 100% rename from SkeinPyPy/fabmetheus_utilities/geometry_plugins/manipulation_shapes/__init__.py rename to Cura/cura_sf/fabmetheus_utilities/geometry_plugins/manipulation_shapes/__init__.py diff --git a/SkeinPyPy/fabmetheus_utilities/intercircle.py b/Cura/cura_sf/fabmetheus_utilities/intercircle.py similarity index 100% rename from SkeinPyPy/fabmetheus_utilities/intercircle.py rename to Cura/cura_sf/fabmetheus_utilities/intercircle.py diff --git a/SkeinPyPy/fabmetheus_utilities/settings.py b/Cura/cura_sf/fabmetheus_utilities/settings.py similarity index 88% rename from SkeinPyPy/fabmetheus_utilities/settings.py rename to Cura/cura_sf/fabmetheus_utilities/settings.py index 3c312b1647..aeb64c154c 100644 --- a/SkeinPyPy/fabmetheus_utilities/settings.py +++ b/Cura/cura_sf/fabmetheus_utilities/settings.py @@ -10,7 +10,7 @@ import __init__ import os, sys import types, math -from newui import profile +from util import profile from fabmetheus_utilities import archive def DEFSET(setting): @@ -36,43 +36,19 @@ def storedPercentSetting(name): return lambda setting: float(profile.getProfileSetting(name)) / 100 def calculateEdgeWidth(setting): - wallThickness = float(profile.getProfileSetting('wall_thickness')) - nozzleSize = float(profile.getPreference('nozzle_size')) - - if wallThickness < nozzleSize: - return wallThickness - - lineCount = int(wallThickness / nozzleSize) - lineWidth = wallThickness / lineCount - lineWidthAlt = wallThickness / (lineCount + 1) - if lineWidth > nozzleSize * 1.5: - return lineWidthAlt - return lineWidth + return profile.calculateEdgeWidth() def calculateShells(setting): - return calculateShellsImp(float(profile.getProfileSetting('wall_thickness'))) + return profile.calculateLineCount() - 1 def calculateShellsBase(setting): - return calculateShellsImp(float(profile.getProfileSetting('wall_thickness')) + float(profile.getProfileSetting('extra_base_wall_thickness'))) - -def calculateShellsImp(wallThickness): - nozzleSize = float(profile.getPreference('nozzle_size')) + edgeWidth = profile.calculateEdgeWidth() + extraWall = float(profile.getProfileSetting('extra_base_wall_thickness')) - if wallThickness < nozzleSize: - return 0 - - lineCount = int(wallThickness / nozzleSize + 0.0001) - lineWidth = wallThickness / lineCount - lineWidthAlt = wallThickness / (lineCount + 1) - if lineWidth > nozzleSize * 1.5: - return lineCount - return lineCount - 1 + return profile.calculateLineCount() - 1 + int(extraWall / edgeWidth + 0.0001) def calculateSolidLayerCount(setting): - layerHeight = float(profile.getProfileSetting('layer_height')) - solidThickness = float(profile.getProfileSetting('solid_layer_thickness')) - ret = int(math.ceil(solidThickness / layerHeight - 0.0001)) - return ret + return profile.calculateSolidLayerCount() def firstLayerSpeedRatio(setting): bottomSpeed = float(profile.getProfileSetting('bottom_layer_speed')) @@ -88,7 +64,7 @@ def calculateMultiplyDistance(setting): edgeWidth = calculateEdgeWidth(setting) return 10.0 / edgeWidth -def getSkeinPyPyProfileInformation(): +def getProfileInformation(): return { 'carve': { 'Add_Layer_Template_to_SVG': DEFSET, @@ -127,9 +103,9 @@ def getSkeinPyPyProfileInformation(): 'Activate_Widen': DEFSET, 'Widen_Width_over_Edge_Width_ratio': DEFSET, },'inset': { - 'Add_Custom_Code_for_Temperature_Reading': DEFSET, + 'Add_Custom_Code_for_Temperature_Reading': "False", 'Infill_in_Direction_of_Bridge': "True", - 'Infill_Width': storedPreference("nozzle_size"), + 'Infill_Width': storedSetting("nozzle_size"), 'Loop_Order_Choice': DEFSET, 'Overlap_Removal_Width_over_Perimeter_Width_ratio': DEFSET, 'Turn_Extruder_Heater_Off_at_Shut_Down': DEFSET, @@ -157,7 +133,7 @@ def getSkeinPyPyProfileInformation(): 'Line': ifSettingIs('infill_type', 'Line'), 'Infill_Perimeter_Overlap_ratio': storedPercentSetting('fill_overlap'), 'Infill_Solidity_ratio': storedPercentSetting('fill_density'), - 'Infill_Width': storedPreference("nozzle_size"), + 'Infill_Width': storedSetting("nozzle_size"), 'Sharpest_Angle_degrees': DEFSET, 'Solid_Surface_Thickness_layers': calculateSolidLayerCount, 'Start_From_Choice': DEFSET, @@ -289,9 +265,11 @@ def getSkeinPyPyProfileInformation(): 'Name_of_Cool_End_File': DEFSET, 'Name_of_Cool_Start_File': DEFSET, 'Orbital_Outset_millimeters': DEFSET, - 'Turn_Fan_On_at_Beginning': DEFSET, - 'Turn_Fan_Off_at_Ending': DEFSET, + 'Turn_Fan_On_at_Beginning': storedSetting("fan_enabled"), + 'Turn_Fan_Off_at_Ending': "False", 'Minimum_feed_rate_mm/s': storedSetting("cool_min_feedrate"), + 'Fan_on_at_layer': storedSetting('fan_layer'), + 'Fan_speed_%': storedSetting('fan_speed'), },'hop': { 'Activate_Hop': "False", 'Hop_Over_Layer_Thickness_ratio': DEFSET, @@ -400,9 +378,9 @@ def safeConfigName(name): def getReadRepository(repository): "Read the configuration for this 'repository'" - info = getSkeinPyPyProfileInformation() + info = getProfileInformation() if not info.has_key(repository.name): - print "Warning: Plugin: " + repository.name + " missing from SkeinPyPy info" + print "Warning: Plugin: " + repository.name + " missing from Cura info" return repository info = info[repository.name] @@ -410,7 +388,7 @@ def getReadRepository(repository): for p in repository.preferences: name = safeConfigName(p.name) if not info.has_key(name): - print "Setting: " + repository.name + ":" + name + " missing from SkeinPyPy info" + print "Setting: " + repository.name + ":" + name + " missing from Cura info" continue if isinstance(info[name], types.FunctionType): p.setValueToString(str(info[name](p))) @@ -434,27 +412,8 @@ def getAlterationFileLines(fileName): def getAlterationLines(fileName): return archive.getTextLines(getAlterationFile(fileName)) -def getAlterationFile(fileName, allowMagicPrefix = True): - "Get the file from the fileName or the lowercase fileName in the alterations directories." - #print ('getAlterationFile:', fileName) - prefix = '' - if allowMagicPrefix: - if fileName == 'start.gcode': - #For the start code, hack the temperature and the steps per E value into it. So the temperature is reached before the start code extrusion. - #We also set our steps per E here, if configured. - eSteps = float(profile.getPreference('steps_per_e')) - if eSteps > 0: - prefix += 'M92 E'+str(eSteps)+'\n' - temp = float(profile.getProfileSetting('print_temperature')) - if temp > 0: - prefix += 'M109 S'+str(temp)+'\n' - elif fileName == 'replace.csv': - prefix = 'M101\nM103\n' - alterationsDirectory = archive.getSkeinforgePath('alterations') - fullFilename = os.path.join(alterationsDirectory, fileName) - if os.path.isfile(fullFilename): - return prefix + archive.getFileText( fullFilename ) - return prefix +def getAlterationFile(fileName): + return profile.getAlterationFileContents(fileName) #################################### ## Configuration settings classes ## diff --git a/SkeinPyPy/fabmetheus_utilities/svg_reader.py b/Cura/cura_sf/fabmetheus_utilities/svg_reader.py similarity index 100% rename from SkeinPyPy/fabmetheus_utilities/svg_reader.py rename to Cura/cura_sf/fabmetheus_utilities/svg_reader.py diff --git a/SkeinPyPy/fabmetheus_utilities/svg_writer.py b/Cura/cura_sf/fabmetheus_utilities/svg_writer.py similarity index 100% rename from SkeinPyPy/fabmetheus_utilities/svg_writer.py rename to Cura/cura_sf/fabmetheus_utilities/svg_writer.py diff --git a/SkeinPyPy/fabmetheus_utilities/templates/canvas_template.svg b/Cura/cura_sf/fabmetheus_utilities/templates/canvas_template.svg similarity index 100% rename from SkeinPyPy/fabmetheus_utilities/templates/canvas_template.svg rename to Cura/cura_sf/fabmetheus_utilities/templates/canvas_template.svg diff --git a/SkeinPyPy/fabmetheus_utilities/templates/layer_template.svg b/Cura/cura_sf/fabmetheus_utilities/templates/layer_template.svg similarity index 100% rename from SkeinPyPy/fabmetheus_utilities/templates/layer_template.svg rename to Cura/cura_sf/fabmetheus_utilities/templates/layer_template.svg diff --git a/SkeinPyPy/fabmetheus_utilities/vector3.py b/Cura/cura_sf/fabmetheus_utilities/vector3.py similarity index 100% rename from SkeinPyPy/fabmetheus_utilities/vector3.py rename to Cura/cura_sf/fabmetheus_utilities/vector3.py diff --git a/SkeinPyPy/fabmetheus_utilities/vector3index.py b/Cura/cura_sf/fabmetheus_utilities/vector3index.py similarity index 100% rename from SkeinPyPy/fabmetheus_utilities/vector3index.py rename to Cura/cura_sf/fabmetheus_utilities/vector3index.py diff --git a/SkeinPyPy/fabmetheus_utilities/version.txt b/Cura/cura_sf/fabmetheus_utilities/version.txt similarity index 100% rename from SkeinPyPy/fabmetheus_utilities/version.txt rename to Cura/cura_sf/fabmetheus_utilities/version.txt diff --git a/SkeinPyPy/fabmetheus_utilities/xml_simple_reader.py b/Cura/cura_sf/fabmetheus_utilities/xml_simple_reader.py similarity index 100% rename from SkeinPyPy/fabmetheus_utilities/xml_simple_reader.py rename to Cura/cura_sf/fabmetheus_utilities/xml_simple_reader.py diff --git a/SkeinPyPy/fabmetheus_utilities/xml_simple_writer.py b/Cura/cura_sf/fabmetheus_utilities/xml_simple_writer.py similarity index 100% rename from SkeinPyPy/fabmetheus_utilities/xml_simple_writer.py rename to Cura/cura_sf/fabmetheus_utilities/xml_simple_writer.py diff --git a/Cura/cura_sf/skeinforge_application/__init__.py b/Cura/cura_sf/skeinforge_application/__init__.py new file mode 100644 index 0000000000..bdac25da57 --- /dev/null +++ b/Cura/cura_sf/skeinforge_application/__init__.py @@ -0,0 +1,9 @@ +#This is required to workaround the python import bug where relative imports don't work if the module is imported as a main module. +import os +import sys +numberOfLevelsDeepInPackageHierarchy = 1 +packageFilePath = os.path.abspath(__file__) +for level in range( numberOfLevelsDeepInPackageHierarchy + 1 ): + packageFilePath = os.path.dirname( packageFilePath ) +if packageFilePath not in sys.path: + sys.path.insert( 0, packageFilePath ) diff --git a/SkeinPyPy/skeinforge_application/skeinforge_plugins/__init__.py b/Cura/cura_sf/skeinforge_application/skeinforge_plugins/__init__.py similarity index 100% rename from SkeinPyPy/skeinforge_application/skeinforge_plugins/__init__.py rename to Cura/cura_sf/skeinforge_application/skeinforge_plugins/__init__.py diff --git a/SkeinPyPy/skeinforge_application/skeinforge_plugins/analyze.py b/Cura/cura_sf/skeinforge_application/skeinforge_plugins/analyze.py similarity index 100% rename from SkeinPyPy/skeinforge_application/skeinforge_plugins/analyze.py rename to Cura/cura_sf/skeinforge_application/skeinforge_plugins/analyze.py diff --git a/SkeinPyPy/skeinforge_application/skeinforge_plugins/analyze_plugins/__init__.py b/Cura/cura_sf/skeinforge_application/skeinforge_plugins/analyze_plugins/__init__.py similarity index 100% rename from SkeinPyPy/skeinforge_application/skeinforge_plugins/analyze_plugins/__init__.py rename to Cura/cura_sf/skeinforge_application/skeinforge_plugins/analyze_plugins/__init__.py diff --git a/SkeinPyPy/skeinforge_application/skeinforge_plugins/craft.py b/Cura/cura_sf/skeinforge_application/skeinforge_plugins/craft.py similarity index 100% rename from SkeinPyPy/skeinforge_application/skeinforge_plugins/craft.py rename to Cura/cura_sf/skeinforge_application/skeinforge_plugins/craft.py diff --git a/SkeinPyPy/skeinforge_application/skeinforge_plugins/craft_plugins/__init__.py b/Cura/cura_sf/skeinforge_application/skeinforge_plugins/craft_plugins/__init__.py similarity index 100% rename from SkeinPyPy/skeinforge_application/skeinforge_plugins/craft_plugins/__init__.py rename to Cura/cura_sf/skeinforge_application/skeinforge_plugins/craft_plugins/__init__.py diff --git a/SkeinPyPy/skeinforge_application/skeinforge_plugins/craft_plugins/alteration.py b/Cura/cura_sf/skeinforge_application/skeinforge_plugins/craft_plugins/alteration.py similarity index 100% rename from SkeinPyPy/skeinforge_application/skeinforge_plugins/craft_plugins/alteration.py rename to Cura/cura_sf/skeinforge_application/skeinforge_plugins/craft_plugins/alteration.py diff --git a/SkeinPyPy/skeinforge_application/skeinforge_plugins/craft_plugins/bottom.py b/Cura/cura_sf/skeinforge_application/skeinforge_plugins/craft_plugins/bottom.py similarity index 100% rename from SkeinPyPy/skeinforge_application/skeinforge_plugins/craft_plugins/bottom.py rename to Cura/cura_sf/skeinforge_application/skeinforge_plugins/craft_plugins/bottom.py diff --git a/SkeinPyPy/skeinforge_application/skeinforge_plugins/craft_plugins/carve.py b/Cura/cura_sf/skeinforge_application/skeinforge_plugins/craft_plugins/carve.py similarity index 100% rename from SkeinPyPy/skeinforge_application/skeinforge_plugins/craft_plugins/carve.py rename to Cura/cura_sf/skeinforge_application/skeinforge_plugins/craft_plugins/carve.py diff --git a/SkeinPyPy/skeinforge_application/skeinforge_plugins/craft_plugins/chamber.py b/Cura/cura_sf/skeinforge_application/skeinforge_plugins/craft_plugins/chamber.py similarity index 100% rename from SkeinPyPy/skeinforge_application/skeinforge_plugins/craft_plugins/chamber.py rename to Cura/cura_sf/skeinforge_application/skeinforge_plugins/craft_plugins/chamber.py diff --git a/SkeinPyPy/skeinforge_application/skeinforge_plugins/craft_plugins/chop.py b/Cura/cura_sf/skeinforge_application/skeinforge_plugins/craft_plugins/chop.py similarity index 100% rename from SkeinPyPy/skeinforge_application/skeinforge_plugins/craft_plugins/chop.py rename to Cura/cura_sf/skeinforge_application/skeinforge_plugins/craft_plugins/chop.py diff --git a/SkeinPyPy/skeinforge_application/skeinforge_plugins/craft_plugins/cleave.py b/Cura/cura_sf/skeinforge_application/skeinforge_plugins/craft_plugins/cleave.py similarity index 100% rename from SkeinPyPy/skeinforge_application/skeinforge_plugins/craft_plugins/cleave.py rename to Cura/cura_sf/skeinforge_application/skeinforge_plugins/craft_plugins/cleave.py diff --git a/SkeinPyPy/skeinforge_application/skeinforge_plugins/craft_plugins/clip.py b/Cura/cura_sf/skeinforge_application/skeinforge_plugins/craft_plugins/clip.py similarity index 100% rename from SkeinPyPy/skeinforge_application/skeinforge_plugins/craft_plugins/clip.py rename to Cura/cura_sf/skeinforge_application/skeinforge_plugins/craft_plugins/clip.py diff --git a/SkeinPyPy/skeinforge_application/skeinforge_plugins/craft_plugins/coil.py b/Cura/cura_sf/skeinforge_application/skeinforge_plugins/craft_plugins/coil.py similarity index 100% rename from SkeinPyPy/skeinforge_application/skeinforge_plugins/craft_plugins/coil.py rename to Cura/cura_sf/skeinforge_application/skeinforge_plugins/craft_plugins/coil.py diff --git a/SkeinPyPy/skeinforge_application/skeinforge_plugins/craft_plugins/comb.py b/Cura/cura_sf/skeinforge_application/skeinforge_plugins/craft_plugins/comb.py similarity index 100% rename from SkeinPyPy/skeinforge_application/skeinforge_plugins/craft_plugins/comb.py rename to Cura/cura_sf/skeinforge_application/skeinforge_plugins/craft_plugins/comb.py diff --git a/SkeinPyPy/skeinforge_application/skeinforge_plugins/craft_plugins/cool.py b/Cura/cura_sf/skeinforge_application/skeinforge_plugins/craft_plugins/cool.py similarity index 97% rename from SkeinPyPy/skeinforge_application/skeinforge_plugins/craft_plugins/cool.py rename to Cura/cura_sf/skeinforge_application/skeinforge_plugins/craft_plugins/cool.py index d78f194c06..5a4f54916e 100644 --- a/SkeinPyPy/skeinforge_application/skeinforge_plugins/craft_plugins/cool.py +++ b/Cura/cura_sf/skeinforge_application/skeinforge_plugins/craft_plugins/cool.py @@ -163,6 +163,8 @@ class CoolRepository: self.executeTitle = 'Cool' self.minimumFeedRate = settings.FloatSpin().getFromValue(0.0, 'Minimum feed rate (mm/s):', self, 10.0, 5.0) + self.fanTurnOnLayerNr = settings.IntSpin().getFromValue(0, 'Fan on at layer:', self, 100, 0) + self.fanSpeed = settings.IntSpin().getFromValue(0, 'Fan speed (%):', self, 100, 100) def execute(self): 'Cool button has been clicked.' @@ -333,8 +335,6 @@ class CoolSkein: self.oldFlowRate = float(splitLine[1][1 :]) elif firstWord == '(': self.edgeWidth = float(splitLine[1]) - if self.repository.turnFanOnAtBeginning.value: - self.distanceFeedRate.addLine('M106') elif firstWord == '()': self.distanceFeedRate.addTagBracketedProcedure('cool') return @@ -371,6 +371,8 @@ class CoolSkein: elif firstWord == '(': self.layerCount.printProgressIncrement('cool') self.distanceFeedRate.addLine(line) + if self.repository.turnFanOnAtBeginning.value and self.repository.fanTurnOnLayerNr.value == self.layerCount.layerIndex: + self.distanceFeedRate.addLine('M106 S%d' % (self.repository.fanSpeed.value * 255 / 100)) self.distanceFeedRate.addLinesSetAbsoluteDistanceMode(self.coolStartLines) layerTime = self.getLayerTime() remainingOrbitTime = max(self.repository.minimumLayerTime.value - layerTime, 0.0) diff --git a/SkeinPyPy/skeinforge_application/skeinforge_plugins/craft_plugins/dimension.py b/Cura/cura_sf/skeinforge_application/skeinforge_plugins/craft_plugins/dimension.py similarity index 100% rename from SkeinPyPy/skeinforge_application/skeinforge_plugins/craft_plugins/dimension.py rename to Cura/cura_sf/skeinforge_application/skeinforge_plugins/craft_plugins/dimension.py diff --git a/SkeinPyPy/skeinforge_application/skeinforge_plugins/craft_plugins/drill.py b/Cura/cura_sf/skeinforge_application/skeinforge_plugins/craft_plugins/drill.py similarity index 100% rename from SkeinPyPy/skeinforge_application/skeinforge_plugins/craft_plugins/drill.py rename to Cura/cura_sf/skeinforge_application/skeinforge_plugins/craft_plugins/drill.py diff --git a/SkeinPyPy/skeinforge_application/skeinforge_plugins/craft_plugins/dwindle.py b/Cura/cura_sf/skeinforge_application/skeinforge_plugins/craft_plugins/dwindle.py similarity index 100% rename from SkeinPyPy/skeinforge_application/skeinforge_plugins/craft_plugins/dwindle.py rename to Cura/cura_sf/skeinforge_application/skeinforge_plugins/craft_plugins/dwindle.py diff --git a/SkeinPyPy/skeinforge_application/skeinforge_plugins/craft_plugins/export.py b/Cura/cura_sf/skeinforge_application/skeinforge_plugins/craft_plugins/export.py similarity index 100% rename from SkeinPyPy/skeinforge_application/skeinforge_plugins/craft_plugins/export.py rename to Cura/cura_sf/skeinforge_application/skeinforge_plugins/craft_plugins/export.py diff --git a/SkeinPyPy/skeinforge_application/skeinforge_plugins/craft_plugins/export_plugins/__init__.py b/Cura/cura_sf/skeinforge_application/skeinforge_plugins/craft_plugins/export_plugins/__init__.py similarity index 100% rename from SkeinPyPy/skeinforge_application/skeinforge_plugins/craft_plugins/export_plugins/__init__.py rename to Cura/cura_sf/skeinforge_application/skeinforge_plugins/craft_plugins/export_plugins/__init__.py diff --git a/SkeinPyPy/skeinforge_application/skeinforge_plugins/craft_plugins/export_plugins/binary_16_byte.py b/Cura/cura_sf/skeinforge_application/skeinforge_plugins/craft_plugins/export_plugins/binary_16_byte.py similarity index 100% rename from SkeinPyPy/skeinforge_application/skeinforge_plugins/craft_plugins/export_plugins/binary_16_byte.py rename to Cura/cura_sf/skeinforge_application/skeinforge_plugins/craft_plugins/export_plugins/binary_16_byte.py diff --git a/SkeinPyPy/skeinforge_application/skeinforge_plugins/craft_plugins/export_plugins/gcode_step.py b/Cura/cura_sf/skeinforge_application/skeinforge_plugins/craft_plugins/export_plugins/gcode_step.py similarity index 100% rename from SkeinPyPy/skeinforge_application/skeinforge_plugins/craft_plugins/export_plugins/gcode_step.py rename to Cura/cura_sf/skeinforge_application/skeinforge_plugins/craft_plugins/export_plugins/gcode_step.py diff --git a/SkeinPyPy/skeinforge_application/skeinforge_plugins/craft_plugins/export_plugins/gcode_time_segment.py b/Cura/cura_sf/skeinforge_application/skeinforge_plugins/craft_plugins/export_plugins/gcode_time_segment.py similarity index 100% rename from SkeinPyPy/skeinforge_application/skeinforge_plugins/craft_plugins/export_plugins/gcode_time_segment.py rename to Cura/cura_sf/skeinforge_application/skeinforge_plugins/craft_plugins/export_plugins/gcode_time_segment.py diff --git a/SkeinPyPy/skeinforge_application/skeinforge_plugins/craft_plugins/export_plugins/static_plugins/__init__.py b/Cura/cura_sf/skeinforge_application/skeinforge_plugins/craft_plugins/export_plugins/static_plugins/__init__.py similarity index 100% rename from SkeinPyPy/skeinforge_application/skeinforge_plugins/craft_plugins/export_plugins/static_plugins/__init__.py rename to Cura/cura_sf/skeinforge_application/skeinforge_plugins/craft_plugins/export_plugins/static_plugins/__init__.py diff --git a/SkeinPyPy/skeinforge_application/skeinforge_plugins/craft_plugins/export_plugins/static_plugins/gcode_small.py b/Cura/cura_sf/skeinforge_application/skeinforge_plugins/craft_plugins/export_plugins/static_plugins/gcode_small.py similarity index 100% rename from SkeinPyPy/skeinforge_application/skeinforge_plugins/craft_plugins/export_plugins/static_plugins/gcode_small.py rename to Cura/cura_sf/skeinforge_application/skeinforge_plugins/craft_plugins/export_plugins/static_plugins/gcode_small.py diff --git a/SkeinPyPy/skeinforge_application/skeinforge_plugins/craft_plugins/feed.py b/Cura/cura_sf/skeinforge_application/skeinforge_plugins/craft_plugins/feed.py similarity index 100% rename from SkeinPyPy/skeinforge_application/skeinforge_plugins/craft_plugins/feed.py rename to Cura/cura_sf/skeinforge_application/skeinforge_plugins/craft_plugins/feed.py diff --git a/SkeinPyPy/skeinforge_application/skeinforge_plugins/craft_plugins/fill.py b/Cura/cura_sf/skeinforge_application/skeinforge_plugins/craft_plugins/fill.py similarity index 100% rename from SkeinPyPy/skeinforge_application/skeinforge_plugins/craft_plugins/fill.py rename to Cura/cura_sf/skeinforge_application/skeinforge_plugins/craft_plugins/fill.py diff --git a/SkeinPyPy/skeinforge_application/skeinforge_plugins/craft_plugins/fillet.py b/Cura/cura_sf/skeinforge_application/skeinforge_plugins/craft_plugins/fillet.py similarity index 100% rename from SkeinPyPy/skeinforge_application/skeinforge_plugins/craft_plugins/fillet.py rename to Cura/cura_sf/skeinforge_application/skeinforge_plugins/craft_plugins/fillet.py diff --git a/SkeinPyPy/skeinforge_application/skeinforge_plugins/craft_plugins/flow.py b/Cura/cura_sf/skeinforge_application/skeinforge_plugins/craft_plugins/flow.py similarity index 100% rename from SkeinPyPy/skeinforge_application/skeinforge_plugins/craft_plugins/flow.py rename to Cura/cura_sf/skeinforge_application/skeinforge_plugins/craft_plugins/flow.py diff --git a/SkeinPyPy/skeinforge_application/skeinforge_plugins/craft_plugins/home.py b/Cura/cura_sf/skeinforge_application/skeinforge_plugins/craft_plugins/home.py similarity index 100% rename from SkeinPyPy/skeinforge_application/skeinforge_plugins/craft_plugins/home.py rename to Cura/cura_sf/skeinforge_application/skeinforge_plugins/craft_plugins/home.py diff --git a/SkeinPyPy/skeinforge_application/skeinforge_plugins/craft_plugins/hop.py b/Cura/cura_sf/skeinforge_application/skeinforge_plugins/craft_plugins/hop.py similarity index 100% rename from SkeinPyPy/skeinforge_application/skeinforge_plugins/craft_plugins/hop.py rename to Cura/cura_sf/skeinforge_application/skeinforge_plugins/craft_plugins/hop.py diff --git a/SkeinPyPy/skeinforge_application/skeinforge_plugins/craft_plugins/inset.py b/Cura/cura_sf/skeinforge_application/skeinforge_plugins/craft_plugins/inset.py similarity index 100% rename from SkeinPyPy/skeinforge_application/skeinforge_plugins/craft_plugins/inset.py rename to Cura/cura_sf/skeinforge_application/skeinforge_plugins/craft_plugins/inset.py diff --git a/SkeinPyPy/skeinforge_application/skeinforge_plugins/craft_plugins/jitter.py b/Cura/cura_sf/skeinforge_application/skeinforge_plugins/craft_plugins/jitter.py similarity index 100% rename from SkeinPyPy/skeinforge_application/skeinforge_plugins/craft_plugins/jitter.py rename to Cura/cura_sf/skeinforge_application/skeinforge_plugins/craft_plugins/jitter.py diff --git a/SkeinPyPy/skeinforge_application/skeinforge_plugins/craft_plugins/joris.py b/Cura/cura_sf/skeinforge_application/skeinforge_plugins/craft_plugins/joris.py similarity index 100% rename from SkeinPyPy/skeinforge_application/skeinforge_plugins/craft_plugins/joris.py rename to Cura/cura_sf/skeinforge_application/skeinforge_plugins/craft_plugins/joris.py diff --git a/SkeinPyPy/skeinforge_application/skeinforge_plugins/craft_plugins/lash.py b/Cura/cura_sf/skeinforge_application/skeinforge_plugins/craft_plugins/lash.py similarity index 100% rename from SkeinPyPy/skeinforge_application/skeinforge_plugins/craft_plugins/lash.py rename to Cura/cura_sf/skeinforge_application/skeinforge_plugins/craft_plugins/lash.py diff --git a/SkeinPyPy/skeinforge_application/skeinforge_plugins/craft_plugins/lift.py b/Cura/cura_sf/skeinforge_application/skeinforge_plugins/craft_plugins/lift.py similarity index 100% rename from SkeinPyPy/skeinforge_application/skeinforge_plugins/craft_plugins/lift.py rename to Cura/cura_sf/skeinforge_application/skeinforge_plugins/craft_plugins/lift.py diff --git a/SkeinPyPy/skeinforge_application/skeinforge_plugins/craft_plugins/limit.py b/Cura/cura_sf/skeinforge_application/skeinforge_plugins/craft_plugins/limit.py similarity index 100% rename from SkeinPyPy/skeinforge_application/skeinforge_plugins/craft_plugins/limit.py rename to Cura/cura_sf/skeinforge_application/skeinforge_plugins/craft_plugins/limit.py diff --git a/SkeinPyPy/skeinforge_application/skeinforge_plugins/craft_plugins/mill.py b/Cura/cura_sf/skeinforge_application/skeinforge_plugins/craft_plugins/mill.py similarity index 100% rename from SkeinPyPy/skeinforge_application/skeinforge_plugins/craft_plugins/mill.py rename to Cura/cura_sf/skeinforge_application/skeinforge_plugins/craft_plugins/mill.py diff --git a/SkeinPyPy/skeinforge_application/skeinforge_plugins/craft_plugins/multiply.py b/Cura/cura_sf/skeinforge_application/skeinforge_plugins/craft_plugins/multiply.py similarity index 100% rename from SkeinPyPy/skeinforge_application/skeinforge_plugins/craft_plugins/multiply.py rename to Cura/cura_sf/skeinforge_application/skeinforge_plugins/craft_plugins/multiply.py diff --git a/SkeinPyPy/skeinforge_application/skeinforge_plugins/craft_plugins/oozebane.py b/Cura/cura_sf/skeinforge_application/skeinforge_plugins/craft_plugins/oozebane.py similarity index 100% rename from SkeinPyPy/skeinforge_application/skeinforge_plugins/craft_plugins/oozebane.py rename to Cura/cura_sf/skeinforge_application/skeinforge_plugins/craft_plugins/oozebane.py diff --git a/SkeinPyPy/skeinforge_application/skeinforge_plugins/craft_plugins/outset.py b/Cura/cura_sf/skeinforge_application/skeinforge_plugins/craft_plugins/outset.py similarity index 100% rename from SkeinPyPy/skeinforge_application/skeinforge_plugins/craft_plugins/outset.py rename to Cura/cura_sf/skeinforge_application/skeinforge_plugins/craft_plugins/outset.py diff --git a/SkeinPyPy/skeinforge_application/skeinforge_plugins/craft_plugins/preface.py b/Cura/cura_sf/skeinforge_application/skeinforge_plugins/craft_plugins/preface.py similarity index 100% rename from SkeinPyPy/skeinforge_application/skeinforge_plugins/craft_plugins/preface.py rename to Cura/cura_sf/skeinforge_application/skeinforge_plugins/craft_plugins/preface.py diff --git a/SkeinPyPy/skeinforge_application/skeinforge_plugins/craft_plugins/raft.py b/Cura/cura_sf/skeinforge_application/skeinforge_plugins/craft_plugins/raft.py similarity index 100% rename from SkeinPyPy/skeinforge_application/skeinforge_plugins/craft_plugins/raft.py rename to Cura/cura_sf/skeinforge_application/skeinforge_plugins/craft_plugins/raft.py diff --git a/SkeinPyPy/skeinforge_application/skeinforge_plugins/craft_plugins/scale.py b/Cura/cura_sf/skeinforge_application/skeinforge_plugins/craft_plugins/scale.py similarity index 100% rename from SkeinPyPy/skeinforge_application/skeinforge_plugins/craft_plugins/scale.py rename to Cura/cura_sf/skeinforge_application/skeinforge_plugins/craft_plugins/scale.py diff --git a/SkeinPyPy/skeinforge_application/skeinforge_plugins/craft_plugins/skin.py b/Cura/cura_sf/skeinforge_application/skeinforge_plugins/craft_plugins/skin.py similarity index 100% rename from SkeinPyPy/skeinforge_application/skeinforge_plugins/craft_plugins/skin.py rename to Cura/cura_sf/skeinforge_application/skeinforge_plugins/craft_plugins/skin.py diff --git a/SkeinPyPy/skeinforge_application/skeinforge_plugins/craft_plugins/skirt.py b/Cura/cura_sf/skeinforge_application/skeinforge_plugins/craft_plugins/skirt.py similarity index 100% rename from SkeinPyPy/skeinforge_application/skeinforge_plugins/craft_plugins/skirt.py rename to Cura/cura_sf/skeinforge_application/skeinforge_plugins/craft_plugins/skirt.py diff --git a/SkeinPyPy/skeinforge_application/skeinforge_plugins/craft_plugins/smooth.py b/Cura/cura_sf/skeinforge_application/skeinforge_plugins/craft_plugins/smooth.py similarity index 100% rename from SkeinPyPy/skeinforge_application/skeinforge_plugins/craft_plugins/smooth.py rename to Cura/cura_sf/skeinforge_application/skeinforge_plugins/craft_plugins/smooth.py diff --git a/SkeinPyPy/skeinforge_application/skeinforge_plugins/craft_plugins/speed.py b/Cura/cura_sf/skeinforge_application/skeinforge_plugins/craft_plugins/speed.py similarity index 100% rename from SkeinPyPy/skeinforge_application/skeinforge_plugins/craft_plugins/speed.py rename to Cura/cura_sf/skeinforge_application/skeinforge_plugins/craft_plugins/speed.py diff --git a/SkeinPyPy/skeinforge_application/skeinforge_plugins/craft_plugins/splodge.py b/Cura/cura_sf/skeinforge_application/skeinforge_plugins/craft_plugins/splodge.py similarity index 100% rename from SkeinPyPy/skeinforge_application/skeinforge_plugins/craft_plugins/splodge.py rename to Cura/cura_sf/skeinforge_application/skeinforge_plugins/craft_plugins/splodge.py diff --git a/SkeinPyPy/skeinforge_application/skeinforge_plugins/craft_plugins/stretch.py b/Cura/cura_sf/skeinforge_application/skeinforge_plugins/craft_plugins/stretch.py similarity index 100% rename from SkeinPyPy/skeinforge_application/skeinforge_plugins/craft_plugins/stretch.py rename to Cura/cura_sf/skeinforge_application/skeinforge_plugins/craft_plugins/stretch.py diff --git a/SkeinPyPy/skeinforge_application/skeinforge_plugins/craft_plugins/temperature.py b/Cura/cura_sf/skeinforge_application/skeinforge_plugins/craft_plugins/temperature.py similarity index 100% rename from SkeinPyPy/skeinforge_application/skeinforge_plugins/craft_plugins/temperature.py rename to Cura/cura_sf/skeinforge_application/skeinforge_plugins/craft_plugins/temperature.py diff --git a/SkeinPyPy/skeinforge_application/skeinforge_plugins/craft_plugins/tower.py b/Cura/cura_sf/skeinforge_application/skeinforge_plugins/craft_plugins/tower.py similarity index 100% rename from SkeinPyPy/skeinforge_application/skeinforge_plugins/craft_plugins/tower.py rename to Cura/cura_sf/skeinforge_application/skeinforge_plugins/craft_plugins/tower.py diff --git a/SkeinPyPy/skeinforge_application/skeinforge_plugins/craft_plugins/unpause.py b/Cura/cura_sf/skeinforge_application/skeinforge_plugins/craft_plugins/unpause.py similarity index 100% rename from SkeinPyPy/skeinforge_application/skeinforge_plugins/craft_plugins/unpause.py rename to Cura/cura_sf/skeinforge_application/skeinforge_plugins/craft_plugins/unpause.py diff --git a/SkeinPyPy/skeinforge_application/skeinforge_plugins/craft_plugins/whittle.py b/Cura/cura_sf/skeinforge_application/skeinforge_plugins/craft_plugins/whittle.py similarity index 100% rename from SkeinPyPy/skeinforge_application/skeinforge_plugins/craft_plugins/whittle.py rename to Cura/cura_sf/skeinforge_application/skeinforge_plugins/craft_plugins/whittle.py diff --git a/SkeinPyPy/skeinforge_application/skeinforge_plugins/craft_plugins/widen.py b/Cura/cura_sf/skeinforge_application/skeinforge_plugins/craft_plugins/widen.py similarity index 100% rename from SkeinPyPy/skeinforge_application/skeinforge_plugins/craft_plugins/widen.py rename to Cura/cura_sf/skeinforge_application/skeinforge_plugins/craft_plugins/widen.py diff --git a/SkeinPyPy/skeinforge_application/skeinforge_plugins/craft_plugins/wipe.py b/Cura/cura_sf/skeinforge_application/skeinforge_plugins/craft_plugins/wipe.py similarity index 100% rename from SkeinPyPy/skeinforge_application/skeinforge_plugins/craft_plugins/wipe.py rename to Cura/cura_sf/skeinforge_application/skeinforge_plugins/craft_plugins/wipe.py diff --git a/SkeinPyPy/skeinforge_application/skeinforge_plugins/help.py b/Cura/cura_sf/skeinforge_application/skeinforge_plugins/help.py similarity index 100% rename from SkeinPyPy/skeinforge_application/skeinforge_plugins/help.py rename to Cura/cura_sf/skeinforge_application/skeinforge_plugins/help.py diff --git a/SkeinPyPy/skeinforge_application/skeinforge_plugins/meta.py b/Cura/cura_sf/skeinforge_application/skeinforge_plugins/meta.py similarity index 100% rename from SkeinPyPy/skeinforge_application/skeinforge_plugins/meta.py rename to Cura/cura_sf/skeinforge_application/skeinforge_plugins/meta.py diff --git a/SkeinPyPy/skeinforge_application/skeinforge_plugins/meta_plugins/__init__.py b/Cura/cura_sf/skeinforge_application/skeinforge_plugins/meta_plugins/__init__.py similarity index 100% rename from SkeinPyPy/skeinforge_application/skeinforge_plugins/meta_plugins/__init__.py rename to Cura/cura_sf/skeinforge_application/skeinforge_plugins/meta_plugins/__init__.py diff --git a/SkeinPyPy/skeinforge_application/skeinforge_plugins/meta_plugins/description.py b/Cura/cura_sf/skeinforge_application/skeinforge_plugins/meta_plugins/description.py similarity index 100% rename from SkeinPyPy/skeinforge_application/skeinforge_plugins/meta_plugins/description.py rename to Cura/cura_sf/skeinforge_application/skeinforge_plugins/meta_plugins/description.py diff --git a/SkeinPyPy/skeinforge_application/skeinforge_plugins/meta_plugins/polyfile.py b/Cura/cura_sf/skeinforge_application/skeinforge_plugins/meta_plugins/polyfile.py similarity index 100% rename from SkeinPyPy/skeinforge_application/skeinforge_plugins/meta_plugins/polyfile.py rename to Cura/cura_sf/skeinforge_application/skeinforge_plugins/meta_plugins/polyfile.py diff --git a/SkeinPyPy/skeinforge_application/skeinforge_plugins/profile.py b/Cura/cura_sf/skeinforge_application/skeinforge_plugins/profile.py similarity index 100% rename from SkeinPyPy/skeinforge_application/skeinforge_plugins/profile.py rename to Cura/cura_sf/skeinforge_application/skeinforge_plugins/profile.py diff --git a/SkeinPyPy/skeinforge_application/skeinforge_plugins/profile_plugins/__init__.py b/Cura/cura_sf/skeinforge_application/skeinforge_plugins/profile_plugins/__init__.py similarity index 100% rename from SkeinPyPy/skeinforge_application/skeinforge_plugins/profile_plugins/__init__.py rename to Cura/cura_sf/skeinforge_application/skeinforge_plugins/profile_plugins/__init__.py diff --git a/SkeinPyPy/skeinforge_application/skeinforge_plugins/profile_plugins/cutting.py b/Cura/cura_sf/skeinforge_application/skeinforge_plugins/profile_plugins/cutting.py similarity index 100% rename from SkeinPyPy/skeinforge_application/skeinforge_plugins/profile_plugins/cutting.py rename to Cura/cura_sf/skeinforge_application/skeinforge_plugins/profile_plugins/cutting.py diff --git a/SkeinPyPy/skeinforge_application/skeinforge_plugins/profile_plugins/extrusion.py b/Cura/cura_sf/skeinforge_application/skeinforge_plugins/profile_plugins/extrusion.py similarity index 100% rename from SkeinPyPy/skeinforge_application/skeinforge_plugins/profile_plugins/extrusion.py rename to Cura/cura_sf/skeinforge_application/skeinforge_plugins/profile_plugins/extrusion.py diff --git a/SkeinPyPy/skeinforge_application/skeinforge_plugins/profile_plugins/milling.py b/Cura/cura_sf/skeinforge_application/skeinforge_plugins/profile_plugins/milling.py similarity index 100% rename from SkeinPyPy/skeinforge_application/skeinforge_plugins/profile_plugins/milling.py rename to Cura/cura_sf/skeinforge_application/skeinforge_plugins/profile_plugins/milling.py diff --git a/SkeinPyPy/skeinforge_application/skeinforge_plugins/profile_plugins/winding.py b/Cura/cura_sf/skeinforge_application/skeinforge_plugins/profile_plugins/winding.py similarity index 100% rename from SkeinPyPy/skeinforge_application/skeinforge_plugins/profile_plugins/winding.py rename to Cura/cura_sf/skeinforge_application/skeinforge_plugins/profile_plugins/winding.py diff --git a/SkeinPyPy/skeinforge_application/skeinforge_utilities/__init__.py b/Cura/cura_sf/skeinforge_application/skeinforge_utilities/__init__.py similarity index 100% rename from SkeinPyPy/skeinforge_application/skeinforge_utilities/__init__.py rename to Cura/cura_sf/skeinforge_application/skeinforge_utilities/__init__.py diff --git a/SkeinPyPy/skeinforge_application/skeinforge_utilities/skeinforge_analyze.py b/Cura/cura_sf/skeinforge_application/skeinforge_utilities/skeinforge_analyze.py similarity index 100% rename from SkeinPyPy/skeinforge_application/skeinforge_utilities/skeinforge_analyze.py rename to Cura/cura_sf/skeinforge_application/skeinforge_utilities/skeinforge_analyze.py diff --git a/SkeinPyPy/skeinforge_application/skeinforge_utilities/skeinforge_craft.py b/Cura/cura_sf/skeinforge_application/skeinforge_utilities/skeinforge_craft.py similarity index 100% rename from SkeinPyPy/skeinforge_application/skeinforge_utilities/skeinforge_craft.py rename to Cura/cura_sf/skeinforge_application/skeinforge_utilities/skeinforge_craft.py diff --git a/SkeinPyPy/skeinforge_application/skeinforge_utilities/skeinforge_help.py b/Cura/cura_sf/skeinforge_application/skeinforge_utilities/skeinforge_help.py similarity index 100% rename from SkeinPyPy/skeinforge_application/skeinforge_utilities/skeinforge_help.py rename to Cura/cura_sf/skeinforge_application/skeinforge_utilities/skeinforge_help.py diff --git a/SkeinPyPy/skeinforge_application/skeinforge_utilities/skeinforge_meta.py b/Cura/cura_sf/skeinforge_application/skeinforge_utilities/skeinforge_meta.py similarity index 100% rename from SkeinPyPy/skeinforge_application/skeinforge_utilities/skeinforge_meta.py rename to Cura/cura_sf/skeinforge_application/skeinforge_utilities/skeinforge_meta.py diff --git a/SkeinPyPy/skeinforge_application/skeinforge_utilities/skeinforge_polyfile.py b/Cura/cura_sf/skeinforge_application/skeinforge_utilities/skeinforge_polyfile.py similarity index 100% rename from SkeinPyPy/skeinforge_application/skeinforge_utilities/skeinforge_polyfile.py rename to Cura/cura_sf/skeinforge_application/skeinforge_utilities/skeinforge_polyfile.py diff --git a/SkeinPyPy/skeinforge_application/skeinforge_utilities/skeinforge_profile.py b/Cura/cura_sf/skeinforge_application/skeinforge_utilities/skeinforge_profile.py similarity index 96% rename from SkeinPyPy/skeinforge_application/skeinforge_utilities/skeinforge_profile.py rename to Cura/cura_sf/skeinforge_application/skeinforge_utilities/skeinforge_profile.py index fbdc972ddb..38f8c9c229 100644 --- a/SkeinPyPy/skeinforge_application/skeinforge_utilities/skeinforge_profile.py +++ b/Cura/cura_sf/skeinforge_application/skeinforge_utilities/skeinforge_profile.py @@ -15,7 +15,7 @@ def getCraftTypeName(): return 'extrusion' def getProfileName(craftTypeName): - return 'SkeinPyPy profile:' + craftTypeName + return 'Cura profile:' + craftTypeName def addListsToCraftTypeRepository(fileNameHelp, repository): #print('addListsToCraftTypeRepository:', fileNameHelp, repository) diff --git a/SkeinPyPy/firmware/default.h b/Cura/firmware/default.h similarity index 100% rename from SkeinPyPy/firmware/default.h rename to Cura/firmware/default.h diff --git a/SkeinPyPy/firmware/default.hex b/Cura/firmware/default.hex similarity index 100% rename from SkeinPyPy/firmware/default.hex rename to Cura/firmware/default.hex diff --git a/SkeinPyPy/newui/__init__.py b/Cura/gui/__init__.py similarity index 62% rename from SkeinPyPy/newui/__init__.py rename to Cura/gui/__init__.py index 163803379e..4870325b1f 100644 --- a/SkeinPyPy/newui/__init__.py +++ b/Cura/gui/__init__.py @@ -1,7 +1,3 @@ -""" -This page is in the table of contents. -This is required to workaround the python import bug where relative imports don't work if the module is imported as a main module. -""" import os import sys diff --git a/SkeinPyPy/newui/advancedConfig.py b/Cura/gui/advancedConfig.py similarity index 63% rename from SkeinPyPy/newui/advancedConfig.py rename to Cura/gui/advancedConfig.py index 2febe8bc7b..99c841f815 100644 --- a/SkeinPyPy/newui/advancedConfig.py +++ b/Cura/gui/advancedConfig.py @@ -4,16 +4,16 @@ import __init__ import wx, os, platform, types import ConfigParser -from newui import configBase -from newui import preview3d -from newui import sliceProgessPanel -from newui import alterationPanel -from newui import validators +from gui import configBase +from gui import preview3d +from gui import sliceProgessPanel +from gui import alterationPanel +from gui import validators class advancedConfigWindow(configBase.configWindowBase): "Advanced configuration window" def __init__(self): - super(advancedConfigWindow, self).__init__(title='Advanced config') + super(advancedConfigWindow, self).__init__(title='Expert config') wx.EVT_CLOSE(self, self.OnClose) @@ -22,16 +22,14 @@ class advancedConfigWindow(configBase.configWindowBase): configBase.TitleRow(left, "Accuracy") c = configBase.SettingRow(left, "Extra Wall thickness for bottom/top (mm)", 'extra_base_wall_thickness', '0.0', 'Additional wall thickness of the bottom and top layers.') validators.validFloat(c, 0.0) - configBase.TitleRow(left, "Sequence") - c = configBase.SettingRow(left, "Print order sequence", 'sequence', ['Loops > Perimeter > Infill', 'Loops > Infill > Perimeter', 'Infill > Loops > Perimeter', 'Infill > Perimeter > Loops', 'Perimeter > Infill > Loops', 'Perimeter > Loops > Infill'], 'Sequence of printing. The perimeter is the outer print edge, the loops are the insides of the walls, and the infill is the insides.'); - c = configBase.SettingRow(left, "Force first layer sequence", 'force_first_layer_sequence', True, 'This setting forces the order of the first layer to be \'Perimeter > Loops > Infill\'') - + configBase.TitleRow(left, "Cool") c = configBase.SettingRow(left, "Minimum feedrate (mm/s)", 'cool_min_feedrate', '5', 'The minimal layer time can cause the print to slow down so much it starts to ooze. The minimal feedrate protects against this. Even if a print gets slown down it will never be slower then this minimal feedrate.') validators.validFloat(c, 0.0) - - configBase.TitleRow(left, "Joris") - c = configBase.SettingRow(left, "Joris the outer edge", 'joris', False, '[Joris] is a code name for smoothing out the Z move of the outer edge. This will create a steady Z increase over the whole print. It is intended to be used with a single walled wall thickness to make cups/vases.') + c = configBase.SettingRow(left, "Fan on layer number", 'fan_layer', '0', 'The layer at which the fan is turned on. The first layer is layer 0.') + validators.validInt(c, 0) + c = configBase.SettingRow(left, "Fan speed (%)", 'fan_speed', '100', 'When the fan is turned on, it is enabled at this speed setting.') + validators.validInt(c, 0, 100) configBase.TitleRow(left, "Raft (if enabled)") c = configBase.SettingRow(left, "Raft extra margin (mm)", 'raft_margin', '3.0', 'If the raft is enabled, this is the extra raft area around the object which is also rafted. Increasing this margin will create a stronger raft.') @@ -41,24 +39,31 @@ class advancedConfigWindow(configBase.configWindowBase): c = configBase.SettingRow(left, "Raft interface material amount (%)", 'raft_interface_material_amount', '100', 'The interface layer is a weak thin layer between the base layer and the printed object. It is designed to has little material to make it easy to break the base off the printed object. This setting adjusts the amount of material used for the interface layer.') validators.validFloat(c, 0.0) + configBase.TitleRow(left, "Support") + c = configBase.SettingRow(left, "Support material amount (%)", 'support_rate', '100', 'Amount of material used for support, less material gives a weaker support structure which is easier to remove.') + validators.validFloat(c, 0.0) + c = configBase.SettingRow(left, "Support distance from object (mm)", 'support_distance', '0.5', 'Distance between the support structure and the object.') + validators.validFloat(c, 0.0) + configBase.TitleRow(right, "Infill") c = configBase.SettingRow(right, "Infill pattern", 'infill_type', ['Line', 'Grid Circular', 'Grid Hexagonal', 'Grid Rectangular'], 'Pattern of the none-solid infill. Line is default, but grids can provide a strong print.') c = configBase.SettingRow(right, "Solid infill top", 'solid_top', True, 'Create a solid top surface, if set to false the top is filled with the fill percentage. Useful for cups/vases.') c = configBase.SettingRow(right, "Infill overlap (%)", 'fill_overlap', '15', 'Amount of overlap between the infill and the walls. There is a slight overlap with the walls and the infill so the walls connect firmly to the infill.') validators.validFloat(c, 0.0) - configBase.TitleRow(right, "Support") - c = configBase.SettingRow(right, "Support material amount (%)", 'support_rate', '100', 'Amount of material used for support, less material gives a weaker support structure which is easier to remove.') - validators.validFloat(c, 0.0) - c = configBase.SettingRow(right, "Support distance from object (mm)", 'support_distance', '0.5', 'Distance between the support structure and the object.') - validators.validFloat(c, 0.0) - configBase.TitleRow(right, "Bridge") c = configBase.SettingRow(right, "Bridge speed (%)", 'bridge_speed', '100', 'Speed at which bridges are printed, compared to normal printing speed.') validators.validFloat(c, 0.0) c = configBase.SettingRow(right, "Bridge material (%)", 'bridge_material_amount', '100', 'Amount of material used for bridges, increase go extrude more material when printing a bridge.') validators.validFloat(c, 0.0) + configBase.TitleRow(right, "Sequence") + c = configBase.SettingRow(right, "Print order sequence", 'sequence', ['Loops > Perimeter > Infill', 'Loops > Infill > Perimeter', 'Infill > Loops > Perimeter', 'Infill > Perimeter > Loops', 'Perimeter > Infill > Loops', 'Perimeter > Loops > Infill'], 'Sequence of printing. The perimeter is the outer print edge, the loops are the insides of the walls, and the infill is the insides.'); + c = configBase.SettingRow(right, "Force first layer sequence", 'force_first_layer_sequence', True, 'This setting forces the order of the first layer to be \'Perimeter > Loops > Infill\'') + + configBase.TitleRow(right, "Joris") + c = configBase.SettingRow(right, "Joris the outer edge", 'joris', False, '[Joris] is a code name for smoothing out the Z move of the outer edge. This will create a steady Z increase over the whole print. It is intended to be used with a single walled wall thickness to make cups/vases.') + main.Fit() self.Fit() diff --git a/SkeinPyPy/newui/alterationPanel.py b/Cura/gui/alterationPanel.py similarity index 75% rename from SkeinPyPy/newui/alterationPanel.py rename to Cura/gui/alterationPanel.py index 453cdd4d07..2692b7fad3 100644 --- a/SkeinPyPy/newui/alterationPanel.py +++ b/Cura/gui/alterationPanel.py @@ -1,14 +1,13 @@ import wx import sys,math,threading,os -from fabmetheus_utilities import settings -from fabmetheus_utilities import archive +from util import profile class alterationPanel(wx.Panel): def __init__(self, parent): wx.Panel.__init__(self, parent,-1) - self.alterationFileList = ['start.gcode', 'end.gcode', 'cool_start.gcode', 'cool_end.gcode'] + self.alterationFileList = ['start.gcode', 'end.gcode', 'support_start.gcode', 'support_end.gcode', 'replace.csv'] self.currentFile = None self.textArea = wx.TextCtrl(self, style=wx.TE_MULTILINE|wx.TE_DONTWRAP|wx.TE_PROCESS_TAB) @@ -26,17 +25,18 @@ class alterationPanel(wx.Panel): self.SetSizer(sizer) self.loadFile(self.alterationFileList[self.list.GetSelection()]) + self.currentFile = self.list.GetSelection() def OnSelect(self, e): self.loadFile(self.alterationFileList[self.list.GetSelection()]) self.currentFile = self.list.GetSelection() def loadFile(self, filename): - self.textArea.SetValue(unicode(settings.getAlterationFile(filename, False), "utf-8")) + self.textArea.SetValue(unicode(profile.getAlterationFileContents(filename, False), "utf-8")) def OnFocusLost(self, e): if self.currentFile == self.list.GetSelection(): - filename = os.path.join(archive.getSkeinforgePath('alterations'), self.alterationFileList[self.list.GetSelection()]) + filename = profile.getAlterationFilePath(self.alterationFileList[self.list.GetSelection()]) f = open(filename, "wb") f.write(self.textArea.GetValue().encode("utf-8")) f.close() diff --git a/SkeinPyPy/newui/configBase.py b/Cura/gui/configBase.py similarity index 99% rename from SkeinPyPy/newui/configBase.py rename to Cura/gui/configBase.py index 265a687dfa..9d28af4f64 100644 --- a/SkeinPyPy/newui/configBase.py +++ b/Cura/gui/configBase.py @@ -3,8 +3,8 @@ import __init__ import wx, os, sys, platform, types -from newui import validators -from newui import profile +from gui import validators +from util import profile def main(): app = wx.App(False) diff --git a/SkeinPyPy/newui/configWizard.py b/Cura/gui/configWizard.py similarity index 94% rename from SkeinPyPy/newui/configWizard.py rename to Cura/gui/configWizard.py index 70701586cf..923f5a1447 100644 --- a/SkeinPyPy/newui/configWizard.py +++ b/Cura/gui/configWizard.py @@ -4,8 +4,8 @@ import __init__ import wx, os, platform, types, webbrowser, threading, time, re import wx.wizard -from newui import machineCom -from newui import profile +from gui import machineCom +from util import profile class InfoPage(wx.wizard.WizardPageSimple): def __init__(self, parent, title): @@ -60,10 +60,10 @@ class InfoPage(wx.wizard.WizardPageSimple): class FirstInfoPage(InfoPage): def __init__(self, parent): super(FirstInfoPage, self).__init__(parent, "First time run wizard") - self.AddText('Welcome, and thanks for trying SkeinPyPy!') + self.AddText('Welcome, and thanks for trying Cura!') self.AddSeperator() self.AddText('This wizard will help you with the following steps:') - self.AddText('* Configure SkeinPyPy for your machine') + self.AddText('* Configure Cura for your machine') self.AddText('* Upgrade your firmware') self.AddText('* Calibrate your machine') #self.AddText('* Do your first print') @@ -73,7 +73,7 @@ class RepRapInfoPage(InfoPage): super(RepRapInfoPage, self).__init__(parent, "RepRap information") self.AddText('Sorry, but this wizard will not help you with\nconfiguring and calibrating your RepRap.') self.AddSeperator() - self.AddText('You will have to manually install Marlin firmware\nand configure SkeinPyPy.') + self.AddText('You will have to manually install Marlin or Sprinter firmware\nand configure Cura.') class MachineSelectPage(InfoPage): def __init__(self, parent): @@ -97,17 +97,17 @@ class MachineSelectPage(InfoPage): profile.putPreference('machine_width', '205') profile.putPreference('machine_depth', '205') profile.putPreference('machine_height', '200') - profile.putPreference('nozzle_size', '0.4') + profile.putProfileSetting('nozzle_size', '0.4') profile.putProfileSetting('machine_center_x', '100') profile.putProfileSetting('machine_center_y', '100') else: profile.putPreference('machine_width', '80') profile.putPreference('machine_depth', '80') profile.putPreference('machine_height', '60') - profile.putPreference('nozzle_size', '0.5') + profile.putProfileSetting('nozzle_size', '0.5') profile.putProfileSetting('machine_center_x', '40') profile.putProfileSetting('machine_center_y', '40') - profile.putProfileSetting('wall_thickness', float(profile.getPreference('nozzle_size')) * 2) + profile.putProfileSetting('wall_thickness', float(profile.getProfileSetting('nozzle_size')) * 2) class FirmwareUpgradePage(InfoPage): def __init__(self, parent): @@ -116,7 +116,7 @@ class FirmwareUpgradePage(InfoPage): self.AddHiddenSeperator() self.AddText('The firmware shipping with new Ultimakers works, but upgrades\nhave been made to make better prints, and make calibration easier.') self.AddHiddenSeperator() - self.AddText('SkeinPyPy requires these new features and thus\nyour firmware will most likely need to be upgraded.\nYou will get the chance to do so now.') + self.AddText('Cura requires these new features and thus\nyour firmware will most likely need to be upgraded.\nYou will get the chance to do so now.') upgradeButton, skipUpgradeButton = self.AddDualButton('Upgrade to Marlin firmware', 'Skip upgrade') upgradeButton.Bind(wx.EVT_BUTTON, self.OnUpgradeClick) skipUpgradeButton.Bind(wx.EVT_BUTTON, self.OnSkipClick) diff --git a/Cura/gui/icon.py b/Cura/gui/icon.py new file mode 100644 index 0000000000..8b53bbf70c --- /dev/null +++ b/Cura/gui/icon.py @@ -0,0 +1,27 @@ +#---------------------------------------------------------------------- +# This file was generated by /usr/bin/img2py +# +from wx.lib.embeddedimage import PyEmbeddedImage + +Main = PyEmbeddedImage( + "iVBORw0KGgoAAAANSUhEUgAAABMAAAATCAIAAAD9MqGbAAAAA3NCSVQICAjb4U/gAAAC/klE" + "QVQ4jYWUe0hTYRTAz+5rd5uPys2Z89mtLLecPRQpZw+ishf0gB5EQRZFWY20h/6jGQWSlJRR" + "RFGRFJXRHw3ECpRWbqRZq1WabErqqjWd7XF3d7e72x8rfKX9/jsf349zzncOn6DyPRuPBeAv" + "IY5DUBT+hy2IY/FYII1g2s2mi5Vl7WZTMBhQZS5Qqefbf3w7UlIxeYp0PBkDgMYGXenhAo4L" + "yqcqUqiZpjfGVoMeAFat35yjWTau6f3lrCwrxgn8bNWNxcvzERRl/f4TB3e9ano2ccHYuxcN" + "A46fqzdsWbpybfiIEAr3aUsYH52mzJjAROVJVOdbo7bkdMiod+gbvZYv0Sq1NDZuLoK4Xzc7" + "W43ipBRMEjFK6+cwjKHdABDNsh9KtQAgmTY9cctO1vHTdOxA+FJMTi4ZGzc2JyJTpACAE8fy" + "6l8RUtmfgqWyvAajYuPWcEgHPf8wZ2drAODW1WoylUKFJAA0ftWteaTMb15SPutpbwIUWg4t" + "u5eyXadptj0f0WdBxWWht/+Z7vH929cyvF6cDzVh/k6nmZUwHpR5O0/gDnnykvKtvzp6XJa1" + "1LahPgHg8MlTU6SxN2rO9TNMyEc3XKojRaLIokludFD+nT+jqVZQqS55LhE1ffiGCe588qYR" + "DAAEPe6Wmirn9RoifY4sc0GpvNaHBo62ALIUEFQIJgGdHSNiB9Lnlien7elgSWRoshGRWYXF" + "8es2cV2Wzrs3AUDE4QCAmElKqc08cCUr4ziOitvbynieg/D2DZczL1xzuey2XjPeUeTjaNV5" + "HdgNLk833VuP4ZFCkdw9+ImhbYDPGGGG2f9ik9X5GUeJAMfWPslJFyvEfgcvQAR8aESaURrP" + "c3szTnzsbwMAkrbFdz1kAOwzd29WnxShoveGwj7rg9EvNBZbd52xrYKKW5RI7XA6Wn701A86" + "WhFUSCm1ePKGiUwA0Os03pdWUPMAEOL8jFgBACTdJ5tXLRj1J4yFcRh89qao6ASIWcH5He5A" + "lwRiBqIX/gbbS0S3wHAu3wAAAABJRU5ErkJggg==") +getMainData = Main.GetData +getMainImage = Main.GetImage +getMainBitmap = Main.GetBitmap +getMainIcon = Main.GetIcon + diff --git a/SkeinPyPy/newui/machineCom.py b/Cura/gui/machineCom.py similarity index 93% rename from SkeinPyPy/newui/machineCom.py rename to Cura/gui/machineCom.py index 5f6974d933..ffd816535a 100644 --- a/SkeinPyPy/newui/machineCom.py +++ b/Cura/gui/machineCom.py @@ -1,7 +1,7 @@ from __future__ import absolute_import import __init__ -import os, glob, wx, threading +import os, glob, wx, threading, sys, time from serial import Serial @@ -9,7 +9,7 @@ from avr_isp import stk500v2 from avr_isp import ispBase from avr_isp import intelHex -from newui import profile +from util import profile try: import _winreg @@ -108,7 +108,7 @@ class MachineCom(): if port == None: port = profile.getPreference('serial_port') if baudrate == None: - baudrate = profile.getPreference('serial_baud') + baudrate = int(profile.getPreference('serial_baud')) self.serial = None if port == 'AUTO': programmer = stk500v2.Stk500v2() @@ -116,6 +116,7 @@ class MachineCom(): try: programmer.connect(port) programmer.close() + print "Connecting to: %s %i" % (port, baudrate) self.serial = Serial(port, baudrate, timeout=5) break except ispBase.IspError: @@ -131,9 +132,10 @@ class MachineCom(): def readline(self): if self.serial == None: - return '' + return None ret = self.serial.readline() - print "Recv: " + ret.rstrip() + if ret != '': + print "Recv: " + ret.rstrip() return ret def close(self): @@ -144,5 +146,6 @@ class MachineCom(): def sendCommand(self, cmd): if self.serial == None: return + print 'Send: ' + cmd self.serial.write(cmd + '\n') diff --git a/SkeinPyPy/newui/mainWindow.py b/Cura/gui/mainWindow.py similarity index 82% rename from SkeinPyPy/newui/mainWindow.py rename to Cura/gui/mainWindow.py index 9d04138f25..20a00324ea 100644 --- a/SkeinPyPy/newui/mainWindow.py +++ b/Cura/gui/mainWindow.py @@ -3,33 +3,40 @@ import __init__ import wx, os, platform, types, webbrowser -from newui import configBase -from newui import advancedConfig -from newui import preview3d -from newui import sliceProgessPanel -from newui import alterationPanel -from newui import validators -from newui import preferencesDialog -from newui import configWizard -from newui import machineCom -from newui import profile +from gui import configBase +from gui import advancedConfig +from gui import preview3d +from gui import sliceProgessPanel +from gui import alterationPanel +from gui import validators +from gui import preferencesDialog +from gui import configWizard +from gui import machineCom +from gui import printWindow +from gui import simpleMode +from gui import icon +from util import profile def main(): app = wx.App(False) if profile.getPreference('wizardDone') == 'False': if os.name == 'darwin': - wx.MessageBox('The MacOS version of SkeinPyPy is experimental.\nThere are still UI/usability bugs. Check the issue list at:\nhttps://github.com/daid/SkeinPyPy/issues\nfor details.\nPlease report any extra issue you find.', 'MacOS Warning', wx.OK | wx.ICON_INFORMATION) + wx.MessageBox('The MacOS version of Cura is experimental.\nThere are still UI/usability bugs. Check the issue list at:\nhttps://github.com/daid/Cura/issues\nfor details.\nPlease report any extra issue you find.', 'MacOS Warning', wx.OK | wx.ICON_INFORMATION) configWizard.configWizard() profile.putPreference("wizardDone", "True") - mainWindow() + if profile.getPreference('startMode') == 'Simple': + simpleMode.simpleModeWindow() + else: + mainWindow() app.MainLoop() class mainWindow(configBase.configWindowBase): "Main user interface window" def __init__(self): - super(mainWindow, self).__init__(title='SkeinPyPy') + super(mainWindow, self).__init__(title='Cura') wx.EVT_CLOSE(self, self.OnClose) + self.SetIcon(icon.getMainIcon()) menubar = wx.MenuBar() fileMenu = wx.Menu() @@ -48,6 +55,11 @@ class mainWindow(configBase.configWindowBase): self.Bind(wx.EVT_MENU, self.OnQuit, i) menubar.Append(fileMenu, '&File') + simpleMenu = wx.Menu() + i = simpleMenu.Append(-1, 'Switch to simple mode...') + self.Bind(wx.EVT_MENU, self.OnSimpleSwitch, i) + menubar.Append(simpleMenu, 'Simple') + expertMenu = wx.Menu() i = expertMenu.Append(-1, 'Open expert settings...') self.Bind(wx.EVT_MENU, self.OnExpertOpen, i) @@ -63,9 +75,9 @@ class mainWindow(configBase.configWindowBase): helpMenu = wx.Menu() i = helpMenu.Append(-1, 'Online documentation...') - self.Bind(wx.EVT_MENU, lambda e: webbrowser.open('https://github.com/daid/SkeinPyPy/wiki'), i) + self.Bind(wx.EVT_MENU, lambda e: webbrowser.open('https://github.com/daid/Cura/wiki'), i) i = helpMenu.Append(-1, 'Report a problem...') - self.Bind(wx.EVT_MENU, lambda e: webbrowser.open('https://github.com/daid/SkeinPyPy/issues'), i) + self.Bind(wx.EVT_MENU, lambda e: webbrowser.open('https://github.com/daid/Cura/issues'), i) menubar.Append(helpMenu, 'Help') self.SetMenuBar(menubar) @@ -84,7 +96,7 @@ class mainWindow(configBase.configWindowBase): configBase.TitleRow(left, "Accuracy") c = configBase.SettingRow(left, "Layer height (mm)", 'layer_height', '0.2', 'Layer height in millimeters.\n0.2 is a good value for quick prints.\n0.1 gives high quality prints.') validators.validFloat(c, 0.0) - validators.warningAbove(c, lambda : (float(profile.getPreference('nozzle_size')) * 80 / 100), "Thicker layers then %.2fmm (80%% nozzle size) usually give bad results and are not recommended.") + validators.warningAbove(c, lambda : (float(profile.getProfileSetting('nozzle_size')) * 80 / 100), "Thicker layers then %.2fmm (80%% nozzle size) usually give bad results and are not recommended.") c = configBase.SettingRow(left, "Wall thickness (mm)", 'wall_thickness', '0.8', 'Thickness of the walls.\nThis is used in combination with the nozzle size to define the number\nof perimeter lines and the thickness of those perimeter lines.') validators.validFloat(c, 0.0) validators.wallThicknessValidator(c) @@ -123,9 +135,11 @@ class mainWindow(configBase.configWindowBase): c = configBase.SettingRow(right, "Packing Density", 'filament_density', '1.00', 'Packing density of your filament. This should be 1.00 for PLA and 0.85 for ABS') validators.validFloat(c, 0.5, 1.5) - (left, right) = self.CreateConfigTab(nb, 'Machine config') + (left, right) = self.CreateConfigTab(nb, 'Advanced config') configBase.TitleRow(left, "Machine size") + c = configBase.SettingRow(left, "Nozzle size (mm)", 'nozzle_size', '0.4', 'The nozzle size is very important, this is used to calculate the line width of the infill, and used to calculate the amount of outside wall lines and thickness for the wall thickness you entered in the print settings.') + validators.validFloat(c, 0.1, 1.0) c = configBase.SettingRow(left, "Machine center X (mm)", 'machine_center_x', '100', 'The center of your machine, your print will be placed at this location') validators.validInt(c, 10) configBase.settingNotify(c, self.preview3d.updateCenterX) @@ -155,14 +169,17 @@ class mainWindow(configBase.configWindowBase): configBase.TitleRow(right, "Cool") c = configBase.SettingRow(right, "Minimal layer time (sec)", 'cool_min_layer_time', '10', 'Minimum time spend in a layer, gives the layer time to cool down before the next layer is put on top. If the layer will be placed down too fast the printer will slow down to make sure it has spend atleast this amount of seconds printing this layer.') validators.validFloat(c, 0.0) + c = configBase.SettingRow(right, "Enable cooling fan", 'fan_enabled', True, 'Enable the cooling fan during the print. The extra cooling from the cooling fan is essensial during faster prints.') nb.AddPage(alterationPanel.alterationPanel(nb), "Start/End-GCode") # load and slice buttons. loadButton = wx.Button(self, -1, 'Load Model') sliceButton = wx.Button(self, -1, 'Slice to GCode') + printButton = wx.Button(self, -1, 'Print GCode') self.Bind(wx.EVT_BUTTON, self.OnLoadModel, loadButton) self.Bind(wx.EVT_BUTTON, self.OnSlice, sliceButton) + self.Bind(wx.EVT_BUTTON, self.OnPrint, printButton) #Also bind double clicking the 3D preview to load an STL file. self.preview3d.glCanvas.Bind(wx.EVT_LEFT_DCLICK, self.OnLoadModel, self.preview3d.glCanvas) @@ -174,7 +191,8 @@ class mainWindow(configBase.configWindowBase): sizer.AddGrowableCol(2) sizer.AddGrowableRow(0) sizer.Add(loadButton, (1,1), flag=wx.RIGHT, border=5) - sizer.Add(sliceButton, (1,2)) + sizer.Add(sliceButton, (1,2), flag=wx.RIGHT, border=5) + sizer.Add(printButton, (1,3), flag=wx.RIGHT, border=5) self.sizer = sizer if self.filename != "None": @@ -212,12 +230,17 @@ class mainWindow(configBase.configWindowBase): prefDialog.Centre() prefDialog.Show(True) + def OnSimpleSwitch(self, e): + profile.putPreference('startMode', 'Simple') + simpleMode.simpleModeWindow() + self.Close() + def OnDefaultMarlinFirmware(self, e): machineCom.InstallFirmware(os.path.join(os.path.dirname(os.path.abspath(__file__)), "../firmware/default.hex")) def OnCustomFirmware(self, e): dlg=wx.FileDialog(self, "Open firmware to upload", self.lastPath, style=wx.FD_OPEN|wx.FD_FILE_MUST_EXIST) - dlg.SetWildcard("HEX file (*.hex)|*.hex") + dlg.SetWildcard("HEX file (*.hex)|*.hex;*.HEX") if dlg.ShowModal() == wx.ID_OK: filename = dlg.GetPath() if not(os.path.exists(filename)): @@ -231,7 +254,7 @@ class mainWindow(configBase.configWindowBase): def OnLoadModel(self, e): dlg=wx.FileDialog(self, "Open file to print", self.lastPath, style=wx.FD_OPEN|wx.FD_FILE_MUST_EXIST) - dlg.SetWildcard("STL files (*.stl)|*.stl") + dlg.SetWildcard("STL files (*.stl)|*.stl;*.STL") if dlg.ShowModal() == wx.ID_OK: self.filename=dlg.GetPath() profile.putPreference('lastFile', self.filename) @@ -239,13 +262,12 @@ class mainWindow(configBase.configWindowBase): return self.lastPath = os.path.split(self.filename)[0] self.preview3d.loadModelFile(self.filename) + self.preview3d.setViewMode("Model - Normal") dlg.Destroy() def OnSlice(self, e): if self.filename == None: return - profile.saveGlobalProfile(profile.getDefaultProfilePath()) - #Create a progress panel and add it to the window. The progress panel will start the Skein operation. spp = sliceProgessPanel.sliceProgessPanel(self, self, self.filename) self.sizer.Add(spp, (len(self.progressPanelList)+2,0), span=(1,4), flag=wx.EXPAND) @@ -254,6 +276,15 @@ class mainWindow(configBase.configWindowBase): newSize.IncBy(0, spp.GetSize().GetHeight()) self.SetSize(newSize) self.progressPanelList.append(spp) + + def OnPrint(self, e): + if self.filename == None: + wx.MessageBox('You need to load a file before you can print it.', 'Print error', wx.OK | wx.ICON_INFORMATION) + return + if not os.path.exists(self.filename[: self.filename.rfind('.')] + "_export.gcode"): + wx.MessageBox('You need to slice the file to GCode before you can print it.', 'Print error', wx.OK | wx.ICON_INFORMATION) + return + printWindow.printFile(self.filename[: self.filename.rfind('.')] + "_export.gcode") def OnExpertOpen(self, e): acw = advancedConfig.advancedConfigWindow() @@ -281,3 +312,4 @@ class mainWindow(configBase.configWindowBase): def OnClose(self, e): profile.saveGlobalProfile(profile.getDefaultProfilePath()) self.Destroy() + diff --git a/SkeinPyPy/newui/preferencesDialog.py b/Cura/gui/preferencesDialog.py similarity index 77% rename from SkeinPyPy/newui/preferencesDialog.py rename to Cura/gui/preferencesDialog.py index 539a69a7a9..564a583c57 100644 --- a/SkeinPyPy/newui/preferencesDialog.py +++ b/Cura/gui/preferencesDialog.py @@ -4,9 +4,9 @@ import __init__ import wx, os, platform, types import ConfigParser -from newui import configBase -from newui import validators -from newui import machineCom +from gui import configBase +from gui import validators +from gui import machineCom class preferencesDialog(configBase.configWindowBase): def __init__(self, parent): @@ -16,8 +16,6 @@ class preferencesDialog(configBase.configWindowBase): left, right, main = self.CreateConfigPanel(self) configBase.TitleRow(left, 'Machine settings') - c = configBase.SettingRow(left, "Nozzle size (mm)", 'nozzle_size', '0.4', 'The nozzle size is very important, this is used to calculate the line width of the infill, and used to calculate the amount of outside wall lines and thickness for the wall thickness you entered in the print settings.', type = 'preference') - validators.validFloat(c, 0.1, 1.0) c = configBase.SettingRow(left, 'Steps per E', 'steps_per_e', '0', 'Amount of steps per mm filament extrusion', type = 'preference') validators.validFloat(c, 0.1) c = configBase.SettingRow(left, 'Machine width (mm)', 'machine_width', '205', 'Size of the machine in mm', type = 'preference') @@ -30,6 +28,9 @@ class preferencesDialog(configBase.configWindowBase): configBase.TitleRow(left, 'Communication settings') c = configBase.SettingRow(left, 'Serial port', 'serial_port', ['AUTO'] + machineCom.serialList(), 'Serial port to use for communication with the printer', type = 'preference') c = configBase.SettingRow(left, 'Baudrate', 'serial_baud', '250000', 'Speed of the serial port communication\nNeeds to match your firmware settings\nCommon values are 250000, 115200, 57600', type = 'preference') + + configBase.TitleRow(left, 'Slicer settings') + c = configBase.SettingRow(left, 'Slicer selection', 'slicer', ['Cura (Skeinforge based)', 'Slic3r'], 'Which slicer to use to slice objects. Usually the Cura engine produces the best results. But Slic3r is developing fast and is faster with slicing.', type = 'preference') self.MakeModal(True) main.Fit() diff --git a/SkeinPyPy/newui/preview3d.py b/Cura/gui/preview3d.py similarity index 81% rename from SkeinPyPy/newui/preview3d.py rename to Cura/gui/preview3d.py index 2778b6640b..c27558bd53 100644 --- a/SkeinPyPy/newui/preview3d.py +++ b/Cura/gui/preview3d.py @@ -17,12 +17,10 @@ except: print "Failed to find PyOpenGL: http://pyopengl.sourceforge.net/" hasOpenGLlibs = False -from newui import profile -from newui import gcodeInterpreter -from newui import util3d - -from fabmetheus_utilities.fabmetheus_tools import fabmetheus_interpret -from fabmetheus_utilities.vector3 import Vector3 +from util import profile +from util import gcodeInterpreter +from util import stl +from util import util3d class previewPanel(wx.Panel): def __init__(self, parent): @@ -38,8 +36,8 @@ class previewPanel(wx.Panel): self.modelFilename = None self.loadingProgressAmount = 0 self.loadThread = None - self.machineSize = Vector3(float(profile.getPreference('machine_width')), float(profile.getPreference('machine_depth')), float(profile.getPreference('machine_height'))) - self.machineCenter = Vector3(0, 0, 0) + self.machineSize = util3d.Vector3(float(profile.getPreference('machine_width')), float(profile.getPreference('machine_depth')), float(profile.getPreference('machine_height'))) + self.machineCenter = util3d.Vector3(float(profile.getProfileSetting('machine_center_x')), float(profile.getProfileSetting('machine_center_y')), 0) self.toolbar = wx.ToolBar( self, -1 ) self.toolbar.SetToolBitmapSize( ( 21, 21 ) ) @@ -184,6 +182,11 @@ class previewPanel(wx.Panel): self.moveModel() self.glCanvas.Refresh() + def setViewMode(self, mode): + self.viewSelect.SetValue(mode) + self.glCanvas.viewMode = self.viewSelect.GetValue() + wx.CallAfter(self.glCanvas.Refresh) + def loadModelFile(self, filename): if self.modelFilename != filename: self.modelFileTime = None @@ -203,13 +206,15 @@ class previewPanel(wx.Panel): def loadReModelFile(self, filename): #Only load this again if the filename matches the file we have already loaded (for auto loading GCode after slicing) if self.modelFilename != filename: - return + return False self.loadModelFile(filename) + return True def doFileLoadThread(self): if os.path.isfile(self.modelFilename) and self.modelFileTime != os.stat(self.modelFilename).st_mtime: self.modelFileTime = os.stat(self.modelFilename).st_mtime - triangleMesh = fabmetheus_interpret.getCarving(self.modelFilename) + triangleMesh = stl.stlModel() + triangleMesh.load(self.modelFilename) triangleMesh.origonalVertexes = list(triangleMesh.vertexes) for i in xrange(0, len(triangleMesh.origonalVertexes)): triangleMesh.origonalVertexes[i] = triangleMesh.origonalVertexes[i].copy() @@ -254,7 +259,7 @@ class previewPanel(wx.Panel): def updateToolbar(self): self.layerSpin.Show(self.gcode != None) if self.gcode != None: - self.layerSpin.SetRange(1, self.gcode.layerCount) + self.layerSpin.SetRange(1, len(self.gcode.layerList)) self.toolbar.Realize() def OnViewChange(self, e): @@ -291,9 +296,9 @@ class previewPanel(wx.Panel): self.triangleMesh.vertexes[i].z = self.triangleMesh.origonalVertexes[i].z * scaleZ for face in self.triangleMesh.faces: - v1 = self.triangleMesh.vertexes[face.vertexIndexes[0]] - v2 = self.triangleMesh.vertexes[face.vertexIndexes[1]] - v3 = self.triangleMesh.vertexes[face.vertexIndexes[2]] + v1 = face.v[0] + v2 = face.v[1] + v3 = face.v[2] face.normal = (v2 - v1).cross(v3 - v1) face.normal.normalize() @@ -303,8 +308,8 @@ class previewPanel(wx.Panel): if self.triangleMesh == None: return minZ = self.triangleMesh.getMinimumZ() - min = self.triangleMesh.getCarveCornerMinimum() - max = self.triangleMesh.getCarveCornerMaximum() + min = self.triangleMesh.getMinimum() + max = self.triangleMesh.getMaximum() for v in self.triangleMesh.vertexes: v.z -= minZ v.x -= min.x + (max.x - min.x) / 2 @@ -434,80 +439,76 @@ class PreviewGLCanvas(glcanvas.GLCanvas): layerThickness = 0.0 filamentRadius = float(profile.getProfileSetting('filament_diameter')) / 2 filamentArea = math.pi * filamentRadius * filamentRadius - lineWidth = float(profile.getPreference('nozzle_size')) / 2 + lineWidth = float(profile.getProfileSetting('nozzle_size')) / 2 curLayerNum = 0 - for path in self.parent.gcode.pathList: - if path['layerNr'] != curLayerNum: - prevLayerZ = curLayerZ - curLayerZ = path['list'][1].z - curLayerNum = path['layerNr'] - layerThickness = curLayerZ - prevLayerZ - - c = 1.0 - if path['layerNr'] != self.parent.layerSpin.GetValue(): - if path['layerNr'] < self.parent.layerSpin.GetValue(): - c = 0.9 - (self.parent.layerSpin.GetValue() - path['layerNr']) * 0.1 - if c < 0.4: - c = 0.4 - else: - break - if path['type'] == 'move': - glColor3f(0,0,c) - if path['type'] == 'extrude': - if path['pathType'] == 'FILL': - glColor3f(c/2,c/2,0) - elif path['pathType'] == 'WALL-INNER': - glColor3f(0,c,0) - else: - glColor3f(c,0,0) - if path['type'] == 'retract': - glColor3f(0,c,c) - if c > 0.4 and path['type'] == 'extrude': - for i in xrange(0, len(path['list'])-1): - v0 = path['list'][i] - v1 = path['list'][i+1] - - # Calculate line width from ePerDistance (needs layer thickness and filament diameter) - dist = (v0 - v1).vsize() - if dist > 0 and layerThickness > 0: - extrusionMMperDist = (v1.e - v0.e) / (v0 - v1).vsize() - lineWidth = extrusionMMperDist * filamentArea / layerThickness / 2 - - normal = (v0 - v1).cross(util3d.Vector3(0,0,1)) - normal.normalize() - v2 = v0 + normal * lineWidth - v3 = v1 + normal * lineWidth - v0 = v0 - normal * lineWidth - v1 = v1 - normal * lineWidth - - glBegin(GL_QUADS) - if path['pathType'] == 'FILL': #Remove depth buffer fighting on infill/wall overlap - glVertex3f(v0.x, v0.y, v0.z - 0.02) - glVertex3f(v1.x, v1.y, v1.z - 0.02) - glVertex3f(v3.x, v3.y, v3.z - 0.02) - glVertex3f(v2.x, v2.y, v2.z - 0.02) + for layer in self.parent.gcode.layerList: + for path in layer: + c = 1.0 + if curLayerNum != self.parent.layerSpin.GetValue(): + if curLayerNum < self.parent.layerSpin.GetValue(): + c = 0.9 - (self.parent.layerSpin.GetValue() - curLayerNum) * 0.1 + if c < 0.4: + c = 0.4 else: - glVertex3f(v0.x, v0.y, v0.z - 0.01) - glVertex3f(v1.x, v1.y, v1.z - 0.01) - glVertex3f(v3.x, v3.y, v3.z - 0.01) - glVertex3f(v2.x, v2.y, v2.z - 0.01) - glEnd() + break + if path.type == 'move': + glColor3f(0,0,c) + if path.type == 'extrude': + if path.pathType == 'FILL': + glColor3f(c/2,c/2,0) + elif path.pathType == 'WALL-INNER': + glColor3f(0,c,0) + else: + glColor3f(c,0,0) + if path.type == 'retract': + glColor3f(0,c,c) + if c > 0.4 and path.type == 'extrude': + for i in xrange(0, len(path.list)-1): + v0 = path.list[i] + v1 = path.list[i+1] + + # Calculate line width from ePerDistance (needs layer thickness and filament diameter) + dist = (v0 - v1).vsize() + if dist > 0 and layerThickness > 0: + extrusionMMperDist = (v1.e - v0.e) / dist + lineWidth = extrusionMMperDist * filamentArea / layerThickness / 2 + + normal = (v0 - v1).cross(util3d.Vector3(0,0,1)) + normal.normalize() + v2 = v0 + normal * lineWidth + v3 = v1 + normal * lineWidth + v0 = v0 - normal * lineWidth + v1 = v1 - normal * lineWidth + + glBegin(GL_QUADS) + if path.pathType == 'FILL': #Remove depth buffer fighting on infill/wall overlap + glVertex3f(v0.x, v0.y, v0.z - 0.02) + glVertex3f(v1.x, v1.y, v1.z - 0.02) + glVertex3f(v3.x, v3.y, v3.z - 0.02) + glVertex3f(v2.x, v2.y, v2.z - 0.02) + else: + glVertex3f(v0.x, v0.y, v0.z - 0.01) + glVertex3f(v1.x, v1.y, v1.z - 0.01) + glVertex3f(v3.x, v3.y, v3.z - 0.01) + glVertex3f(v2.x, v2.y, v2.z - 0.01) + glEnd() - #for v in path['list']: - # glBegin(GL_TRIANGLE_FAN) - # glVertex3f(v.x, v.y, v.z - 0.001) - # for i in xrange(0, 16+1): - # if path['pathType'] == 'FILL': #Remove depth buffer fighting on infill/wall overlap - # glVertex3f(v.x + math.cos(math.pi*2/16*i) * lineWidth, v.y + math.sin(math.pi*2/16*i) * lineWidth, v.z - 0.02) - # else: - # glVertex3f(v.x + math.cos(math.pi*2/16*i) * lineWidth, v.y + math.sin(math.pi*2/16*i) * lineWidth, v.z - 0.01) - # glEnd() - else: - glBegin(GL_LINE_STRIP) - for v in path['list']: - glVertex3f(v.x, v.y, v.z) - glEnd() + #for v in path['list']: + # glBegin(GL_TRIANGLE_FAN) + # glVertex3f(v.x, v.y, v.z - 0.001) + # for i in xrange(0, 16+1): + # if path['pathType'] == 'FILL': #Remove depth buffer fighting on infill/wall overlap + # glVertex3f(v.x + math.cos(math.pi*2/16*i) * lineWidth, v.y + math.sin(math.pi*2/16*i) * lineWidth, v.z - 0.02) + # else: + # glVertex3f(v.x + math.cos(math.pi*2/16*i) * lineWidth, v.y + math.sin(math.pi*2/16*i) * lineWidth, v.z - 0.01) + # glEnd() + else: + glBegin(GL_LINE_STRIP) + for v in path.list: + glVertex3f(v.x, v.y, v.z) + glEnd() + curLayerNum += 1 glEndList() if self.viewMode == "GCode" or self.viewMode == "Mixed": glCallList(self.gcodeDisplayList) @@ -519,7 +520,7 @@ class PreviewGLCanvas(glcanvas.GLCanvas): self.parent.modelDirty = False multiX = int(profile.getProfileSetting('model_multiply_x')) multiY = int(profile.getProfileSetting('model_multiply_y')) - modelSize = self.parent.triangleMesh.getCarveCornerMaximum() - self.parent.triangleMesh.getCarveCornerMinimum() + modelSize = self.parent.triangleMesh.getMaximum() - self.parent.triangleMesh.getMinimum() glNewList(self.modelDisplayList, GL_COMPILE) glPushMatrix() glTranslate(-(modelSize.x+10)*(multiX-1)/2,-(modelSize.y+10)*(multiY-1)/2, 0) @@ -529,9 +530,9 @@ class PreviewGLCanvas(glcanvas.GLCanvas): glPushMatrix() glTranslate((modelSize.x+10)*mx,(modelSize.y+10)*my, 0) glBegin(GL_TRIANGLES) - v1 = self.parent.triangleMesh.vertexes[face.vertexIndexes[0]] - v2 = self.parent.triangleMesh.vertexes[face.vertexIndexes[1]] - v3 = self.parent.triangleMesh.vertexes[face.vertexIndexes[2]] + v1 = face.v[0] + v2 = face.v[1] + v3 = face.v[2] glNormal3f(face.normal.x, face.normal.y, face.normal.z) glVertex3f(v1.x, v1.y, v1.z) glVertex3f(v2.x, v2.y, v2.z) @@ -658,7 +659,7 @@ class PreviewGLCanvas(glcanvas.GLCanvas): glRotate(-self.pitch, 1,0,0) glRotate(self.yaw, 0,0,1) if self.parent.triangleMesh != None: - glTranslate(0,0,-self.parent.triangleMesh.getCarveCornerMaximum().z / 2) + glTranslate(0,0,-self.parent.triangleMesh.getMaximum().z / 2) else: glTranslate(self.offsetX, self.offsetY, 0) diff --git a/Cura/gui/printWindow.py b/Cura/gui/printWindow.py new file mode 100644 index 0000000000..7eae41fdb7 --- /dev/null +++ b/Cura/gui/printWindow.py @@ -0,0 +1,179 @@ +from __future__ import absolute_import +import __init__ + +import wx, threading + +from gui import machineCom +from gui import icon +from util import gcodeInterpreter + +printWindowHandle = None + +def printFile(filename): + global printWindowHandle + if printWindowHandle == None: + printWindowHandle = printWindow() + printWindowHandle.Show(True) + printWindowHandle.Raise() + printWindowHandle.LoadGCodeFile(filename) + +class printWindow(wx.Frame): + "Main user interface window" + def __init__(self): + super(printWindow, self).__init__(None, -1, title='Printing') + self.machineCom = None + self.machineConnected = False + self.thread = None + self.gcodeList = None + self.printIdx = None + self.bufferLineCount = 4 + self.sendCnt = 0 + + self.SetIcon(icon.getMainIcon()) + + self.SetSizer(wx.BoxSizer()) + self.panel = wx.Panel(self) + self.GetSizer().Add(self.panel, 1, flag=wx.EXPAND) + self.sizer = wx.GridBagSizer(2, 2) + self.panel.SetSizer(self.sizer) + + sb = wx.StaticBox(self.panel, label="Statistics") + boxsizer = wx.StaticBoxSizer(sb, wx.VERTICAL) + self.statsText = wx.StaticText(self.panel, -1, "Filament: #.##m #.##g\nPrint time: ##:##") + boxsizer.Add(self.statsText, flag=wx.LEFT, border=5) + + self.sizer.Add(boxsizer, pos=(0,0), span=(4,1), flag=wx.EXPAND) + + self.connectButton = wx.Button(self.panel, -1, 'Connect') + self.loadButton = wx.Button(self.panel, -1, 'Load GCode') + self.printButton = wx.Button(self.panel, -1, 'Print GCode') + self.cancelButton = wx.Button(self.panel, -1, 'Cancel print') + self.progress = wx.Gauge(self.panel, -1) + self.sizer.Add(self.connectButton, pos=(0,1)) + self.sizer.Add(self.loadButton, pos=(1,1)) + self.sizer.Add(self.printButton, pos=(2,1)) + self.sizer.Add(self.cancelButton, pos=(3,1)) + self.sizer.Add(self.progress, pos=(4,0), span=(1,2), flag=wx.EXPAND) + self.sizer.AddGrowableRow(3) + self.sizer.AddGrowableCol(0) + + self.Bind(wx.EVT_CLOSE, self.OnClose) + self.connectButton.Bind(wx.EVT_BUTTON, self.OnConnect) + self.loadButton.Bind(wx.EVT_BUTTON, self.OnLoad) + self.printButton.Bind(wx.EVT_BUTTON, self.OnPrint) + self.cancelButton.Bind(wx.EVT_BUTTON, self.OnCancel) + + self.Layout() + self.Fit() + self.Centre() + + self.UpdateButtonStates() + self.UpdateProgress() + + def UpdateButtonStates(self): + self.connectButton.Enable(not self.machineConnected) + self.loadButton.Enable(self.printIdx == None) + self.printButton.Enable(self.machineConnected and self.gcodeList != None and self.printIdx == None) + self.cancelButton.Enable(self.printIdx != None) + + def UpdateProgress(self): + status = "" + if self.printIdx == None: + self.progress.SetValue(0) + else: + self.progress.SetValue(self.printIdx) + status += 'Line: %d/%d\n' % (self.printIdx, len(self.gcodeList)) + self.statsText.SetLabel(status) + + def OnConnect(self, e): + if self.machineCom != None: + self.machineCom.close() + self.thread.join() + self.machineCom = machineCom.MachineCom() + self.thread = threading.Thread(target=self.PrinterMonitor) + self.thread.start() + self.UpdateButtonStates() + + def OnLoad(self, e): + pass + + def OnPrint(self, e): + if not self.machineConnected: + return + if self.gcodeList == None: + return + if self.printIdx != None: + return + self.printIdx = 1 + self.sendLine(0) + self.sendCnt = self.bufferLineCount + self.UpdateButtonStates() + + def OnCancel(self, e): + self.printIdx = None + self.UpdateButtonStates() + + def OnClose(self, e): + global printWindowHandle + printWindowHandle = None + if self.machineCom != None: + self.machineCom.close() + self.thread.join() + self.Destroy() + + def LoadGCodeFile(self, filename): + gcodeList = ["M110"] + for line in open(filename, 'r'): + if ';' in line: + line = line[0:line.find(';')] + line = line.strip() + if len(line) > 0: + gcodeList.append(line) + gcode = gcodeInterpreter.gcode() + gcode.loadList(gcodeList) + print gcode.extrusionAmount + print gcode.totalMoveTimeMinute + print "Loaded: %s (%d)" % (filename, len(gcodeList)) + self.progress.SetRange(len(gcodeList)) + self.gcodeList = gcodeList + self.UpdateButtonStates() + self.UpdateProgress() + + def sendLine(self, lineNr): + if lineNr >= len(self.gcodeList): + return + checksum = reduce(lambda x,y:x^y, map(ord, "N%d%s" % (lineNr, self.gcodeList[lineNr]))) + self.machineCom.sendCommand("N%d%s*%d" % (lineNr, self.gcodeList[lineNr], checksum)) + + def PrinterMonitor(self): + skipCount = 0 + while True: + line = self.machineCom.readline() + if line == None: + self.machineConnected = False + wx.CallAfter(self.UpdateButtonState) + return + if self.machineConnected: + while self.sendCnt > 0: + self.sendLine(self.printIdx) + self.printIdx += 1 + self.sendCnt -= 1 + elif line.startswith("start"): + self.machineConnected = True + wx.CallAfter(self.UpdateButtonState) + if self.printIdx != None: + if line.startswith("ok"): + if skipCount > 0: + skipCount -= 1 + else: + self.sendLine(self.printIdx) + self.printIdx += 1 + wx.CallAfter(self.UpdateProgress) + elif "resend" in line.lower() or "rs" in line: + try: + lineNr=int(line.replace("N:"," ").replace("N"," ").replace(":"," ").split()[-1]) + except: + if "rs" in line: + lineNr=int(line.split()[1]) + self.printIdx = lineNr + #we should actually resend the line here, but we also get an "ok" for each error from Marlin. And thus we'll resend on the OK. diff --git a/Cura/gui/simpleMode.py b/Cura/gui/simpleMode.py new file mode 100644 index 0000000000..13954fd10b --- /dev/null +++ b/Cura/gui/simpleMode.py @@ -0,0 +1,299 @@ +from __future__ import absolute_import +import __init__ + +import wx, os, platform, types, webbrowser + +from gui import configBase +from gui import preview3d +from gui import sliceProgessPanel +from gui import validators +from gui import preferencesDialog +from gui import configWizard +from gui import machineCom +from gui import printWindow +from gui import icon +from util import profile + +class simpleModeWindow(configBase.configWindowBase): + "Main user interface window for simple mode" + def __init__(self): + super(simpleModeWindow, self).__init__(title='Cura - Simple mode') + + wx.EVT_CLOSE(self, self.OnClose) + self.SetIcon(icon.getMainIcon()) + + menubar = wx.MenuBar() + fileMenu = wx.Menu() + i = fileMenu.Append(-1, 'Load model file...') + self.Bind(wx.EVT_MENU, self.OnLoadModel, i) + fileMenu.AppendSeparator() + i = fileMenu.Append(-1, 'Preferences...') + self.Bind(wx.EVT_MENU, self.OnPreferences, i) + fileMenu.AppendSeparator() + i = fileMenu.Append(wx.ID_EXIT, 'Quit') + self.Bind(wx.EVT_MENU, self.OnQuit, i) + menubar.Append(fileMenu, '&File') + + expertMenu = wx.Menu() + i = expertMenu.Append(-1, 'Switch to Normal mode...') + self.Bind(wx.EVT_MENU, self.OnNormalSwitch, i) + expertMenu.AppendSeparator() + i = expertMenu.Append(-1, 'ReRun first run wizard...') + self.Bind(wx.EVT_MENU, self.OnFirstRunWizard, i) + menubar.Append(expertMenu, 'Expert') + + helpMenu = wx.Menu() + i = helpMenu.Append(-1, 'Online documentation...') + self.Bind(wx.EVT_MENU, lambda e: webbrowser.open('https://github.com/daid/Cura/wiki'), i) + i = helpMenu.Append(-1, 'Report a problem...') + self.Bind(wx.EVT_MENU, lambda e: webbrowser.open('https://github.com/daid/Cura/issues'), i) + menubar.Append(helpMenu, 'Help') + self.SetMenuBar(menubar) + + self.lastPath = "" + self.filename = profile.getPreference('lastFile') + self.progressPanelList = [] + + #Preview window + self.preview3d = preview3d.previewPanel(self) + + configPanel = wx.Panel(self) + self.printTypeNormal = wx.RadioButton(configPanel, -1, 'Normal quality print', style=wx.RB_GROUP) + self.printTypeLow = wx.RadioButton(configPanel, -1, 'Fast low quality print') + self.printTypeHigh = wx.RadioButton(configPanel, -1, 'High quality print') + self.printTypeJoris = wx.RadioButton(configPanel, -1, 'Thin walled cup or vase') + + self.printMaterialPLA = wx.RadioButton(configPanel, -1, 'PLA', style=wx.RB_GROUP) + self.printMaterialABS = wx.RadioButton(configPanel, -1, 'ABS') + self.printMaterialDiameter = wx.TextCtrl(configPanel, -1, profile.getProfileSetting('filament_diameter')) + + self.printSupport = wx.CheckBox(configPanel, -1, 'Print support structure') + + sizer = wx.GridBagSizer() + configPanel.SetSizer(sizer) + + sb = wx.StaticBox(configPanel, label="Select a print type:") + boxsizer = wx.StaticBoxSizer(sb, wx.VERTICAL) + boxsizer.Add(self.printTypeNormal) + boxsizer.Add(self.printTypeLow) + boxsizer.Add(self.printTypeHigh) + boxsizer.Add(self.printTypeJoris) + sizer.Add(boxsizer, (0,0), flag=wx.EXPAND) + + sb = wx.StaticBox(configPanel, label="Material:") + boxsizer = wx.StaticBoxSizer(sb, wx.VERTICAL) + boxsizer.Add(self.printMaterialPLA) + boxsizer.Add(self.printMaterialABS) + boxsizer.Add(wx.StaticText(configPanel, -1, 'Diameter:')) + boxsizer.Add(self.printMaterialDiameter) + sizer.Add(boxsizer, (1,0), flag=wx.EXPAND) + + sb = wx.StaticBox(configPanel, label="Other:") + boxsizer = wx.StaticBoxSizer(sb, wx.VERTICAL) + boxsizer.Add(self.printSupport) + sizer.Add(boxsizer, (2,0), flag=wx.EXPAND) + + # load and slice buttons. + loadButton = wx.Button(self, -1, 'Load Model') + sliceButton = wx.Button(self, -1, 'Slice to GCode') + printButton = wx.Button(self, -1, 'Print GCode') + self.Bind(wx.EVT_BUTTON, self.OnLoadModel, loadButton) + self.Bind(wx.EVT_BUTTON, self.OnSlice, sliceButton) + self.Bind(wx.EVT_BUTTON, self.OnPrint, printButton) + #Also bind double clicking the 3D preview to load an STL file. + self.preview3d.glCanvas.Bind(wx.EVT_LEFT_DCLICK, self.OnLoadModel, self.preview3d.glCanvas) + + #Main sizer, to position the preview window, buttons and tab control + sizer = wx.GridBagSizer() + self.SetSizer(sizer) + sizer.Add(configPanel, (0,0), span=(1,1), flag=wx.EXPAND) + sizer.Add(self.preview3d, (0,1), span=(1,3), flag=wx.EXPAND) + sizer.AddGrowableCol(2) + sizer.AddGrowableRow(0) + sizer.Add(loadButton, (1,1), flag=wx.RIGHT, border=5) + sizer.Add(sliceButton, (1,2), flag=wx.RIGHT, border=5) + sizer.Add(printButton, (1,3), flag=wx.RIGHT, border=5) + self.sizer = sizer + + if self.filename != "None": + self.preview3d.loadModelFile(self.filename) + self.lastPath = os.path.split(self.filename)[0] + + self.updateProfileToControls() + + self.Fit() + self.SetMinSize(self.GetSize()) + self.Centre() + self.Show(True) + + def OnPreferences(self, e): + prefDialog = preferencesDialog.preferencesDialog(self) + prefDialog.Centre() + prefDialog.Show(True) + + def OnDefaultMarlinFirmware(self, e): + machineCom.InstallFirmware(os.path.join(os.path.dirname(os.path.abspath(__file__)), "../firmware/default.hex")) + + def OnCustomFirmware(self, e): + dlg=wx.FileDialog(self, "Open firmware to upload", self.lastPath, style=wx.FD_OPEN|wx.FD_FILE_MUST_EXIST) + dlg.SetWildcard("HEX file (*.hex)|*.hex;*.HEX") + if dlg.ShowModal() == wx.ID_OK: + filename = dlg.GetPath() + if not(os.path.exists(filename)): + return + #For some reason my Ubuntu 10.10 crashes here. + machineCom.InstallFirmware(filename) + + def OnFirstRunWizard(self, e): + configWizard.configWizard() + self.updateProfileToControls() + + def OnLoadModel(self, e): + dlg=wx.FileDialog(self, "Open file to print", self.lastPath, style=wx.FD_OPEN|wx.FD_FILE_MUST_EXIST) + dlg.SetWildcard("STL files (*.stl)|*.stl;*.STL") + if dlg.ShowModal() == wx.ID_OK: + self.filename=dlg.GetPath() + profile.putPreference('lastFile', self.filename) + if not(os.path.exists(self.filename)): + return + self.lastPath = os.path.split(self.filename)[0] + self.preview3d.loadModelFile(self.filename) + self.preview3d.setViewMode("Model - Normal") + dlg.Destroy() + + def OnSlice(self, e): + if self.filename == None: + return + #save the current profile so we can put it back latter + oldProfile = profile.getGlobalProfileString() + + put = profile.putProfileSetting + get = profile.getProfileSetting + + put('layer_height', '0.2') + put('wall_thickness', '0.8') + put('solid_layer_thickness', '0.6') + put('fill_density', '20') + put('skirt_line_count', '1') + put('skirt_gap', '6.0') + put('print_speed', '50') + put('print_temperature', '0') + put('support', 'None') + #put('machine_center_x', '100') + #put('machine_center_y', '100') + #put('retraction_min_travel', '5.0') + #put('retraction_speed', '13.5') + #put('retraction_amount', '0.0') + #put('retraction_extra', '0.0') + put('travel_speed', '150') + put('max_z_speed', '1.0') + put('bottom_layer_speed', '25') + put('cool_min_layer_time', '10') + put('fan_enabled', 'True') + put('fan_layer', '0') + put('fan_speed', '100') + #put('model_scale', '1.0') + #put('flip_x', 'False') + #put('flip_y', 'False') + #put('flip_z', 'False') + #put('model_rotate_base', '0') + #put('model_multiply_x', '1') + #put('model_multiply_y', '1') + put('extra_base_wall_thickness', '0.0') + put('sequence', 'Loops > Perimeter > Infill') + put('force_first_layer_sequence', 'True') + put('infill_type', 'Line') + put('solid_top', 'True') + put('fill_overlap', '15') + put('support_rate', '100') + put('support_distance', '0.5') + put('joris', 'False') + put('cool_min_feedrate', '5') + put('bridge_speed', '100') + put('bridge_material_amount', '100') + put('raft_margin', '5') + put('raft_base_material_amount', '100') + put('raft_interface_material_amount', '100') + + if self.printSupport.GetValue(): + put('support', 'Exterior Only') + + nozzle_size = float(get('nozzle_size')) + if self.printTypeNormal.GetValue(): + put('wall_thickness', nozzle_size * 2.0) + put('layer_height', '0.2') + put('fill_density', '20') + elif self.printTypeLow.GetValue(): + put('wall_thickness', nozzle_size * 1.0) + put('layer_height', '0.3') + put('fill_density', '10') + put('print_speed', '80') + put('bottom_layer_speed', '40') + elif self.printTypeHigh.GetValue(): + put('wall_thickness', nozzle_size * 3.0) + put('layer_height', '0.1') + put('fill_density', '30') + put('bottom_layer_speed', '15') + elif self.printTypeJoris.GetValue(): + put('wall_thickness', nozzle_size * 1.5) + put('layer_height', '0.2') + put('fill_density', '0') + put('joris', 'True') + put('extra_base_wall_thickness', '15.0') + put('sequence', 'Infill > Loops > Perimeter') + put('force_first_layer_sequence', 'False') + put('solid_top', 'False') + put('support', 'None') + + put('filament_diameter', self.printMaterialDiameter.GetValue()) + if self.printMaterialPLA.GetValue(): + put('filament_density', '1.00') + put('enable_raft', 'False') + put('skirt_line_count', '1') + else: + put('filament_density', '0.85') + put('enable_raft', 'True') + put('skirt_line_count', '0') + put('fan_layer', '1') + + #Create a progress panel and add it to the window. The progress panel will start the Skein operation. + spp = sliceProgessPanel.sliceProgessPanel(self, self, self.filename) + self.sizer.Add(spp, (len(self.progressPanelList)+2,0), span=(1,4), flag=wx.EXPAND) + self.sizer.Layout() + newSize = self.GetSize(); + newSize.IncBy(0, spp.GetSize().GetHeight()) + self.SetSize(newSize) + self.progressPanelList.append(spp) + + #Restore the old profile. + profile.loadGlobalProfileFromString(oldProfile) + + def OnPrint(self, e): + printWindow.printWindow() + + def OnNormalSwitch(self, e): + from gui import mainWindow + profile.putPreference('startMode', 'Normal') + mainWindow.mainWindow() + self.Close() + + def removeSliceProgress(self, spp): + self.progressPanelList.remove(spp) + newSize = self.GetSize(); + newSize.IncBy(0, -spp.GetSize().GetHeight()) + self.SetSize(newSize) + self.sizer.Remove(spp) + spp.Destroy() + for spp in self.progressPanelList: + self.sizer.Remove(spp) + i = 2 + for spp in self.progressPanelList: + self.sizer.Add(spp, (i,0), span=(1,4), flag=wx.EXPAND) + i += 1 + self.sizer.Layout() + + def OnQuit(self, e): + self.Close() + + def OnClose(self, e): + self.Destroy() diff --git a/SkeinPyPy/newui/sliceProgessPanel.py b/Cura/gui/sliceProgessPanel.py similarity index 93% rename from SkeinPyPy/newui/sliceProgessPanel.py rename to Cura/gui/sliceProgessPanel.py index ba10bb4def..bdf2e82e0c 100644 --- a/SkeinPyPy/newui/sliceProgessPanel.py +++ b/Cura/gui/sliceProgessPanel.py @@ -8,7 +8,7 @@ import threading import subprocess import time -from newui import sliceRun +from util import sliceRun class sliceProgessPanel(wx.Panel): def __init__(self, mainWindow, parent, filename): @@ -57,7 +57,8 @@ class sliceProgessPanel(wx.Panel): self.prevStep = 'start' self.totalDoneFactor = 0.0 self.startTime = time.time() - self.thread = WorkerThread(self, filename) + p = subprocess.Popen(sliceRun.getSliceCommand(self.filename), stdout=subprocess.PIPE, stderr=subprocess.STDOUT) + self.thread = WorkerThread(self, filename, p) def OnAbort(self, e): if self.abort: @@ -67,8 +68,7 @@ class sliceProgessPanel(wx.Panel): def OnShowGCode(self, e): self.mainWindow.preview3d.loadModelFile(self.filename) - self.mainWindow.preview3d.viewSelect.SetValue("GCode") - self.mainWindow.preview3d.OnViewChange(None) + self.mainWindow.preview3d.setViewMode("GCode") def OnShowLog(self, e): LogWindow('\n'.join(self.progressLog)) @@ -93,7 +93,8 @@ class sliceProgessPanel(wx.Panel): self.sizer.Layout() self.Layout() self.abort = True - self.mainWindow.preview3d.loadReModelFile(self.filename) + if self.mainWindow.preview3d.loadReModelFile(self.filename): + self.mainWindow.preview3d.setViewMode("GCode") def SetProgress(self, stepName, layer, maxLayer): if self.prevStep != stepName: @@ -108,14 +109,15 @@ class sliceProgessPanel(wx.Panel): self.statusText.SetLabel(stepName + " [" + str(layer) + "/" + str(maxLayer) + "]") class WorkerThread(threading.Thread): - def __init__(self, notifyWindow, filename): + def __init__(self, notifyWindow, filename, process): threading.Thread.__init__(self) self.filename = filename self.notifyWindow = notifyWindow + self.process = process self.start() def run(self): - p = subprocess.Popen(sliceRun.getSliceCommand(self.filename), stdout=subprocess.PIPE, stderr=subprocess.STDOUT) + p = self.process line = p.stdout.readline() maxValue = 1 self.progressLog = [] diff --git a/SkeinPyPy/newui/validators.py b/Cura/gui/validators.py similarity index 96% rename from SkeinPyPy/newui/validators.py rename to Cura/gui/validators.py index 79a3d318ae..d7db5c8283 100644 --- a/SkeinPyPy/newui/validators.py +++ b/Cura/gui/validators.py @@ -4,7 +4,7 @@ import __init__ import types import math -from newui import profile +from util import profile SUCCESS = 0 WARNING = 1 @@ -75,7 +75,7 @@ class wallThicknessValidator(): def validate(self): try: wallThickness = float(self.setting.GetValue()) - nozzleSize = float(profile.getPreference('nozzle_size')) + nozzleSize = float(profile.getProfileSetting('nozzle_size')) if wallThickness <= nozzleSize * 0.5: return ERROR, 'Trying to print walls thinner then the half of your nozzle size, this will not produce anything usable' if wallThickness <= nozzleSize * 0.85: @@ -100,7 +100,7 @@ class printSpeedValidator(): def validate(self): try: - nozzleSize = float(profile.getPreference('nozzle_size')) + nozzleSize = float(profile.getProfileSetting('nozzle_size')) layerHeight = float(profile.getProfileSetting('layer_height')) printSpeed = float(profile.getProfileSetting('print_speed')) diff --git a/Cura/util/__init__.py b/Cura/util/__init__.py new file mode 100644 index 0000000000..4870325b1f --- /dev/null +++ b/Cura/util/__init__.py @@ -0,0 +1,9 @@ +import os +import sys + +numberOfLevelsDeepInPackageHierarchy = 1 +packageFilePath = os.path.abspath(__file__) +for level in range( numberOfLevelsDeepInPackageHierarchy + 1 ): + packageFilePath = os.path.dirname( packageFilePath ) +if packageFilePath not in sys.path: + sys.path.insert( 0, packageFilePath ) diff --git a/SkeinPyPy/newui/gcodeInterpreter.py b/Cura/util/gcodeInterpreter.py similarity index 75% rename from SkeinPyPy/newui/gcodeInterpreter.py rename to Cura/util/gcodeInterpreter.py index cd10cdfa79..06ebd5ac6d 100644 --- a/SkeinPyPy/newui/gcodeInterpreter.py +++ b/Cura/util/gcodeInterpreter.py @@ -3,49 +3,76 @@ import __init__ import sys import math -import threading import re import os -from newui import util3d +from util import util3d + +class gcodePath(): + def __init__(self, newType, pathType, startPoint): + self.type = newType + self.pathType = pathType + self.list = [startPoint] class gcode(): def __init__(self): self.regMatch = {} - self.layerCount = 0 - self.pathList = [] + self.layerList = [] self.extrusionAmount = 0 self.totalMoveTimeMinute = 0 self.progressCallback = None def load(self, filename): - fileSize = os.stat(filename).st_size - filePos = 0 + self._fileSize = os.stat(filename).st_size gcodeFile = open(filename, 'r') + self._load(gcodeFile) + gcodeFile.close() + + def loadList(self, l): + self._load(l) + + def _load(self, gcodeFile): + filePos = 0 pos = util3d.Vector3() posOffset = util3d.Vector3() currentE = 0.0 totalExtrusion = 0.0 maxExtrusion = 0.0 totalMoveTimeMinute = 0.0 - pathList = [] scale = 1.0 posAbs = True feedRate = 3600 pathType = 'CUSTOM'; - layerNr = 0; #Note layer 0 will be the start code. startCodeDone = False - currentPath = {'type': 'move', 'pathType': pathType, 'list': [pos.copy()], 'layerNr': layerNr} - currentPath['list'][-1].e = totalExtrusion + currentLayer = [] + currentPath = gcodePath('move', pathType, pos.copy()) + currentPath.list[0].e = totalExtrusion + currentLayer.append(currentPath) for line in gcodeFile: - if filePos != gcodeFile.tell(): - filePos = gcodeFile.tell() - if self.progressCallback != None: - self.progressCallback(float(filePos) / float(fileSize)) + if self.progressCallback != None: + if filePos != gcodeFile.tell(): + filePos = gcodeFile.tell() + self.progressCallback(float(filePos) / float(self._fileSize)) + + #Parse Cura_SF comments if line.startswith(';TYPE:'): pathType = line[6:].strip() if pathType != "CUSTOM": startCodeDone = True + + if ';' in line: + #Slic3r GCode comment parser + comment = line[line.find(';')+1:].strip() + if comment == 'fill': + pathType = 'FILL' + elif comment == 'perimeter': + pathType = 'WALL-INNER' + elif comment == 'skirt': + pathType = 'SKIRT' + if pathType != "CUSTOM": + startCodeDone = True + line = line[0:line.find(';')] + G = self.getCodeInt(line, 'G') if G is not None: if G == 0 or G == 1: #Move @@ -70,8 +97,10 @@ class gcode(): pos.z = z * scale else: pos.z += z * scale + #Check if we have a new layer. if oldPos.z != pos.z and startCodeDone: - layerNr += 1 + self.layerList.append(currentLayer) + currentLayer = [] if f is not None: feedRate = f if x is not None or y is not None or z is not None: @@ -94,11 +123,12 @@ class gcode(): currentE += e if totalExtrusion > maxExtrusion: maxExtrusion = totalExtrusion - if currentPath['type'] != moveType or currentPath['pathType'] != pathType: - pathList.append(currentPath) - currentPath = {'type': moveType, 'pathType': pathType, 'list': [currentPath['list'][-1]], 'layerNr': layerNr} - currentPath['list'].append(pos.copy()) - currentPath['list'][-1].e = totalExtrusion + if currentPath.type != moveType or currentPath.pathType != pathType: + currentPath = gcodePath(moveType, pathType, currentPath.list[-1]) + currentLayer.append(currentPath) + newPos = pos.copy() + newPos.e = totalExtrusion + currentPath.list.append(newPos) elif G == 20: #Units are inches scale = 25.4 elif G == 21: #Units are mm @@ -160,9 +190,7 @@ class gcode(): pass else: print "Unknown M code:" + str(M) - gcodeFile.close() - self.layerCount = layerNr - self.pathList = pathList + self.layerList.append(currentLayer) self.extrusionAmount = maxExtrusion self.totalMoveTimeMinute = totalMoveTimeMinute print "Extruded a total of: %d mm of filament" % (self.extrusionAmount) diff --git a/SkeinPyPy/newui/profile.py b/Cura/util/profile.py similarity index 58% rename from SkeinPyPy/newui/profile.py rename to Cura/util/profile.py index 5a3e40363e..2548ec8141 100644 --- a/SkeinPyPy/newui/profile.py +++ b/Cura/util/profile.py @@ -5,9 +5,15 @@ import __init__ import ConfigParser import os import traceback +import math + +######################################################### +## Profile and preferences functions +######################################################### #Single place to store the defaults, so we have a consistent set of default settings. profileDefaultSettings = { + 'nozzle_size': '0.4', 'layer_height': '0.2', 'wall_thickness': '0.8', 'solid_layer_thickness': '0.6', @@ -29,6 +35,9 @@ profileDefaultSettings = { 'max_z_speed': '1.0', 'bottom_layer_speed': '25', 'cool_min_layer_time': '10', + 'fan_enabled': 'True', + 'fan_layer': '0', + 'fan_speed': '100', 'model_scale': '1.0', 'flip_x': 'False', 'flip_y': 'False', @@ -55,14 +64,15 @@ profileDefaultSettings = { } preferencesDefaultSettings = { 'wizardDone': 'False', + 'startMode': 'Simple', 'lastFile': 'None', 'machine_width': '205', 'machine_depth': '205', 'machine_height': '200', - 'nozzle_size': '0.4', 'steps_per_e': '0', 'serial_port': 'AUTO', 'serial_baud': '250000', + 'slicer': 'Cura (Skeinforge based)', } def getDefaultProfilePath(): @@ -78,10 +88,23 @@ def saveGlobalProfile(filename): #Save the current profile to an ini file globalProfileParser.write(open(filename, 'w')) -def resetGlobalProfile(): - #Create an empty profile with no settings, so everything gets default settings. +def loadGlobalProfileFromString(options): global globalProfileParser globalProfileParser = ConfigParser.ConfigParser() + globalProfileParser.add_section('profile') + for option in options.split('#'): + (key, value) = option.split('=', 1) + globalProfileParser.set('profile', key, value) + +def getGlobalProfileString(): + global globalProfileParser + if not globals().has_key('globalProfileParser'): + loadGlobalProfile(getDefaultProfilePath()) + + ret = [] + for key in globalProfileParser.options('profile'): + ret.append(key + "=" + globalProfileParser.get('profile', key)) + return '#'.join(ret) def getProfileSetting(name): if name in profileDefaultSettings: @@ -146,3 +169,72 @@ def putPreference(name, value): globalPreferenceParser.add_section('preference') globalPreferenceParser.set('preference', name, str(value)) globalPreferenceParser.write(open(getPreferencePath(), 'w')) + +######################################################### +## Utility functions to calculate common profile values +######################################################### +def calculateEdgeWidth(): + wallThickness = float(getProfileSetting('wall_thickness')) + nozzleSize = float(getProfileSetting('nozzle_size')) + + if wallThickness < nozzleSize: + return wallThickness + + lineCount = int(wallThickness / nozzleSize) + lineWidth = wallThickness / lineCount + lineWidthAlt = wallThickness / (lineCount + 1) + if lineWidth > nozzleSize * 1.5: + return lineWidthAlt + return lineWidth + +def calculateLineCount(): + wallThickness = float(getProfileSetting('wall_thickness')) + nozzleSize = float(getProfileSetting('nozzle_size')) + + if wallThickness < nozzleSize: + return 1 + + lineCount = int(wallThickness / nozzleSize + 0.0001) + lineWidth = wallThickness / lineCount + lineWidthAlt = wallThickness / (lineCount + 1) + if lineWidth > nozzleSize * 1.5: + return lineCount + 1 + return lineCount + +def calculateSolidLayerCount(): + layerHeight = float(getProfileSetting('layer_height')) + solidThickness = float(getProfileSetting('solid_layer_thickness')) + return int(math.ceil(solidThickness / layerHeight - 0.0001)) + +######################################################### +## Alteration file functions +######################################################### +def getCuraBasePath(): + return os.path.abspath(os.path.join(os.path.dirname(os.path.abspath(__file__)), "..")) + +def getAlterationFilePath(filename): + return os.path.join(getCuraBasePath(), "alterations", filename) + +def getAlterationFileContents(filename, allowMagicPrefix = True): + "Get the file from the fileName or the lowercase fileName in the alterations directories." + prefix = '' + if allowMagicPrefix: + if filename == 'start.gcode': + #For the start code, hack the temperature and the steps per E value into it. So the temperature is reached before the start code extrusion. + #We also set our steps per E here, if configured. + eSteps = float(getPreference('steps_per_e')) + if eSteps > 0: + prefix += 'M92 E'+str(eSteps)+'\n' + temp = float(getProfileSetting('print_temperature')) + if temp > 0: + prefix += 'M109 S'+str(temp)+'\n' + elif filename == 'replace.csv': + prefix = 'M101\nM103\n' + fullFilename = getAlterationFilePath(filename) + if os.path.isfile(fullFilename): + file = open(fullFilename, "r") + fileText = file.read() + file.close() + return prefix + fileText + return prefix + diff --git a/Cura/util/sliceRun.py b/Cura/util/sliceRun.py new file mode 100644 index 0000000000..4813f359f2 --- /dev/null +++ b/Cura/util/sliceRun.py @@ -0,0 +1,120 @@ +from __future__ import absolute_import + +import platform, os, subprocess, sys + +from cura_sf.skeinforge_application.skeinforge_utilities import skeinforge_craft +from util import profile + +def getPyPyExe(): + "Return the path to the pypy executable if we can find it. Else return False" + if platform.system() == "Windows": + exeName = "pypy.exe" + pypyExe = os.path.normpath(os.path.join(os.path.dirname(os.path.abspath(__file__)), "../../pypy/pypy.exe")); + else: + exeName = "pypy" + pypyExe = os.path.normpath(os.path.join(os.path.dirname(os.path.abspath(__file__)), "../../pypy/bin/pypy")); + if os.path.exists(pypyExe): + return pypyExe + + path = os.environ['PATH'] + paths = path.split(os.pathsep) + for p in paths: + pypyExe = os.path.join(p, exeName) + if os.path.exists(pypyExe): + return pypyExe + return False + +def getSlic3rExe(): + "Return the path to the pypy executable if we can find it. Else return False" + if platform.system() == "Windows": + exeName = "slic3r.exe" + slic3rExe = os.path.normpath(os.path.join(os.path.dirname(os.path.abspath(__file__)), "../../Slic3r/bin/slic3r.exe")); + else: + exeName = "slic3r" + slic3rExe = os.path.normpath(os.path.join(os.path.dirname(os.path.abspath(__file__)), "../../Slic3r/bin/slic3r")); + if os.path.exists(slic3rExe): + return slic3rExe + + path = os.environ['PATH'] + paths = path.split(os.pathsep) + for p in paths: + slic3rExe = os.path.join(p, exeName) + if os.path.exists(slic3rExe): + return slic3rExe + return False + +def runSlice(fileNames): + "Run the slicer on the files. If we are running with PyPy then just do the slicing action. If we are running as Python, try to find pypy." + pypyExe = getPyPyExe() + for fileName in fileNames: + if platform.python_implementation() == "PyPy": + skeinforge_craft.writeOutput(fileName) + elif pypyExe == False: + print "************************************************" + print "* Failed to find pypy, so slicing with python! *" + print "************************************************" + skeinforge_craft.writeOutput(fileName) + print "************************************************" + print "* Failed to find pypy, so sliced with python! *" + print "************************************************" + else: + subprocess.call([pypyExe, os.path.abspath(os.path.join(os.path.dirname(os.path.abspath(__file__)), "..", os.path.split(sys.argv[0])[1])), '-p', profile.getGlobalProfileString(), fileName]) + +def getSliceCommand(filename): + if profile.getPreference('slicer').startswith('Slic3r'): + slic3rExe = getSlic3rExe() + if slic3rExe == False: + return False + cmd = [slic3rExe, + '--output-filename-format', '[input_filename_base]_export.gcode', + '--nozzle-diameter', str(profile.calculateEdgeWidth()), + '--print-center', '%s,%s' % (profile.getProfileSetting('machine_center_x'), profile.getProfileSetting('machine_center_y')), + '--z-offset', '0', + '--gcode-flavor', 'reprap', + '--gcode-comments', + '--filament-diameter', profile.getProfileSetting('filament_diameter'), + '--extrusion-multiplier', str(1.0 / float(profile.getProfileSetting('filament_density'))), + '--temperature', profile.getProfileSetting('print_temperature'), + '--travel-speed', profile.getProfileSetting('travel_speed'), + '--perimeter-speed', profile.getProfileSetting('print_speed'), + '--small-perimeter-speed', profile.getProfileSetting('print_speed'), + '--infill-speed', profile.getProfileSetting('print_speed'), + '--solid-infill-speed', profile.getProfileSetting('print_speed'), + '--bridge-speed', profile.getProfileSetting('print_speed'), + '--bottom-layer-speed-ratio', str(float(profile.getProfileSetting('bottom_layer_speed')) / float(profile.getProfileSetting('print_speed'))), + '--layer-height', profile.getProfileSetting('layer_height'), + '--first-layer-height-ratio', '1.0', + '--infill-every-layers', '1', + '--perimeters', str(profile.calculateLineCount()), + '--solid-layers', str(profile.calculateSolidLayerCount()), + '--fill-density', str(float(profile.getProfileSetting('fill_density'))/100), + '--fill-angle', '45', + '--fill-pattern', 'rectilinear', + '--solid-fill-pattern', 'rectilinear', + '--start-gcode', profile.getAlterationFilePath('start.gcode'), + '--end-gcode', profile.getAlterationFilePath('end.gcode'), + '--retract-length', profile.getProfileSetting('retraction_amount'), + '--retract-speed', str(int(float(profile.getProfileSetting('retraction_speed')))), + '--retract-restart-extra', profile.getProfileSetting('retraction_extra'), + '--retract-before-travel', profile.getProfileSetting('retraction_min_travel'), + '--retract-lift', '0', + '--slowdown-below-layer-time', profile.getProfileSetting('cool_min_layer_time'), + '--min-print-speed', profile.getProfileSetting('cool_min_feedrate'), + '--skirts', profile.getProfileSetting('skirt_line_count'), + '--skirt-distance', str(int(float(profile.getProfileSetting('skirt_gap')))), + '--skirt-height', '1', + '--scale', profile.getProfileSetting('model_scale'), + '--rotate', profile.getProfileSetting('model_rotate_base'), + '--duplicate-x', profile.getProfileSetting('model_multiply_x'), + '--duplicate-y', profile.getProfileSetting('model_multiply_y'), + '--duplicate-distance', '10'] + if profile.getProfileSetting('support') != 'None': + cmd.extend(['--support-material']) + cmd.extend([filename]) + return cmd + else: + pypyExe = getPyPyExe() + if pypyExe == False: + pypyExe = sys.executable + return [pypyExe, os.path.abspath(os.path.join(os.path.dirname(os.path.abspath(__file__)), "..", os.path.split(sys.argv[0])[1])), '-p', profile.getGlobalProfileString(), filename] + diff --git a/Cura/util/stl.py b/Cura/util/stl.py new file mode 100644 index 0000000000..05e759ea22 --- /dev/null +++ b/Cura/util/stl.py @@ -0,0 +1,87 @@ +from __future__ import absolute_import +import __init__ + +import sys +import math +import re +import os +import struct + +from util import util3d + +class stlFace(): + def __init__(self, v0, v1, v2): + self.v = [v0, v1, v2] + +class stlModel(): + def __init__(self): + self.faces = [] + self.vertexes = [] + + def load(self, filename): + f = open(filename, "rb") + if f.read(6).lower() == "solid ": + self._loadAscii(f) + if len(self.faces) < 1: + f.seek(6, os.SEEK_SET) + self._loadBinary(f) + else: + self._loadBinary(f) + f.close() + + def _loadAscii(self, f): + cnt = 0 + for line in f: + if 'vertex' in line: + data = line.split() + if cnt == 0: + v0 = util3d.Vector3(float(data[1]), float(data[2]), float(data[3])) + cnt = 1 + elif cnt == 1: + v1 = util3d.Vector3(float(data[1]), float(data[2]), float(data[3])) + cnt = 2 + elif cnt == 2: + v2 = util3d.Vector3(float(data[1]), float(data[2]), float(data[3])) + self.faces.append(stlFace(v0, v1, v2)) + self.vertexes.append(v0) + self.vertexes.append(v1) + self.vertexes.append(v2) + cnt = 0 + + def _loadBinary(self, f): + #Skip the header + f.read(80-6) + faceCount = struct.unpack(' diff --git a/SkeinPyPy/skeinforge_application/alterations/example_support_end.gcode b/SkeinPyPy/skeinforge_application/alterations/example_support_end.gcode deleted file mode 100644 index 63315e94ba..0000000000 --- a/SkeinPyPy/skeinforge_application/alterations/example_support_end.gcode +++ /dev/null @@ -1,2 +0,0 @@ -(this is a sample support end file, it must be renamed support_end.gcode for skeinforge to recognize it) - diff --git a/SkeinPyPy/skeinforge_application/alterations/example_support_start.gcode b/SkeinPyPy/skeinforge_application/alterations/example_support_start.gcode deleted file mode 100644 index 04392f0912..0000000000 --- a/SkeinPyPy/skeinforge_application/alterations/example_support_start.gcode +++ /dev/null @@ -1,2 +0,0 @@ -(this is a sample support start file, it must be renamed support_start.gcode for skeinforge to recognize it) - diff --git a/package.sh b/package.sh index 1af88a2537..7eaed8040a 100755 --- a/package.sh +++ b/package.sh @@ -1,6 +1,6 @@ #!/bin/bash -# This script is to package the SkeinPyPy package for Windows/Linux and OSx +# This script is to package the Cura package for Windows/Linux and OSx # This script should run under Linux and OSx, as well as Windows with Cygwin. ############################# @@ -17,7 +17,7 @@ BUILD_TARGET=${1:-win32} ARCHIVE_FOR_DISTRIBUTION=1 ##Which version name are we appending to the final archive BUILD_NAME=NewUI-Beta4 -TARGET_DIR=${BUILD_TARGET}-SkeinPyPy-${BUILD_NAME} +TARGET_DIR=${BUILD_TARGET}-Cura-${BUILD_NAME} ##Which versions of external programs to use PYPY_VERSION=c-jit-latest @@ -136,7 +136,7 @@ mv ${TARGET_DIR}/pypy-*-${BUILD_TARGET} ${TARGET_DIR}/pypy rm -rf ${TARGET_DIR}/pypy/lib-python/2.7/test #add Skeinforge -cp -a SkeinPyPy ${TARGET_DIR}/SkeinPyPy +cp -a Cura ${TARGET_DIR}/Cura #add printrun cp -a Printrun ${TARGET_DIR}/Printrun diff --git a/scripts/linux/skeinpypy.sh b/scripts/linux/cura.sh similarity index 88% rename from scripts/linux/skeinpypy.sh rename to scripts/linux/cura.sh index 6393f3941c..6ddee07144 100755 --- a/scripts/linux/skeinpypy.sh +++ b/scripts/linux/cura.sh @@ -20,5 +20,5 @@ if [ $? != 0 ]; then fi SCRIPT_DIR=`dirname $0` -python ${SCRIPT_DIR}/SkeinPyPy/skeinpypy.py +python ${SCRIPT_DIR}/Cura/cura.py diff --git a/scripts/osx64/skeinpypy.sh b/scripts/osx64/cura.sh similarity index 91% rename from scripts/osx64/skeinpypy.sh rename to scripts/osx64/cura.sh index 14e10fbd9f..d48f365086 100755 --- a/scripts/osx64/skeinpypy.sh +++ b/scripts/osx64/cura.sh @@ -22,5 +22,5 @@ if [ $? != 0 ]; then fi SCRIPT_DIR=`dirname $0` -python ${SCRIPT_DIR}/SkeinPyPy/skeinpypy.py +python ${SCRIPT_DIR}/Cura/cura.py diff --git a/scripts/win32/cura.bat b/scripts/win32/cura.bat new file mode 100644 index 0000000000..74c36151d1 --- /dev/null +++ b/scripts/win32/cura.bat @@ -0,0 +1 @@ +@python\python.exe Cura\cura.py diff --git a/scripts/win32/cura.ico b/scripts/win32/cura.ico new file mode 100644 index 0000000000..1919bfe1f2 Binary files /dev/null and b/scripts/win32/cura.ico differ diff --git a/scripts/win32/drivers/Arduino_MEGA_2560.inf b/scripts/win32/drivers/Arduino_MEGA_2560.inf new file mode 100644 index 0000000000..2f519730c4 --- /dev/null +++ b/scripts/win32/drivers/Arduino_MEGA_2560.inf @@ -0,0 +1,106 @@ +;************************************************************ +; Windows USB CDC ACM Setup File +; Copyright (c) 2000 Microsoft Corporation + + +[Version] +Signature="$Windows NT$" +Class=Ports +ClassGuid={4D36E978-E325-11CE-BFC1-08002BE10318} +Provider=%MFGNAME% +LayoutFile=layout.inf +CatalogFile=%MFGFILENAME%.cat +DriverVer=11/15/2007,5.1.2600.0 + +[Manufacturer] +%MFGNAME%=DeviceList, NTamd64 + +[DestinationDirs] +DefaultDestDir=12 + + +;------------------------------------------------------------------------------ +; Windows 2000/XP/Vista-32bit Sections +;------------------------------------------------------------------------------ + +[DriverInstall.nt] +include=mdmcpq.inf +CopyFiles=DriverCopyFiles.nt +AddReg=DriverInstall.nt.AddReg + +[DriverCopyFiles.nt] +usbser.sys,,,0x20 + +[DriverInstall.nt.AddReg] +HKR,,DevLoader,,*ntkern +HKR,,NTMPDriver,,%DRIVERFILENAME%.sys +HKR,,EnumPropPages32,,"MsPorts.dll,SerialPortPropPageProvider" + +[DriverInstall.nt.Services] +AddService=usbser, 0x00000002, DriverService.nt + +[DriverService.nt] +DisplayName=%SERVICE% +ServiceType=1 +StartType=3 +ErrorControl=1 +ServiceBinary=%12%\%DRIVERFILENAME%.sys + +;------------------------------------------------------------------------------ +; Vista-64bit Sections +;------------------------------------------------------------------------------ + +[DriverInstall.NTamd64] +include=mdmcpq.inf +CopyFiles=DriverCopyFiles.NTamd64 +AddReg=DriverInstall.NTamd64.AddReg + +[DriverCopyFiles.NTamd64] +%DRIVERFILENAME%.sys,,,0x20 + +[DriverInstall.NTamd64.AddReg] +HKR,,DevLoader,,*ntkern +HKR,,NTMPDriver,,%DRIVERFILENAME%.sys +HKR,,EnumPropPages32,,"MsPorts.dll,SerialPortPropPageProvider" + +[DriverInstall.NTamd64.Services] +AddService=usbser, 0x00000002, DriverService.NTamd64 + +[DriverService.NTamd64] +DisplayName=%SERVICE% +ServiceType=1 +StartType=3 +ErrorControl=1 +ServiceBinary=%12%\%DRIVERFILENAME%.sys + + +;------------------------------------------------------------------------------ +; Vendor and Product ID Definitions +;------------------------------------------------------------------------------ +; When developing your USB device, the VID and PID used in the PC side +; application program and the firmware on the microcontroller must match. +; Modify the below line to use your VID and PID. Use the format as shown below. +; Note: One INF file can be used for multiple devices with different VID and PIDs. +; For each supported device, append ",USB\VID_xxxx&PID_yyyy" to the end of the line. +;------------------------------------------------------------------------------ +[SourceDisksFiles] +[SourceDisksNames] +[DeviceList] +%DESCRIPTION%=DriverInstall, USB\VID_2341&PID_0010 + +[DeviceList.NTamd64] +%DESCRIPTION%=DriverInstall, USB\VID_2341&PID_0010 + + +;------------------------------------------------------------------------------ +; String Definitions +;------------------------------------------------------------------------------ +;Modify these strings to customize your device +;------------------------------------------------------------------------------ +[Strings] +MFGFILENAME="CDC_vista" +DRIVERFILENAME ="usbser" +MFGNAME="Arduino LLC (www.arduino.cc)" +INSTDISK="Arduino Mega 2560 Driver Installer" +DESCRIPTION="Arduino Mega 2560" +SERVICE="USB RS-232 Emulation Driver" diff --git a/scripts/win32/drivers/dpinst32.exe b/scripts/win32/drivers/dpinst32.exe new file mode 100644 index 0000000000..f4d9174e2b Binary files /dev/null and b/scripts/win32/drivers/dpinst32.exe differ diff --git a/scripts/win32/drivers/dpinst64.exe b/scripts/win32/drivers/dpinst64.exe new file mode 100644 index 0000000000..22279722b0 Binary files /dev/null and b/scripts/win32/drivers/dpinst64.exe differ diff --git a/scripts/win32/header.bmp b/scripts/win32/header.bmp new file mode 100644 index 0000000000..379081dee2 Binary files /dev/null and b/scripts/win32/header.bmp differ diff --git a/scripts/win32/installer.nsi b/scripts/win32/installer.nsi new file mode 100644 index 0000000000..590deabb07 --- /dev/null +++ b/scripts/win32/installer.nsi @@ -0,0 +1,117 @@ +!define VERSION 'RC1' + +; The name of the installer +Name "Cura ${VERSION}" + +; The file to write +OutFile "Cura_${VERSION}.exe" + +; The default installation directory +InstallDir $PROGRAMFILES\Cura_${VERSION} + +; Registry key to check for directory (so if you install again, it will +; overwrite the old one automatically) +InstallDirRegKey HKLM "Software\Cura_${VERSION}" "Install_Dir" + +; Request application privileges for Windows Vista +RequestExecutionLevel admin + +; Set the LZMA compressor to reduce size. +SetCompressor /SOLID lzma +;-------------------------------- + +!include "MUI2.nsh" +!include Library.nsh + +!define MUI_ICON "cura.ico" +!define MUI_BGCOLOR FFFFFF + +; Directory page defines +!define MUI_DIRECTORYPAGE_VERIFYONLEAVE + +; Header +!define MUI_HEADERIMAGE +!define MUI_HEADERIMAGE_RIGHT +!define MUI_HEADERIMAGE_BITMAP "header.bmp" +!define MUI_HEADERIMAGE_BITMAP_NOSTRETCH + +;Do not leave (Un)Installer page automaticly +!define MUI_FINISHPAGE_NOAUTOCLOSE +!define MUI_UNFINISHPAGE_NOAUTOCLOSE + +; Pages +;!insertmacro MUI_PAGE_WELCOME +!insertmacro MUI_PAGE_DIRECTORY +!insertmacro MUI_PAGE_INSTFILES +!insertmacro MUI_PAGE_FINISH +!insertmacro MUI_UNPAGE_CONFIRM +!insertmacro MUI_UNPAGE_INSTFILES +!insertmacro MUI_UNPAGE_FINISH + +; Languages +!insertmacro MUI_LANGUAGE "English" + +; Reserve Files +!insertmacro MUI_RESERVEFILE_LANGDLL +ReserveFile '${NSISDIR}\Plugins\InstallOptions.dll' +ReserveFile "cura.ico" +ReserveFile "header.bmp" + +;-------------------------------- + +; The stuff to install +Section "Cura Installer" + + SectionIn RO + + ; Set output path to the installation directory. + SetOutPath $INSTDIR + + ; Put file there + File /r "dist\" + + ; Write the installation path into the registry + WriteRegStr HKLM "SOFTWARE\Cura_${VERSION}" "Install_Dir" "$INSTDIR" + + ; Write the uninstall keys for Windows + WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Cura_${VERSION}" "DisplayName" "Cura ${VERSION}" + WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Cura_${VERSION}" "UninstallString" '"$INSTDIR\uninstall.exe"' + WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Cura_${VERSION}" "NoModify" 1 + WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Cura_${VERSION}" "NoRepair" 1 + WriteUninstaller "uninstall.exe" + + CreateDirectory "$SMPROGRAMS\Cura ${VERSION}" + CreateShortCut "$SMPROGRAMS\Cura ${VERSION}\Uninstall.lnk" "$INSTDIR\uninstall.exe" "" "$INSTDIR\uninstall.exe" 0 + CreateShortCut "$SMPROGRAMS\Cura ${VERSION}\Cura.lnk" "$INSTDIR\cura.bat" "" "$INSTDIR\cura.icon" 0 + + ; Set output path to the driver directory. + SetOutPath "$INSTDIR\drivers\" + File /r "drivers\" + + ${If} ${RunningX64} + ExecWait '"$INSTDIR\drivers\dpinst64.exe" /lm' + ${Else} + ExecWait '"$INSTDIR\drivers\dpinst32.exe" /lm' + ${EndIf} + +SectionEnd + +;-------------------------------- + +; Uninstaller + +Section "Uninstall" + + ; Remove registry keys + DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Cura_${VERSION}" + DeleteRegKey HKLM "SOFTWARE\Cura_${VERSION}" + + ; Remove shortcuts, if any + Delete "$SMPROGRAMS\Cura ${VERSION}\*.*" + + ; Remove directories used + RMDir /r "$SMPROGRAMS\Cura ${VERSION}" + RMDir /r "$INSTDIR" + +SectionEnd + diff --git a/scripts/win32/skeinpypy.bat b/scripts/win32/skeinpypy.bat deleted file mode 100644 index ef56c9aea9..0000000000 --- a/scripts/win32/skeinpypy.bat +++ /dev/null @@ -1 +0,0 @@ -@python\python.exe SkeinPyPy\SkeinPyPy.py