From fcff00e9daa3d056a65a261b01ace85e760e6271 Mon Sep 17 00:00:00 2001 From: Ian Paschal Date: Wed, 21 Feb 2018 14:42:28 +0100 Subject: [PATCH 1/7] Remove plugins from preferences since they're now managed via the plugin browser --- resources/qml/Cura.qml | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/resources/qml/Cura.qml b/resources/qml/Cura.qml index f474d93900..799797f9f9 100644 --- a/resources/qml/Cura.qml +++ b/resources/qml/Cura.qml @@ -518,6 +518,9 @@ UM.MainWindow insertPage(4, catalog.i18nc("@title:tab", "Profiles"), Qt.resolvedUrl("Preferences/ProfilesPage.qml")); + // Remove plug-ins page because we will use the shiny new plugin browser: + removePage(5); + //Force refresh setPage(0); } @@ -629,17 +632,6 @@ UM.MainWindow } } - // show the installed plugins page in the preferences dialog - Connections - { - target: Cura.Actions.configurePlugins - onTriggered: - { - preferences.visible = true - preferences.setPage(5) - } - } - UM.ExtensionModel { id: curaExtensions } From 98a05ae483b3f54817cc34432b8e6ebde3c382bb Mon Sep 17 00:00:00 2001 From: Ian Paschal Date: Wed, 21 Feb 2018 14:44:27 +0100 Subject: [PATCH 2/7] Fixed typo ("coping" -> "copying") --- setup.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/setup.py b/setup.py index a91ba535d5..0d78f44ddc 100644 --- a/setup.py +++ b/setup.py @@ -51,24 +51,24 @@ setup(name="Cura", #console=[{"script": "cura_app.py"}], options={"py2exe": {"skip_archive": False, "includes": includes}}) -print("Coping Cura plugins.") +print("Copying Cura plugins.") shutil.copytree(os.path.dirname(UM.__file__) + "/../plugins", "dist/plugins", ignore = shutil.ignore_patterns("ConsoleLogger", "OBJWriter", "MLPWriter", "MLPReader")) for path in os.listdir("plugins"): copytree("plugins/" + path, "dist/plugins/" + path) -print("Coping resources.") +print("Copying resources.") copytree(os.path.dirname(UM.__file__) + "/../resources", "dist/resources") copytree("resources", "dist/resources") -print("Coping Uranium QML.") +print("Copying Uranium QML.") shutil.copytree(os.path.dirname(UM.__file__) + "/Qt/qml/UM", "dist/qml/UM") for site_package in site.getsitepackages(): qt_origin_path = os.path.join(site_package, "PyQt5") if os.path.isdir(qt_origin_path): - print("Coping PyQt5 plugins from: %s" % qt_origin_path) + print("Copying PyQt5 plugins from: %s" % qt_origin_path) shutil.copytree(os.path.join(qt_origin_path, "plugins"), "dist/PyQt5/plugins") - print("Coping PyQt5 QtQuick from: %s" % qt_origin_path) + print("Copying PyQt5 QtQuick from: %s" % qt_origin_path) shutil.copytree(os.path.join(qt_origin_path, "qml/QtQuick"), "dist/qml/QtQuick") shutil.copytree(os.path.join(qt_origin_path, "qml/QtQuick.2"), "dist/qml/QtQuick.2") - print("Coping PyQt5 svg library from: %s" % qt_origin_path) + print("Copying PyQt5 svg library from: %s" % qt_origin_path) shutil.copy(os.path.join(qt_origin_path, "Qt5Svg.dll"), "dist/Qt5Svg.dll") print("Copying Angle libraries from %s" % qt_origin_path) shutil.copy(os.path.join(qt_origin_path, "libEGL.dll"), "dist/libEGL.dll") From 3ed9ac1e83d2cad797a779c8b3d971902f1d40ae Mon Sep 17 00:00:00 2001 From: Aleksei S Date: Wed, 21 Feb 2018 14:54:05 +0100 Subject: [PATCH 3/7] Fix: Monitor icon state was not updated properly CURA-4977 --- plugins/MonitorStage/MonitorStage.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/plugins/MonitorStage/MonitorStage.py b/plugins/MonitorStage/MonitorStage.py index 1a999ca896..1a1d37cbdf 100644 --- a/plugins/MonitorStage/MonitorStage.py +++ b/plugins/MonitorStage/MonitorStage.py @@ -69,9 +69,11 @@ class MonitorStage(CuraStage): self._printer_output_device.connectionStateChanged.connect(self._updateIconSource) self._setActivePrinter(self._printer_output_device.activePrinter) - # Force an update of the icon source - self._updateIconSource() + # Force an update of the icon source + self._updateIconSource() except IndexError: + #If index error occurs, then the icon on monitor button also should be updated + self._updateIconSource() pass def _onEngineCreated(self): From a88e69d109fcf643980a50d8b9823695be348ef8 Mon Sep 17 00:00:00 2001 From: Lipu Fei Date: Thu, 22 Feb 2018 15:00:12 +0100 Subject: [PATCH 4/7] Revert "WIP: Fix quality profiles for abax_pri5" Keep the old quality profiles for now to make it safe. --- resources/definitions/abax_pri5.def.json | 4 +--- .../quality/abax_pri5/apri5_pla_fast.inst.cfg | 22 +++++++++++++++++++ .../quality/abax_pri5/apri5_pla_high.inst.cfg | 22 +++++++++++++++++++ .../abax_pri5/apri5_pla_normal.inst.cfg | 22 +++++++++++++++++++ 4 files changed, 67 insertions(+), 3 deletions(-) create mode 100644 resources/quality/abax_pri5/apri5_pla_fast.inst.cfg create mode 100644 resources/quality/abax_pri5/apri5_pla_high.inst.cfg create mode 100644 resources/quality/abax_pri5/apri5_pla_normal.inst.cfg diff --git a/resources/definitions/abax_pri5.def.json b/resources/definitions/abax_pri5.def.json index b8310221b1..cbebb576b0 100644 --- a/resources/definitions/abax_pri5.def.json +++ b/resources/definitions/abax_pri5.def.json @@ -6,9 +6,7 @@ "visible": true, "author": "ABAX 3d Technologies", "manufacturer": "ABAX 3d Technologies", - "file_formats": "text/x-gcode", - "quality_definition": "abax_pri3", - "has_machine_quality": true + "file_formats": "text/x-gcode" }, "overrides": { "machine_start_gcode": { diff --git a/resources/quality/abax_pri5/apri5_pla_fast.inst.cfg b/resources/quality/abax_pri5/apri5_pla_fast.inst.cfg new file mode 100644 index 0000000000..517c767ac5 --- /dev/null +++ b/resources/quality/abax_pri5/apri5_pla_fast.inst.cfg @@ -0,0 +1,22 @@ +[general] +version = 2 +name = Fine +definition = abax_pri5 + +[metadata] +setting_version = 4 +type = quality +quality_type = normal +weight = -1 +material = generic_pla + +[values] +layer_height = 0.2 +wall_thickness = 1.05 +top_bottom_thickness = 0.8 +infill_sparse_density = 20 +speed_print = 80 +speed_layer_0 = =round(speed_print * 30 / 50) +speed_topbottom = 20 +cool_min_layer_time = 5 +cool_min_speed = 10 diff --git a/resources/quality/abax_pri5/apri5_pla_high.inst.cfg b/resources/quality/abax_pri5/apri5_pla_high.inst.cfg new file mode 100644 index 0000000000..01699e39f6 --- /dev/null +++ b/resources/quality/abax_pri5/apri5_pla_high.inst.cfg @@ -0,0 +1,22 @@ +[general] +version = 2 +name = Extra Fine +definition = abax_pri5 + +[metadata] +setting_version = 4 +type = quality +quality_type = high +weight = 1 +material = generic_pla + +[values] +layer_height = 0.1 +wall_thickness = 1.05 +top_bottom_thickness = 0.8 +infill_sparse_density = 20 +speed_print = 50 +speed_layer_0 = =round(speed_print * 30 / 50) +speed_topbottom = 20 +cool_min_layer_time = 5 +cool_min_speed = 10 diff --git a/resources/quality/abax_pri5/apri5_pla_normal.inst.cfg b/resources/quality/abax_pri5/apri5_pla_normal.inst.cfg new file mode 100644 index 0000000000..ea1023dc43 --- /dev/null +++ b/resources/quality/abax_pri5/apri5_pla_normal.inst.cfg @@ -0,0 +1,22 @@ +[general] +version = 2 +name = Fine +definition = abax_pri5 + +[metadata] +setting_version = 4 +type = quality +quality_type = normal +weight = 0 +material = generic_pla + +[values] +layer_height = 0.2 +wall_thickness = 1.05 +top_bottom_thickness = 0.8 +infill_sparse_density = 20 +speed_print = 50 +speed_layer_0 = =round(speed_print * 30 / 50) +speed_topbottom = 20 +cool_min_layer_time = 5 +cool_min_speed = 10 From 0846021b674fa672a5842559479c708ce8d0b5a1 Mon Sep 17 00:00:00 2001 From: Lipu Fei Date: Thu, 22 Feb 2018 15:12:15 +0100 Subject: [PATCH 5/7] Fix imade3d jellybox quality profiles --- .../generic_petg_0.4_coarse.inst.cfg | 3 --- .../generic_petg_0.4_coarse_2-fans.inst.cfg | 3 --- .../generic_petg_0.4_medium.inst.cfg | 3 --- .../generic_petg_0.4_medium_2-fans.inst.cfg | 3 --- .../generic_pla_0.4_coarse.inst.cfg | 3 --- .../generic_pla_0.4_coarse_2-fans.inst.cfg | 3 --- .../generic_pla_0.4_fine.inst.cfg | 3 --- .../generic_pla_0.4_fine_2-fans.inst.cfg | 3 --- .../generic_pla_0.4_medium.inst.cfg | 3 --- .../generic_pla_0.4_medium_2-fans.inst.cfg | 3 --- .../generic_pla_0.4_ultrafine.inst.cfg | 3 --- .../generic_pla_0.4_ultrafine_2-fans.inst.cfg | 2 -- .../imade3d_jellybox_coarse.inst.cfg | 16 ++++++++++++++++ .../imade3d_jellybox_fine.inst.cfg | 16 ++++++++++++++++ .../imade3d_jellybox_normal.inst.cfg | 16 ++++++++++++++++ .../imade3d_jellybox_ultrafine.inst.cfg | 16 ++++++++++++++++ 16 files changed, 64 insertions(+), 35 deletions(-) create mode 100644 resources/quality/imade3d_jellybox/imade3d_jellybox_coarse.inst.cfg create mode 100644 resources/quality/imade3d_jellybox/imade3d_jellybox_fine.inst.cfg create mode 100644 resources/quality/imade3d_jellybox/imade3d_jellybox_normal.inst.cfg create mode 100644 resources/quality/imade3d_jellybox/imade3d_jellybox_ultrafine.inst.cfg diff --git a/resources/quality/imade3d_jellybox/generic_petg_0.4_coarse.inst.cfg b/resources/quality/imade3d_jellybox/generic_petg_0.4_coarse.inst.cfg index e5b3aed52b..f300f5d95b 100644 --- a/resources/quality/imade3d_jellybox/generic_petg_0.4_coarse.inst.cfg +++ b/resources/quality/imade3d_jellybox/generic_petg_0.4_coarse.inst.cfg @@ -12,7 +12,6 @@ material = generic_petg variant = 0.4 mm [values] -adhesion_type = skirt bottom_thickness = 0.6 coasting_enable = True coasting_speed = 95 @@ -27,8 +26,6 @@ infill_line_width = 0.6 infill_overlap = 15 infill_pattern = zigzag infill_sparse_density = 20 -layer_height = 0.3 -layer_height_0 = 0.3 line_width = 0.4 material_bed_temperature = 50 material_bed_temperature_layer_0 = 55 diff --git a/resources/quality/imade3d_jellybox/generic_petg_0.4_coarse_2-fans.inst.cfg b/resources/quality/imade3d_jellybox/generic_petg_0.4_coarse_2-fans.inst.cfg index e7f2d5d60a..804807184b 100644 --- a/resources/quality/imade3d_jellybox/generic_petg_0.4_coarse_2-fans.inst.cfg +++ b/resources/quality/imade3d_jellybox/generic_petg_0.4_coarse_2-fans.inst.cfg @@ -12,7 +12,6 @@ material = generic_petg variant = 0.4 mm 2-fans [values] -adhesion_type = skirt bottom_thickness = 0.6 coasting_enable = True coasting_speed = 95 @@ -27,8 +26,6 @@ infill_line_width = 0.6 infill_overlap = 15 infill_pattern = zigzag infill_sparse_density = 20 -layer_height = 0.3 -layer_height_0 = 0.3 line_width = 0.4 material_bed_temperature = 50 material_bed_temperature_layer_0 = 55 diff --git a/resources/quality/imade3d_jellybox/generic_petg_0.4_medium.inst.cfg b/resources/quality/imade3d_jellybox/generic_petg_0.4_medium.inst.cfg index 4d122f1ac2..c39c8a7a98 100644 --- a/resources/quality/imade3d_jellybox/generic_petg_0.4_medium.inst.cfg +++ b/resources/quality/imade3d_jellybox/generic_petg_0.4_medium.inst.cfg @@ -12,7 +12,6 @@ material = generic_petg variant = 0.4 mm [values] -adhesion_type = skirt bottom_thickness = 0.6 coasting_enable = True coasting_speed = 95 @@ -27,8 +26,6 @@ infill_line_width = 0.6 infill_overlap = 15 infill_pattern = zigzag infill_sparse_density = 20 -layer_height = 0.2 -layer_height_0 = 0.3 line_width = 0.4 material_bed_temperature = 50 material_bed_temperature_layer_0 = 55 diff --git a/resources/quality/imade3d_jellybox/generic_petg_0.4_medium_2-fans.inst.cfg b/resources/quality/imade3d_jellybox/generic_petg_0.4_medium_2-fans.inst.cfg index 9646b0bb5f..17cc1493e1 100644 --- a/resources/quality/imade3d_jellybox/generic_petg_0.4_medium_2-fans.inst.cfg +++ b/resources/quality/imade3d_jellybox/generic_petg_0.4_medium_2-fans.inst.cfg @@ -12,7 +12,6 @@ material = generic_petg variant = 0.4 mm 2-fans [values] -adhesion_type = skirt bottom_thickness = 0.6 coasting_enable = True coasting_speed = 95 @@ -27,8 +26,6 @@ infill_line_width = 0.6 infill_overlap = 15 infill_pattern = zigzag infill_sparse_density = 20 -layer_height = 0.2 -layer_height_0 = 0.3 line_width = 0.4 material_bed_temperature = 50 material_bed_temperature_layer_0 = 55 diff --git a/resources/quality/imade3d_jellybox/generic_pla_0.4_coarse.inst.cfg b/resources/quality/imade3d_jellybox/generic_pla_0.4_coarse.inst.cfg index 8ecfa927a7..738eb627fe 100644 --- a/resources/quality/imade3d_jellybox/generic_pla_0.4_coarse.inst.cfg +++ b/resources/quality/imade3d_jellybox/generic_pla_0.4_coarse.inst.cfg @@ -12,7 +12,6 @@ material = generic_pla variant = 0.4 mm [values] -adhesion_type = skirt bottom_thickness = 0.6 coasting_enable = True coasting_speed = 95 @@ -27,8 +26,6 @@ infill_line_width = 0.6 infill_overlap = 15 infill_pattern = zigzag infill_sparse_density = 20 -layer_height = 0.3 -layer_height_0 = 0.3 line_width = 0.4 material_flow = 90 meshfix_union_all = False diff --git a/resources/quality/imade3d_jellybox/generic_pla_0.4_coarse_2-fans.inst.cfg b/resources/quality/imade3d_jellybox/generic_pla_0.4_coarse_2-fans.inst.cfg index 52c7df70f3..4f44559fbc 100644 --- a/resources/quality/imade3d_jellybox/generic_pla_0.4_coarse_2-fans.inst.cfg +++ b/resources/quality/imade3d_jellybox/generic_pla_0.4_coarse_2-fans.inst.cfg @@ -12,7 +12,6 @@ material = generic_pla variant = 0.4 mm 2-fans [values] -adhesion_type = skirt bottom_thickness = 0.6 coasting_enable = True coasting_speed = 95 @@ -27,8 +26,6 @@ infill_line_width = 0.6 infill_overlap = 15 infill_pattern = zigzag infill_sparse_density = 20 -layer_height = 0.3 -layer_height_0 = 0.3 line_width = 0.4 material_flow = 90 meshfix_union_all = False diff --git a/resources/quality/imade3d_jellybox/generic_pla_0.4_fine.inst.cfg b/resources/quality/imade3d_jellybox/generic_pla_0.4_fine.inst.cfg index a48dbe2f81..f9f32237b0 100644 --- a/resources/quality/imade3d_jellybox/generic_pla_0.4_fine.inst.cfg +++ b/resources/quality/imade3d_jellybox/generic_pla_0.4_fine.inst.cfg @@ -12,7 +12,6 @@ material = generic_pla variant = 0.4 mm [values] -adhesion_type = skirt bottom_thickness = 0.6 coasting_enable = True coasting_speed = 95 @@ -27,8 +26,6 @@ infill_line_width = 0.6 infill_overlap = 15 infill_pattern = zigzag infill_sparse_density = 20 -layer_height = 0.1 -layer_height_0 = 0.3 line_width = 0.4 material_flow = 90 material_print_temperature = 205 diff --git a/resources/quality/imade3d_jellybox/generic_pla_0.4_fine_2-fans.inst.cfg b/resources/quality/imade3d_jellybox/generic_pla_0.4_fine_2-fans.inst.cfg index 4707337611..82f5a4fa32 100644 --- a/resources/quality/imade3d_jellybox/generic_pla_0.4_fine_2-fans.inst.cfg +++ b/resources/quality/imade3d_jellybox/generic_pla_0.4_fine_2-fans.inst.cfg @@ -12,7 +12,6 @@ material = generic_pla variant = 0.4 mm 2-fans [values] -adhesion_type = skirt bottom_thickness = 0.6 coasting_enable = True coasting_speed = 95 @@ -27,8 +26,6 @@ infill_line_width = 0.6 infill_overlap = 15 infill_pattern = zigzag infill_sparse_density = 20 -layer_height = 0.1 -layer_height_0 = 0.3 line_width = 0.4 material_flow = 90 material_print_temperature = 205 diff --git a/resources/quality/imade3d_jellybox/generic_pla_0.4_medium.inst.cfg b/resources/quality/imade3d_jellybox/generic_pla_0.4_medium.inst.cfg index 2f5a0f33a8..5ee2111c3a 100644 --- a/resources/quality/imade3d_jellybox/generic_pla_0.4_medium.inst.cfg +++ b/resources/quality/imade3d_jellybox/generic_pla_0.4_medium.inst.cfg @@ -12,7 +12,6 @@ material = generic_pla variant = 0.4 mm [values] -adhesion_type = skirt bottom_thickness = 0.6 coasting_enable = True coasting_speed = 95 @@ -27,8 +26,6 @@ infill_line_width = 0.6 infill_overlap = 15 infill_pattern = zigzag infill_sparse_density = 20 -layer_height = 0.2 -layer_height_0 = 0.3 line_width = 0.4 material_flow = 90 meshfix_union_all = False diff --git a/resources/quality/imade3d_jellybox/generic_pla_0.4_medium_2-fans.inst.cfg b/resources/quality/imade3d_jellybox/generic_pla_0.4_medium_2-fans.inst.cfg index f0451fc9be..5d34259ccd 100644 --- a/resources/quality/imade3d_jellybox/generic_pla_0.4_medium_2-fans.inst.cfg +++ b/resources/quality/imade3d_jellybox/generic_pla_0.4_medium_2-fans.inst.cfg @@ -12,7 +12,6 @@ material = generic_pla variant = 0.4 mm 2-fans [values] -adhesion_type = skirt bottom_thickness = 0.6 coasting_enable = True coasting_speed = 95 @@ -27,8 +26,6 @@ infill_line_width = 0.6 infill_overlap = 15 infill_pattern = zigzag infill_sparse_density = 20 -layer_height = 0.2 -layer_height_0 = 0.3 line_width = 0.4 material_flow = 90 meshfix_union_all = False diff --git a/resources/quality/imade3d_jellybox/generic_pla_0.4_ultrafine.inst.cfg b/resources/quality/imade3d_jellybox/generic_pla_0.4_ultrafine.inst.cfg index 179623153a..1826e69513 100644 --- a/resources/quality/imade3d_jellybox/generic_pla_0.4_ultrafine.inst.cfg +++ b/resources/quality/imade3d_jellybox/generic_pla_0.4_ultrafine.inst.cfg @@ -12,7 +12,6 @@ material = generic_pla variant = 0.4 mm [values] -adhesion_type = skirt bottom_thickness = 0.6 coasting_enable = True coasting_speed = 95 @@ -27,8 +26,6 @@ infill_line_width = 0.6 infill_overlap = 15 infill_pattern = zigzag infill_sparse_density = 20 -layer_height = 0.05 -layer_height_0 = 0.3 line_width = 0.4 material_flow = 90 material_print_temperature = 202 diff --git a/resources/quality/imade3d_jellybox/generic_pla_0.4_ultrafine_2-fans.inst.cfg b/resources/quality/imade3d_jellybox/generic_pla_0.4_ultrafine_2-fans.inst.cfg index b35db0fde6..5b05c10604 100644 --- a/resources/quality/imade3d_jellybox/generic_pla_0.4_ultrafine_2-fans.inst.cfg +++ b/resources/quality/imade3d_jellybox/generic_pla_0.4_ultrafine_2-fans.inst.cfg @@ -27,8 +27,6 @@ infill_line_width = 0.6 infill_overlap = 15 infill_pattern = zigzag infill_sparse_density = 20 -layer_height = 0.05 -layer_height_0 = 0.3 line_width = 0.4 material_flow = 90 material_print_temperature = 202 diff --git a/resources/quality/imade3d_jellybox/imade3d_jellybox_coarse.inst.cfg b/resources/quality/imade3d_jellybox/imade3d_jellybox_coarse.inst.cfg new file mode 100644 index 0000000000..2e940ea646 --- /dev/null +++ b/resources/quality/imade3d_jellybox/imade3d_jellybox_coarse.inst.cfg @@ -0,0 +1,16 @@ +[general] +version = 2 +name = Coarse +definition = imade3d_jellybox + +[metadata] +setting_version = 4 +type = quality +quality_type = fast +weight = -1 +global_quality = True + +[values] +adhesion_type = skirt +layer_height = 0.3 +layer_height_0 = 0.3 diff --git a/resources/quality/imade3d_jellybox/imade3d_jellybox_fine.inst.cfg b/resources/quality/imade3d_jellybox/imade3d_jellybox_fine.inst.cfg new file mode 100644 index 0000000000..9979558963 --- /dev/null +++ b/resources/quality/imade3d_jellybox/imade3d_jellybox_fine.inst.cfg @@ -0,0 +1,16 @@ +[general] +version = 2 +name = Fine +definition = imade3d_jellybox + +[metadata] +setting_version = 4 +type = quality +quality_type = high +weight = 1 +global_quality = True + +[values] +adhesion_type = skirt +layer_height = 0.1 +layer_height_0 = 0.3 diff --git a/resources/quality/imade3d_jellybox/imade3d_jellybox_normal.inst.cfg b/resources/quality/imade3d_jellybox/imade3d_jellybox_normal.inst.cfg new file mode 100644 index 0000000000..0574099b63 --- /dev/null +++ b/resources/quality/imade3d_jellybox/imade3d_jellybox_normal.inst.cfg @@ -0,0 +1,16 @@ +[general] +version = 2 +name = Medium +definition = imade3d_jellybox + +[metadata] +setting_version = 4 +type = quality +quality_type = normal +weight = 0 +global_quality = True + +[values] +adhesion_type = skirt +layer_height = 0.2 +layer_height_0 = 0.3 diff --git a/resources/quality/imade3d_jellybox/imade3d_jellybox_ultrafine.inst.cfg b/resources/quality/imade3d_jellybox/imade3d_jellybox_ultrafine.inst.cfg new file mode 100644 index 0000000000..39344ce7f4 --- /dev/null +++ b/resources/quality/imade3d_jellybox/imade3d_jellybox_ultrafine.inst.cfg @@ -0,0 +1,16 @@ +[general] +version = 2 +name = UltraFine +definition = imade3d_jellybox + +[metadata] +setting_version = 4 +type = quality +quality_type = ultrahigh +weight = 2 +global_quality = True + +[values] +adhesion_type = skirt +layer_height = 0.05 +layer_height_0 = 0.3 From 21e4ed1ae9bed29307c336139c74f19def3fc52a Mon Sep 17 00:00:00 2001 From: Lipu Fei Date: Wed, 14 Feb 2018 20:48:21 +0100 Subject: [PATCH 6/7] Fix punchtec extruder IDs --- ...uder_left.def.json => punchtec_connect_xl_extruder_0.def.json} | 0 ...der_right.def.json => punchtec_connect_xl_extruder_1.def.json} | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename resources/extruders/{punchtec_connect_xl_extruder_left.def.json => punchtec_connect_xl_extruder_0.def.json} (100%) rename resources/extruders/{punchtec_connect_xl_extruder_right.def.json => punchtec_connect_xl_extruder_1.def.json} (100%) diff --git a/resources/extruders/punchtec_connect_xl_extruder_left.def.json b/resources/extruders/punchtec_connect_xl_extruder_0.def.json similarity index 100% rename from resources/extruders/punchtec_connect_xl_extruder_left.def.json rename to resources/extruders/punchtec_connect_xl_extruder_0.def.json diff --git a/resources/extruders/punchtec_connect_xl_extruder_right.def.json b/resources/extruders/punchtec_connect_xl_extruder_1.def.json similarity index 100% rename from resources/extruders/punchtec_connect_xl_extruder_right.def.json rename to resources/extruders/punchtec_connect_xl_extruder_1.def.json From ab8fda8812684bad30d84128d9dfad041afb448d Mon Sep 17 00:00:00 2001 From: Lipu Fei Date: Thu, 22 Feb 2018 15:21:48 +0100 Subject: [PATCH 7/7] Fix createMachine: evaluate material diameter if it is a function --- cura/Settings/CuraStackBuilder.py | 34 ++++++++++++++++--------------- 1 file changed, 18 insertions(+), 16 deletions(-) diff --git a/cura/Settings/CuraStackBuilder.py b/cura/Settings/CuraStackBuilder.py index fc0d4f6f8e..9273b272c1 100644 --- a/cura/Settings/CuraStackBuilder.py +++ b/cura/Settings/CuraStackBuilder.py @@ -7,6 +7,7 @@ from UM.Logger import Logger from UM.Settings.Interfaces import DefinitionContainerInterface from UM.Settings.InstanceContainer import InstanceContainer from UM.Settings.ContainerRegistry import ContainerRegistry +from UM.Settings.SettingFunction import SettingFunction from UM.Util import parseBool from cura.Machines.VariantManager import VariantType @@ -50,7 +51,6 @@ class CuraStackBuilder: (definition_id, global_variant_name)) global_variant_container = variant_node.getContainer() - # get variant container for extruders extruder_variant_container = application.empty_variant_container # Only look for the preferred variant if this machine has variants @@ -65,21 +65,6 @@ class CuraStackBuilder: (definition_id, extruder_variant_name)) extruder_variant_container = variant_node.getContainer() - # get material container for extruders - material_container = application.empty_material_container - # Only look for the preferred material if this machine has materials - if parseBool(machine_definition.getMetaDataEntry("has_materials", False)): - material_diameter = machine_definition.getProperty("material_diameter", "value") - approximate_material_diameter = str(round(material_diameter)) - root_material_id = machine_definition.getMetaDataEntry("preferred_material") - root_material_id = material_manager.getRootMaterialIDForDiameter(root_material_id, approximate_material_diameter) - material_node = material_manager.getMaterialNode(definition_id, extruder_variant_name, material_diameter, root_material_id) - # Sanity check. If you see this error, the related definition files should be fixed. - if not material_node: - raise RuntimeError("Cannot find material with definition [%s], extruder_variant_name [%s], and root_material_id [%s]" % - (definition_id, extruder_variant_name, root_material_id)) - material_container = material_node.getContainer() - generated_name = registry.createUniqueName("machine", "", name, machine_definition.getName()) # Make sure the new name does not collide with any definition or (quality) profile # createUniqueName() only looks at other stacks, but not at definitions or quality profiles @@ -96,6 +81,23 @@ class CuraStackBuilder: ) new_global_stack.setName(generated_name) + # get material container for extruders + material_container = application.empty_material_container + # Only look for the preferred material if this machine has materials + if parseBool(machine_definition.getMetaDataEntry("has_materials", False)): + material_diameter = machine_definition.getProperty("material_diameter", "value") + if isinstance(material_diameter, SettingFunction): + material_diameter = material_diameter(new_global_stack) + approximate_material_diameter = str(round(material_diameter)) + root_material_id = machine_definition.getMetaDataEntry("preferred_material") + root_material_id = material_manager.getRootMaterialIDForDiameter(root_material_id, approximate_material_diameter) + material_node = material_manager.getMaterialNode(definition_id, extruder_variant_name, material_diameter, root_material_id) + # Sanity check. If you see this error, the related definition files should be fixed. + if not material_node: + raise RuntimeError("Cannot find material with definition [%s], extruder_variant_name [%s], and root_material_id [%s]" % + (definition_id, extruder_variant_name, root_material_id)) + material_container = material_node.getContainer() + # Create ExtruderStacks extruder_dict = machine_definition.getMetaDataEntry("machine_extruder_trains")