Browse Source

Merge branch '3.5' into CURA-5682_material_manager_leftovers

Diego Prado Gesto 6 years ago
parent
commit
74fcc10f59

+ 8 - 9
cura/Settings/ExtruderManager.py

@@ -5,6 +5,7 @@ from PyQt5.QtCore import pyqtSignal, pyqtProperty, QObject, QVariant  # For comm
 from UM.FlameProfiler import pyqtSlot
 
 import cura.CuraApplication # To get the global container stack to find the current machine.
+from cura.Settings.GlobalStack import GlobalStack
 from UM.Logger import Logger
 from UM.Scene.Iterator.DepthFirstIterator import DepthFirstIterator
 from UM.Scene.SceneNode import SceneNode
@@ -15,12 +16,10 @@ from UM.Settings.SettingFunction import SettingFunction
 from UM.Settings.ContainerStack import ContainerStack
 from UM.Settings.PropertyEvaluationContext import PropertyEvaluationContext
 
-from typing import Optional, TYPE_CHECKING, Dict, List, Any
+from typing import Any, cast, Dict, List, Optional, TYPE_CHECKING
 
 if TYPE_CHECKING:
     from cura.Settings.ExtruderStack import ExtruderStack
-    from cura.Settings.GlobalStack import GlobalStack
-    from UM.Scene.SceneNode import SceneNode
 
 
 ##  Manages all existing extruder stacks.
@@ -377,7 +376,7 @@ class ExtruderManager(QObject):
     #           If no extruder has the value, the list will contain the global value.
     @staticmethod
     def getExtruderValues(key: str) -> List[Any]:
-        global_stack = cura.CuraApplication.CuraApplication.getInstance().getGlobalContainerStack()
+        global_stack = cast(GlobalStack, cura.CuraApplication.CuraApplication.getInstance().getGlobalContainerStack()) #We know that there must be a global stack by the time you're requesting setting values.
 
         result = []
         for extruder in ExtruderManager.getInstance().getActiveExtruderStacks():
@@ -412,7 +411,7 @@ class ExtruderManager(QObject):
     #           If no extruder has the value, the list will contain the global value.
     @staticmethod
     def getDefaultExtruderValues(key: str) -> List[Any]:
