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") 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): 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/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 diff --git a/resources/qml/Cura.qml b/resources/qml/Cura.qml index 9dbbb80904..aeb75a79c5 100644 --- a/resources/qml/Cura.qml +++ b/resources/qml/Cura.qml @@ -519,6 +519,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); } @@ -630,17 +633,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 } 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 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 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")