-        global_stack = cura.CuraApplication.CuraApplication.getInstance().getGlobalContainerStack()
+        global_stack = cast(GlobalStack, cura.CuraApplication.CuraApplication.getInstance().getGlobalContainerStack()) #We know that there must be a global stack by the time you're requesting setting values.
         context = PropertyEvaluationContext(global_stack)
         context.context["evaluate_from_container_index"] = 1  # skip the user settings container
         context.context["override_operators"] = {
@@ -479,7 +478,7 @@ class ExtruderManager(QObject):
                 value = value(extruder)
         else:
             # Just a value from global.
-            value = cura.CuraApplication.CuraApplication.getInstance().getGlobalContainerStack().getProperty(key, "value")
+            value = cast(GlobalStack, cura.CuraApplication.CuraApplication.getInstance().getGlobalContainerStack()).getProperty(key, "value")
 
         return value
 
@@ -508,7 +507,7 @@ class ExtruderManager(QObject):
             if isinstance(value, SettingFunction):
                 value = value(extruder, context = context)
         else:  # Just a value from global.
-            value = cura.CuraApplication.CuraApplication.getInstance().getGlobalContainerStack().getProperty(key, "value", context = context)
+            value = cast(GlobalStack, cura.CuraApplication.CuraApplication.getInstance().getGlobalContainerStack()).getProperty(key, "value", context = context)
 
         return value
 
@@ -521,7 +520,7 @@ class ExtruderManager(QObject):
     #   \return The effective value
     @staticmethod
     def getResolveOrValue(key: str) -> Any:
-        global_stack = cura.CuraApplication.CuraApplication.getInstance().getGlobalContainerStack()
+        global_stack = cast(GlobalStack, cura.CuraApplication.CuraApplication.getInstance().getGlobalContainerStack())
         resolved_value = global_stack.getProperty(key, "value")
 
         return resolved_value
@@ -535,7 +534,7 @@ class ExtruderManager(QObject):
     #   \return The effective value
     @staticmethod
     def getDefaultResolveOrValue(key: str) -> Any:
-        global_stack = cura.CuraApplication.CuraApplication.getInstance().getGlobalContainerStack()
+        global_stack = cast(GlobalStack, cura.CuraApplication.CuraApplication.getInstance().getGlobalContainerStack())
         context = PropertyEvaluationContext(global_stack)
         context.context["evaluate_from_container_index"] = 1  # skip the user settings container
         context.context["override_operators"] = {

+ 1 - 1
cura/Settings/SidebarCustomMenuItemsModel.py

@@ -18,7 +18,7 @@ class SidebarCustomMenuItemsModel(ListModel):
         self.addRoleName(self.name_role, "name")
         self.addRoleName(self.actions_role, "actions")
         self.addRoleName(self.menu_item_role, "menu_item")
-        self.addRoleName(self.menu_item_icon_name_role, "iconName")
+        self.addRoleName(self.menu_item_icon_name_role, "icon_name")
         self._updateExtensionList()
 
     def _updateExtensionList(self)-> None:

+ 96 - 0
plugins/ChangeLogPlugin/ChangeLog.txt

@@ -1,3 +1,99 @@
+[3.5.0]
+*Monitor page
+The monitor page of Ultimaker Cura has been remodeled for better consistency with the Cura Connect ‘Print jobs’ interface. This means less switching between interfaces, and more control from within Ultimaker Cura.
+
+*Open recent projects
+Project files can now be found in the ‘Open Recent’ menu.
+
+*New tool hotkeys
+New hotkeys have been assigned for quick toggling between the translate (T), scale (S), rotate (R) and mirror (M) tools.
+
+*Project files use 3MF only
+A 3MF extension is now used for project files. The ‘.curaproject’ extension is no longer used.
+
+*Camera maximum zoom
+The maximum zoom has been adjusted to scale with the size of the selected printer. This fixes third-party printers with huge build volumes to be correctly visible.
+
+*Corrected width of layer number box
+The layer number indicator in the layer view now displays numbers above 999 correctly.
+
+*Materials preferences
+This screen has been redesigned to improve user experience. Materials can now be set as a favorites, so they can be easily accessed in the material selection panel at the top-right of the screen.
+
+*Installed packages checkmark
+Packages that are already installed in the Toolbox are now have a checkmark for easy reference.
+
+*Mac OSX save dialog
+The save dialog has been restored to its native behavior and bugs have been fixed.
+
+*Removed .gz extension
+Saving compressed g-code files from the save dialog has been removed because of incompatibility with MacOS. If sending jobs over Wi-Fi, g-code is still compressed.
+
+*Updates to Chinese translations
+Improved and updated Chinese translations. Contributed by MarmaladeForMeat.
+
+*Save project
+Saving the project no longer triggers the project to reslice.
+
+*Improved processing of overhang walls
+Overhang walls are detected and printed with different speeds. It will not start a perimeter on an overhanging wall. The quality of overhanging walls may be improved by printing those at a different speed. Contributed by smartavionics.
+
+*Prime tower reliability
+The prime tower has been improved for better reliability. This is especially useful when printing with two materials that do not adhere well.
+
+*Support infill line direction
+The support infill lines can now be rotated to increase the supporting capabilities and reduce artifacts on the model. This setting rotates existing patterns, like triangle support infill. Contributed by fieldOfView.
+
+*Minimum polygon circumference
+Polygons in sliced layers that have a circumference smaller than the setting value will be filtered out. Lower values lead to higher resolution meshes at the cost of increased slicing time. This setting is ideal for very tiny prints with a lot of detail, or for SLA printers. Contributed by cubiq.
+
+*Initial layer support line distance. This setting enables the user to reduce or increase the density of the support initial layer in order to increase or reduce adhesion to the build plate and the overall strength.
+
+*Extra infill wall line count
+Adds extra walls around infill. Contributed by BagelOrb.
+
+*Multiply infill
+Creates multiple infill lines on the same pattern for sturdier infill. Contributed by BagelOrb.
+
+*Connected infill polygons
+Connecting infill lines now also works with concentric and cross infill patterns. The benefit would be stronger infill and more consistent material flow/saving retractions. Contributed by BagelOrb.
+
+*Fan speed override
+New setting to modify the fan speed of bridged areas. This setting can be found in Support settings > Fan Speed Override when support is enabled. Contributed by smartavionics.
+
+*Minimum wall flow
+New setting to define a minimum flow for thin printed walls. Contributed by smartavionics.
+
+*Custom support
+A tool similar to the support blocker that adds cubes of support to the model manually by clicking parts of it. Contributed by Lokster.
+
+*Quickly toggle autoslicing
+Adds a pause/play button to the progress bar to quickly toggle autoslicing. Contributed by fieldOfview.
+
+*Cura-DuetRRFPlugin
+Adds output devices for a Duet RepRapFirmware printer: "Print", "Simulate", and "Upload". Contributed by Kriechi.
+
+*Dremel 3D20
+This plugin adds the Dremel printer to Ultimaker Cura. Contributed by Kriechi.
+
+*Bug fixes
+- Removed extra M109 commands. Older versions would generate superfluous M109 commands. This has been fixed for better temperature stability when printing.
+- Fixed minor mesh handling bugs. A few combinations of modifier meshes now lead to expected behavior.
+- Removed unnecessary travels. Connected infill lines are now always printed completely connected, without unnecessary travel moves.
+- Removed concentric 3D infill. This infill type has been removed due to lack of reliability.
+- Extra skin wall count. Fixed an issue that caused extra print moves with this setting enabled.
+- Concentric skin. Small gaps in concentric skin are now filled correctly.
+- Order of printed models. The order of a large batch of printed models is now more consistent, instead of random.
+
+*Third party printers
+- TiZYX
+- Winbo
+- Tevo Tornado
+- Creality CR-10S
+- Wanhao Duplicator
+- Deltacomb (update)
+- Dacoma (update)
+
 [3.4.1]
 *Bug fixes
 - Fixed an issue that would occasionally cause an unnecessary extra skin wall to be printed, which increased print time.

+ 0 - 1
plugins/SimulationView/SimulationView.qml

@@ -670,7 +670,6 @@ Item
                 onCurrentLayerChanged:
                 {
                     playButton.pauseSimulation()
-                    pathSlider.setHandleValue(0) // After updating the layer set Path slider to 0
                     layerSlider.setUpperValue(UM.SimulationView.currentLayer)
                 }
             }

+ 14 - 1
plugins/Toolbox/src/Toolbox.py

@@ -488,7 +488,20 @@ class Toolbox(QObject, Extension):
 
         local_version = Version(local_package["package_version"])
         remote_version = Version(remote_package["package_version"])
-        return remote_version > local_version
+        if self._getSDKVersion() == "dev":
+            sdk_version = int(self._plugin_registry.APIVersion)
+        else:
+            sdk_version = int(self._getSDKVersion())
+        can_upgrade = False
+        if remote_version > local_version:
+            can_upgrade = True
+        # A package with the same version can be built to have different SDK versions. So, for a package with the same
+        # version, we also need to check if the current one has a lower SDK version. If so, this package should also
+        # be upgradable.
+        elif remote_version == local_version and local_package.get("sdk_version", 0) < sdk_version:
+            can_upgrade = True
+
+        return can_upgrade
 
     @pyqtSlot(str, result = bool)
     def canDowngrade(self, package_id: str) -> bool:

+ 6 - 8
plugins/VersionUpgrade/VersionUpgrade25to26/VersionUpgrade25to26.py

@@ -1,4 +1,4 @@
-# Copyright (c) 2017 Ultimaker B.V.
+# Copyright (c) 2018 Ultimaker B.V.
 # Cura is released under the terms of the LGPLv3 or higher.
 
 import configparser #To parse the files we need to upgrade and write the new files.
@@ -9,8 +9,6 @@ from urllib.parse import quote_plus
 from UM.Resources import Resources
 from UM.VersionUpgrade import VersionUpgrade
 
-from cura.CuraApplication import CuraApplication
-
 _removed_settings = { #Settings that were removed in 2.5.
     "start_layers_at_same_position",
     "sub_div_rad_mult"
@@ -152,7 +150,7 @@ class VersionUpgrade25to26(VersionUpgrade):
 
     ##  Acquires the next unique extruder stack index number for the Custom FDM Printer.
     def _acquireNextUniqueCustomFdmPrinterExtruderStackIdIndex(self):
-        extruder_stack_dir = Resources.getPath(CuraApplication.ResourceTypes.ExtruderStack)
+        extruder_stack_dir = os.path.join(Resources.getDataStoragePath(), "extruders")
         file_name_list = os.listdir(extruder_stack_dir)
         file_name_list = [os.path.basename(file_name) for file_name in file_name_list]
         while True:
@@ -173,7 +171,7 @@ class VersionUpgrade25to26(VersionUpgrade):
 
     def _checkCustomFdmPrinterHasExtruderStack(self, machine_id):
         # go through all extruders and make sure that this custom FDM printer has extruder stacks.
-        extruder_stack_dir = Resources.getPath(CuraApplication.ResourceTypes.ExtruderStack)
+        extruder_stack_dir = os.path.join(Resources.getDataStoragePath(), "extruders")
         has_extruders = False
         for item in os.listdir(extruder_stack_dir):
             file_path = os.path.join(extruder_stack_dir, item)
@@ -245,9 +243,9 @@ class VersionUpgrade25to26(VersionUpgrade):
         parser.write(extruder_output)
         extruder_filename = quote_plus(stack_id) + ".extruder.cfg"
 
-        extruder_stack_dir = Resources.getPath(CuraApplication.ResourceTypes.ExtruderStack)
-        definition_changes_dir = Resources.getPath(CuraApplication.ResourceTypes.DefinitionChangesContainer)
-        user_settings_dir = Resources.getPath(CuraApplication.ResourceTypes.UserInstanceContainer)
+        extruder_stack_dir = os.path.join(Resources.getDataStoragePath(), "extruders")
+        definition_changes_dir = os.path.join(Resources.getDataStoragePath(), "definition_changes")
+        user_settings_dir = os.path.join(Resources.getDataStoragePath(), "user")
 
         with open(os.path.join(definition_changes_dir, definition_changes_filename), "w", encoding = "utf-8") as f:
             f.write(definition_changes_output.getvalue())

+ 1 - 2
plugins/VersionUpgrade/VersionUpgrade26to27/VersionUpgrade26to27.py

@@ -1,11 +1,10 @@
-# Copyright (c) 2017 Ultimaker B.V.
+# Copyright (c) 2018 Ultimaker B.V.
 # Cura is released under the terms of the LGPLv3 or higher.
 
 import configparser #To parse the files we need to upgrade and write the new files.
 import io #To serialise configparser output to a string.
 
 from UM.VersionUpgrade import VersionUpgrade
-from cura.CuraApplication import CuraApplication
 
 # a dict of renamed quality profiles:  <old_id> : <new_id>
 _renamed_quality_profiles = {

+ 2 - 5
resources/definitions/dagoma_neva_magis.def.json → resources/definitions/dagoma_magis.def.json

@@ -1,5 +1,5 @@
 {
-    "name": "Dagoma NEVA Magis",
+    "name": "Dagoma Magis",
     "version": 2,
     "inherits": "fdmprinter",
     "metadata": {
@@ -13,7 +13,7 @@
         "has_materials": true,
         "machine_extruder_trains":
         {
-            "0": "dagoma_neva_magis_extruder_0"
+            "0": "dagoma_magis_extruder_0"
         }
     },
     "overrides": {
@@ -43,9 +43,6 @@
         "machine_shape": {
             "default_value": "elliptic"
         },
-        "machine_gcode_flavor": {
-            "default_value": "RepRap"
-        },
         "machine_start_gcode": {
             "default_value": ";Gcode by Cura\nG90\nG28\nM107\nM109 R100\nG29\nM109 S{material_print_temperature_layer_0} U-55 X55 V-85 Y-85 W0.26 Z0.26\nM82\nG92 E0\nG1 F200 E6\nG92 E0\nG1 F200 E-3.5\nG0 Z0.15\nG0 X10\nG0 Z3\nG1 F6000\n"
         },

+ 0 - 3
resources/definitions/dagoma_neva.def.json

@@ -43,9 +43,6 @@
         "machine_shape": {
             "default_value": "elliptic"
         },
-        "machine_gcode_flavor": {
-            "default_value": "RepRap"
-        },
         "machine_start_gcode": {
             "default_value": ";Gcode by Cura\nG90\nG28\nM107\nM109 R100\nG29\nM109 S{material_print_temperature_layer_0} U-55 X55 V-85 Y-85 W0.26 Z0.26\nM82\nG92 E0\nG1 F200 E6\nG92 E0\nG1 F200 E-3.5\nG0 Z0.15\nG0 X10\nG0 Z3\nG1 F6000\n"
         },

+ 1 - 1
resources/extruders/dagoma_neva_magis_extruder_0.def.json → resources/extruders/dagoma_magis_extruder_0.def.json

@@ -3,7 +3,7 @@
     "name": "Extruder 1",
     "inherits": "fdmextruder",
     "metadata": {
-        "machine": "dagoma_neva_magis",
+        "machine": "dagoma_magis",
         "position": "0"
     },
 

Some files were not shown because too many files changed in this diff