Просмотр исходного кода

Merge branch 'main' into blockstech

jspijker 2 лет назад
Родитель
Сommit
e8a57518bc

+ 3 - 318
conandata.yml

@@ -12,10 +12,10 @@
 # Subject to change in the future!
 "5.3.0-alpha":
     requirements:
-        - "pyarcus/(latest)@ultimaker/testing"
+        - "pyarcus/5.2.2"
         - "curaengine/(latest)@ultimaker/testing"
-        - "pysavitar/(latest)@ultimaker/testing"
-        - "pynest2d/(latest)@ultimaker/testing"
+        - "pysavitar/5.2.2"
+        - "pynest2d/5.2.2"
         - "uranium/(latest)@ultimaker/testing"
         - "fdm_materials/(latest)@ultimaker/testing"
         - "cura_binary_data/(latest)@ultimaker/testing"
@@ -225,216 +225,6 @@
             Windows: "./icons/Cura.ico"
             Macos: "./icons/cura.icns"
             Linux: "./icons/cura-128.png"
-"5.2.0-beta.2":
-    requirements:
-        - "pyarcus/(latest)@ultimaker/stable"
-        - "curaengine/(latest)@ultimaker/stable"
-        - "pysavitar/(latest)@ultimaker/stable"
-        - "pynest2d/(latest)@ultimaker/stable"
-        - "uranium/(latest)@ultimaker/stable"
-        - "fdm_materials/(latest)@ultimaker/stable"
-        - "cura_binary_data/(latest)@ultimaker/stable"
-        - "cpython/3.10.4"
-    internal_requirements:
-        - "fdm_materials_private/(latest)@ultimaker/testing"
-        - "cura_private_data/(latest)@ultimaker/testing"
-    runinfo:
-        entrypoint: "cura_app.py"
-    pyinstaller:
-        datas:
-            cura_plugins:
-                package: "cura"
-                src: "plugins"
-                dst: "share/cura/plugins"
-            cura_resources:
-                package: "cura"
-                src: "resources"
-                dst: "share/cura/resources"
-            cura_private_data:
-                package: "cura_private_data"
-                src: "resources"
-                dst: "share/cura/resources"
-                internal: true
-            uranium_plugins:
-                package: "uranium"
-                src: "plugins"
-                dst: "share/uranium/plugins"
-            uranium_resources:
-                package: "uranium"
-                src: "resources"
-                dst: "share/uranium/resources"
-            uranium_um_qt_qml_um:
-                package: "uranium"
-                src: "site-packages/UM/Qt/qml/UM"
-                dst: "PyQt6/Qt6/qml/UM"
-            cura_binary_data:
-                package: "cura_binary_data"
-                src: "resources/cura/resources"
-                dst: "share/cura/resources"
-            uranium_binary_data:
-                package: "cura_binary_data"
-                src: "resources/uranium/resources"
-                dst: "share/uranium/resources"
-            windows_binary_data:
-                package: "cura_binary_data"
-                src: "windows"
-                dst: "share/windows"
-            fdm_materials:
-                package: "fdm_materials"
-                src: "materials"
-                dst: "share/cura/resources/materials"
-            fdm_materials_private:
-                package: "fdm_materials_private"
-                src: "resources/materials"
-                dst: "share/cura/resources/materials"
-                internal: true
-            tcl:
-                package: "tcl"
-                src: "lib/tcl8.6"
-                dst: "tcl"
-            tk:
-                package: "tk"
-                src: "lib/tk8.6"
-                dst: "tk"
-        binaries:
-            curaengine:
-                package: "curaengine"
-                src: "bin"
-                dst: "."
-                binary: "CuraEngine"
-        hiddenimports:
-            - "pySavitar"
-            - "pyArcus"
-            - "pynest2d"
-            - "PyQt6"
-            - "PyQt6.QtNetwork"
-            - "PyQt6.sip"
-            - "logging.handlers"
-            - "zeroconf"
-            - "fcntl"
-            - "stl"
-            - "serial"
-        collect_all:
-            - "cura"
-            - "UM"
-            - "serial"
-            - "Charon"
-            - "sqlite3"
-            - "trimesh"
-            - "win32ctypes"
-            - "PyQt6"
-            - "PyQt6.QtNetwork"
-            - "PyQt6.sip"
-            - "stl"
-        icon:
-            Windows: "./icons/Cura.ico"
-            Macos: "./icons/cura.icns"
-            Linux: "./icons/cura-128.png"
-"5.2.0-beta.1":
-    requirements:
-        - "pyarcus/5.2.0-beta.1"
-        - "curaengine/5.2.0-beta.1"
-        - "pysavitar/5.2.0-beta.1"
-        - "pynest2d/5.2.0-beta.1"
-        - "uranium/5.2.0-beta.1"
-        - "fdm_materials/5.2.0-beta.1"
-        - "cura_binary_data/5.2.0-beta.1"
-        - "cpython/3.10.4"
-    internal_requirements:
-        - "fdm_materials_private/(latest)@ultimaker/testing"
-        - "cura_private_data/(latest)@ultimaker/testing"
-    runinfo:
-        entrypoint: "cura_app.py"
-    pyinstaller:
-        datas:
-            cura_plugins:
-                package: "cura"
-                src: "plugins"
-                dst: "share/cura/plugins"
-            cura_resources:
-                package: "cura"
-                src: "resources"
-                dst: "share/cura/resources"
-            cura_private_data:
-                package: "cura_private_data"
-                src: "resources"
-                dst: "share/cura/resources"
-                internal: true
-            uranium_plugins:
-                package: "uranium"
-                src: "plugins"
-                dst: "share/uranium/plugins"
-            uranium_resources:
-                package: "uranium"
-                src: "resources"
-                dst: "share/uranium/resources"
-            uranium_um_qt_qml_um:
-                package: "uranium"
-                src: "site-packages/UM/Qt/qml/UM"
-                dst: "PyQt6/Qt6/qml/UM"
-            cura_binary_data:
-                package: "cura_binary_data"
-                src: "resources/cura/resources"
-                dst: "share/cura/resources"
-            uranium_binary_data:
-                package: "cura_binary_data"
-                src: "resources/uranium/resources"
-                dst: "share/uranium/resources"
-            windows_binary_data:
-                package: "cura_binary_data"
-                src: "windows"
-                dst: "share/windows"
-            fdm_materials:
-                package: "fdm_materials"
-                src: "materials"
-                dst: "share/cura/resources/materials"
-            fdm_materials_private:
-                package: "fdm_materials_private"
-                src: "resources/materials"
-                dst: "share/cura/resources/materials"
-                internal: true
-            tcl:
-                package: "tcl"
-                src: "lib/tcl8.6"
-                dst: "tcl"
-            tk:
-                package: "tk"
-                src: "lib/tk8.6"
-                dst: "tk"
-        binaries:
-            curaengine:
-                package: "curaengine"
-                src: "bin"
-                dst: "."
-                binary: "CuraEngine"
-        hiddenimports:
-            - "pySavitar"
-            - "pyArcus"
-            - "pynest2d"
-            - "PyQt6"
-            - "PyQt6.QtNetwork"
-            - "PyQt6.sip"
-            - "logging.handlers"
-            - "zeroconf"
-            - "fcntl"
-            - "stl"
-            - "serial"
-        collect_all:
-            - "cura"
-            - "UM"
-            - "serial"
-            - "Charon"
-            - "sqlite3"
-            - "trimesh"
-            - "win32ctypes"
-            - "PyQt6"
-            - "PyQt6.QtNetwork"
-            - "PyQt6.sip"
-            - "stl"
-        icon:
-            Windows: "./icons/Cura.ico"
-            Macos: "./icons/cura.icns"
-            Linux: "./icons/cura-128.png"
 "5.2.0":
     requirements:
         - "pyarcus/5.2.0"
@@ -540,111 +330,6 @@
             Windows: "./icons/Cura.ico"
             Macos: "./icons/cura.icns"
             Linux: "./icons/cura-128.png"
-"5.2.0-alpha":
-    requirements:
-        - "pyarcus/5.2@ultimaker/testing"
-        - "curaengine/(latest)@ultimaker/testing"
-        - "pysavitar/(latest)@ultimaker/testing"
-        - "pynest2d/(latest)@ultimaker/testing"
-        - "uranium/(latest)@ultimaker/testing"
-        - "fdm_materials/(latest)@ultimaker/testing"
-        - "cura_binary_data/(latest)@ultimaker/testing"
-        - "cpython/3.10.4"
-    internal_requirements:
-        - "fdm_materials_private/(latest)@ultimaker/testing"
-        - "cura_private_data/(latest)@ultimaker/testing"
-    runinfo:
-        entrypoint: "cura_app.py"
-    pyinstaller:
-        datas:
-            cura_plugins:
-                package: "cura"
-                src: "plugins"
-                dst: "share/cura/plugins"
-            cura_resources:
-                package: "cura"
-                src: "resources"
-                dst: "share/cura/resources"
-            cura_private_data:
-                package: "cura_private_data"
-                src: "resources"
-                dst: "share/cura/resources"
-                internal: true
-            uranium_plugins:
-                package: "uranium"
-                src: "plugins"
-                dst: "share/uranium/plugins"
-            uranium_resources:
-                package: "uranium"
-                src: "resources"
-                dst: "share/uranium/resources"
-            uranium_um_qt_qml_um:
-                package: "uranium"
-                src: "site-packages/UM/Qt/qml/UM"
-                dst: "PyQt6/Qt6/qml/UM"
-            cura_binary_data:
-                package: "cura_binary_data"
-                src: "resources/cura/resources"
-                dst: "share/cura/resources"
-            uranium_binary_data:
-                package: "cura_binary_data"
-                src: "resources/uranium/resources"
-                dst: "share/uranium/resources"
-            windows_binary_data:
-                package: "cura_binary_data"
-                src: "windows"
-                dst: "share/windows"
-            fdm_materials:
-                package: "fdm_materials"
-                src: "materials"
-                dst: "share/cura/resources/materials"
-            fdm_materials_private:
-                package: "fdm_materials_private"
-                src: "resources/materials"
-                dst: "share/cura/resources/materials"
-                internal: true
-            tcl:
-                package: "tcl"
-                src: "lib/tcl8.6"
-                dst: "tcl"
-            tk:
-                package: "tk"
-                src: "lib/tk8.6"
-                dst: "tk"
-        binaries:
-            curaengine:
-                package: "curaengine"
-                src: "bin"
-                dst: "."
-                binary: "CuraEngine"
-        hiddenimports:
-            - "pySavitar"
-            - "pyArcus"
-            - "pynest2d"
-            - "PyQt6"
-            - "PyQt6.QtNetwork"
-            - "PyQt6.sip"
-            - "logging.handlers"
-            - "zeroconf"
-            - "fcntl"
-            - "stl"
-            - "serial"
-        collect_all:
-            - "cura"
-            - "UM"
-            - "serial"
-            - "Charon"
-            - "sqlite3"
-            - "trimesh"
-            - "win32ctypes"
-            - "PyQt6"
-            - "PyQt6.QtNetwork"
-            - "PyQt6.sip"
-            - "stl"
-        icon:
-            Windows: "./icons/Cura.ico"
-            Macos: "./icons/cura.icns"
-            Linux: "./icons/cura-128.png"
 "5.1.0":
     requirements:
         - "arcus/5.1.0"

+ 70 - 10
plugins/PostProcessingPlugin/scripts/FilamentChange.py

@@ -24,20 +24,29 @@ class FilamentChange(Script):
             "version": 2,
             "settings":
             {
+                "enabled":
+                {
+                    "label": "Enable",
+                    "description": "Uncheck to temporarily disable this feature.",
+                    "type": "bool",
+                    "default_value": true
+                },
                 "layer_number":
                 {
                     "label": "Layer",
                     "description": "At what layer should color change occur. This will be before the layer starts printing. Specify multiple color changes with a comma.",
                     "unit": "",
                     "type": "str",
-                    "default_value": "1"
+                    "default_value": "1",
+                    "enabled": "enabled"
                 },
                 "firmware_config":
                 {
                     "label": "Use Firmware Configuration",
                     "description": "Use the settings in your firmware, or customise the parameters of the filament change here.",
                     "type": "bool",
-                    "default_value": false
+                    "default_value": false,
+                    "enabled": "enabled"
                 },
                 "initial_retract":
                 {
@@ -46,7 +55,7 @@ class FilamentChange(Script):
                     "unit": "mm",
                     "type": "float",
                     "default_value": 30.0,
-                    "enabled": "not firmware_config"
+                    "enabled": "enabled and not firmware_config"
                 },
                 "later_retract":
                 {
@@ -55,7 +64,7 @@ class FilamentChange(Script):
                     "unit": "mm",
                     "type": "float",
                     "default_value": 300.0,
-                    "enabled": "not firmware_config"
+                    "enabled": "enabled and not firmware_config"
                 },
                 "x_position":
                 {
@@ -64,7 +73,7 @@ class FilamentChange(Script):
                     "unit": "mm",
                     "type": "float",
                     "default_value": 0,
-                    "enabled": "not firmware_config"
+                    "enabled": "enabled and not firmware_config"
                 },
                 "y_position":
                 {
@@ -73,7 +82,7 @@ class FilamentChange(Script):
                     "unit": "mm",
                     "type": "float",
                     "default_value": 0,
-                    "enabled": "not firmware_config"
+                    "enabled": "enabled and not firmware_config"
                 },
                 "z_position":
                 {
@@ -82,7 +91,8 @@ class FilamentChange(Script):
                     "unit": "mm",
                     "type": "float",
                     "default_value": 0,
-                    "minimum_value": 0
+                    "minimum_value": 0,
+                    "enabled": "enabled"
                 },
                 "retract_method":
                 {
@@ -92,7 +102,7 @@ class FilamentChange(Script):
                     "options": {"U": "Marlin (M600 U)", "L": "Reprap (M600 L)"},
                     "default_value": "U",
                     "value": "\\\"L\\\" if machine_gcode_flavor==\\\"RepRap (RepRap)\\\" else \\\"U\\\"",
-                    "enabled": "not firmware_config"
+                    "enabled": "enabled and not firmware_config"
                 },                    
                 "machine_gcode_flavor":
                 {
@@ -113,6 +123,40 @@ class FilamentChange(Script):
                     },
                     "default_value": "RepRap (Marlin/Sprinter)",
                     "enabled": "false"
+                },
+                "enable_before_macro":
+                {
+                    "label": "Enable G-code Before",
+                    "description": "Use this to insert a custom G-code macro before the filament change happens",
+                    "type": "bool",
+                    "default_value": false,
+                    "enabled": "enabled"
+                },
+                "before_macro":
+                {
+                    "label": "G-code Before",
+                    "description": "Any custom G-code to run before the filament change happens, for example, M300 S1000 P10000 for a long beep.",
+                    "unit": "",
+                    "type": "str",
+                    "default_value": "M300 S1000 P10000",
+                    "enabled": "enabled and enable_before_macro"
+                },
+                "enable_after_macro":
+                {
+                    "label": "Enable G-code After",
+                    "description": "Use this to insert a custom G-code macro after the filament change",
+                    "type": "bool",
+                    "default_value": false,
+                    "enabled": "enabled"
+                },
+                "after_macro":
+                {
+                    "label": "G-code After",
+                    "description": "Any custom G-code to run after the filament has been changed right before continuing the print, for example, you can add a sequence to purge filament and wipe the nozzle.",
+                    "unit": "",
+                    "type": "str",
+                    "default_value": "M300 S440 P500",
+                    "enabled": "enabled and enable_after_macro"
                 }
             }
         }"""
@@ -134,6 +178,7 @@ class FilamentChange(Script):
         :param data: A list of layers of g-code.
         :return: A similar list, with filament change commands inserted.
         """
+        enabled = self.getSettingValueByKey("enabled")
         layer_nums = self.getSettingValueByKey("layer_number")
         initial_retract = self.getSettingValueByKey("initial_retract")
         later_retract = self.getSettingValueByKey("later_retract")
@@ -141,8 +186,20 @@ class FilamentChange(Script):
         y_pos = self.getSettingValueByKey("y_position")
         z_pos = self.getSettingValueByKey("z_position")
         firmware_config = self.getSettingValueByKey("firmware_config")
+        enable_before_macro = self.getSettingValueByKey("enable_before_macro")
+        before_macro = self.getSettingValueByKey("before_macro")
+        enable_after_macro = self.getSettingValueByKey("enable_after_macro")
+        after_macro = self.getSettingValueByKey("after_macro")
+
+        if not enabled:
+            return data
+
+        color_change = ";BEGIN FilamentChange plugin\n"
 
-        color_change = "M600"
+        if enable_before_macro:
+            color_change = color_change + before_macro + "\n"
+
+        color_change = color_change + "M600\n"
 
         if not firmware_config:
             if initial_retract is not None and initial_retract > 0.:
@@ -163,7 +220,10 @@ class FilamentChange(Script):
             if z_pos is not None and z_pos > 0.:
                 color_change = color_change + (" Z%.2f" % z_pos)
 
-        color_change = color_change + " ; Generated by FilamentChange plugin\n"
+        if enable_after_macro:
+            color_change = color_change + after_macro + "\n"
+
+        color_change = color_change + ";END FilamentChange plugin\n"
 
         layer_targets = layer_nums.split(",")
         if len(layer_targets) > 0:

+ 12 - 16
plugins/UFPWriter/UFPWriter.py

@@ -229,22 +229,24 @@ class UFPWriter(MeshWriter):
             "quality": asdict(machine_manager.activeQualityDisplayNameMap()),
         }
 
+        def _retrieveValue(container: InstanceContainer, setting_: str):
+            value_ = container.getProperty(setting_, "value")
+            for _ in range(0, 1024):  # Prevent possibly endless loop by not using a limit.
+                if not isinstance(value_, SettingFunction):
+                    return value_  # Success!
+                value_ = value_(container)
+            return 0  # Fallback value after breaking possibly endless loop.
+
         global_stack = cast(GlobalStack, Application.getInstance().getGlobalContainerStack())
 
         # Add global user or quality changes
         global_flattened_changes = InstanceContainer.createMergedInstanceContainer(global_stack.userChanges, global_stack.qualityChanges)
         for setting in global_flattened_changes.getAllKeys():
-            value = global_flattened_changes.getProperty(setting, "value")
-            if isinstance(value, SettingFunction):
-                value = value(global_flattened_changes)
-            settings["global"]["changes"][setting] = value
+            settings["global"]["changes"][setting] = _retrieveValue(global_flattened_changes, setting)
 
         # Get global all settings values without user or quality changes
         for setting in global_stack.getAllKeys():
-            value = global_stack.getProperty(setting, "value")
-            if isinstance(value, SettingFunction):
-                value = value(global_stack)
-            settings["global"]["all_settings"][setting] = value
+            settings["global"]["all_settings"][setting] = _retrieveValue(global_stack, setting)
 
         for i, extruder in enumerate(global_stack.extruderList):
             # Add extruder fields to settings dictionary
@@ -256,16 +258,10 @@ class UFPWriter(MeshWriter):
             # Add extruder user or quality changes
             extruder_flattened_changes = InstanceContainer.createMergedInstanceContainer(extruder.userChanges, extruder.qualityChanges)
             for setting in extruder_flattened_changes.getAllKeys():
-                value = extruder_flattened_changes.getProperty(setting, "value")
-                if isinstance(value, SettingFunction):
-                    value = value(extruder_flattened_changes)
-                settings[f"extruder_{i}"]["changes"][setting] = value
+                settings[f"extruder_{i}"]["changes"][setting] = _retrieveValue(extruder_flattened_changes, setting)
 
             # Get extruder all settings values without user or quality changes
             for setting in extruder.getAllKeys():
-                value = extruder.getProperty(setting, "value")
-                if isinstance(value, SettingFunction):
-                    value = value(extruder)
-                settings[f"extruder_{i}"]["all_settings"][setting] = value
+                settings[f"extruder_{i}"]["all_settings"][setting] = _retrieveValue(extruder, setting)
 
         return settings

+ 3 - 1
printer-linter/src/printerlinter/linters/meshes.py

@@ -4,12 +4,14 @@ from typing import Iterator
 from ..diagnostic import Diagnostic
 from .linter import Linter
 
+MAX_MESH_FILE_SIZE = 1 * 1024 * 1024  # 1MB
+
 
 class Meshes(Linter):
     def __init__(self, file: Path, settings: dict) -> None:
         """ Finds issues in model files, such as incorrect file format or too large size """
         super().__init__(file, settings)
-        self._max_file_size = self._settings.get("diagnostic-mesh-file-size", 1e6)
+        self._max_file_size = self._settings.get("diagnostic-mesh-file-size", MAX_MESH_FILE_SIZE)
 
     def check(self) -> Iterator[Diagnostic]:
         if self._settings["checks"].get("diagnostic-mesh-file-extension", False):

+ 1 - 4
resources/definitions/SV01.def.json

@@ -1,6 +1,6 @@
 {
     "version": 2,
-    "name": "Sovol-SV01",
+    "name": "Sovol-SV01 (Legacy)",
     "inherits": "fdmprinter",
     "metadata":
     {
@@ -15,7 +15,6 @@
     },
     "overrides":
     {
-        "acceleration_enabled": { "value": false },
         "acceleration_print": { "value": 500 },
         "acceleration_roofing": { "enabled": "acceleration_enabled and roofing_layer_count > 0 and top_layers > 0" },
         "acceleration_travel": { "value": 500 },
@@ -38,7 +37,6 @@
         "machine_max_acceleration_e": { "value": 5000 },
         "machine_max_acceleration_x": { "value": 500 },
         "machine_max_acceleration_y": { "value": 500 },
-        "machine_max_acceleration_z": { "value": 100 },
         "machine_max_feedrate_e": { "value": 50 },
         "machine_max_feedrate_x": { "value": 500 },
         "machine_max_feedrate_y": { "value": 500 },
@@ -56,7 +54,6 @@
         "retraction_amount": { "default_value": 3 },
         "retraction_speed": { "default_value": 50 },
         "skin_overlap": { "value": 10.0 },
-        "skirt_brim_speed": { "value": "speed_layer_0" },
         "speed_print": { "value": 50.0 },
         "wall_0_wipe_dist": { "value": 0.0 },
         "z_seam_corner": { "value": "'z_seam_corner_weighted'" },

+ 2 - 8
resources/definitions/SV02.def.json

@@ -1,6 +1,6 @@
 {
     "version": 2,
-    "name": "Sovol-SV02",
+    "name": "Sovol-SV02 (Legacy)",
     "inherits": "fdmprinter",
     "metadata":
     {
@@ -19,7 +19,6 @@
     },
     "overrides":
     {
-        "acceleration_enabled": { "value": false },
         "acceleration_print": { "value": 500 },
         "acceleration_travel": { "value": 500 },
         "acceleration_travel_layer_0": { "value": "acceleration_travel" },
@@ -40,11 +39,9 @@
         "jerk_travel": { "value": "jerk_print" },
         "jerk_travel_layer_0": { "value": "jerk_travel" },
         "machine_acceleration": { "value": 500 },
-        "machine_center_is_zero": { "default_value": false },
         "machine_depth": { "default_value": 240 },
         "machine_end_gcode": { "default_value": "M104 S0  ;hotend off\nM140 S0  ;bed off\nG92 E0\nG1 F2000 E-100  ;retract filament 100mm\nG92 E0\nG1 F3000 X0 Y240  ;move bed for easy part removal\nM84  ;disable steppers" },
         "machine_extruder_count": { "default_value": 2 },
-        "machine_gcode_flavor": { "default_value": "RepRap (Marlin/Sprinter)" },
         "machine_heated_bed": { "default_value": true },
         "machine_height": { "default_value": 300 },
         "machine_max_acceleration_e": { "value": 500 },
@@ -55,16 +52,14 @@
         "machine_max_feedrate_x": { "value": 500 },
         "machine_max_feedrate_y": { "value": 500 },
         "machine_max_feedrate_z": { "value": 10 },
-        "machine_max_jerk_e": { "default_value": 5.0 },
         "machine_max_jerk_xy": { "default_value": 5.0 },
         "machine_max_jerk_z": { "default_value": 0.4 },
         "machine_name": { "default_value": "SV02" },
         "machine_start_gcode": { "default_value": "G21 ;metric values\nG28 ;home all\nG90 ;absolute positioning\nM107 ;start with the fan off\nG1 F2400 Z15.0 ;raise the nozzle 15mm\nM109 S{material_print_temperature} ;Set Extruder Temperature and Wait\nM190 S{material_bed_temperature}; Wait for bed temperature to reach target temp\nT0 ;Switch to Extruder 1\nG1 F3000 X5 Y10 Z0.2 ;move to prime start position\nG92 E0 ;reset extrusion distance\nG1 F600 X160 E5 ;prime nozzle in a line\nG1 F5000 X180 ;quick wipe\nG92 E0 ;reset extrusion distance" },
         "machine_width": { "default_value": 280 },
         "material_diameter": { "default_value": 1.75 },
-        "material_final_print_temperature": { "value": 195 },
         "material_initial_print_temperature": { "value": "material_print_temperature" },
-        "prime_tower_min_volume": { "value": "((resolveOrValue('prime_tower_size') * 0.5) ** 2 * 3.14159 * resolveOrValue('layer_height'))/2" },
+        "prime_tower_min_volume": { "value": "((reveOrValue('layer_height'))/2" },
         "prime_tower_position_x": { "value": "240" },
         "prime_tower_position_y": { "value": "190" },
         "prime_tower_size": { "value": "30" },
@@ -76,7 +71,6 @@
         "skirt_line_count": { "value": 3 },
         "speed_print": { "default_value": 50 },
         "top_bottom_thickness": { "default_value": 1 },
-        "travel_retract_before_outer_wall": { "default_value": true },
         "wall_0_wipe_dist": { "value": 0.0 }
     }
 }

+ 64 - 66
resources/definitions/SV03.def.json

@@ -1,66 +1,64 @@
-{
-    "version": 2,
-    "name": "Sovol-SV03",
-    "inherits": "fdmprinter",
-    "metadata": {
-        "visible": true,
-        "author": "Sovol",
-        "manufacturer": "Sovol 3D",
-        "file_formats": "text/x-gcode",
-        "has_variants": false,
-        "has_machine_quality": false,
-        "preferred_quality_type": "draft",
-        "machine_extruder_trains": {
-            "0": "SV03_extruder_0"
-        }
-    },
-
-    "overrides": {
-        "machine_name": { "default_value": "SV03" },
-        "machine_extruder_count": { "default_value": 1 },
-        "machine_width": { "default_value": 350 },
-        "machine_depth": { "default_value": 350 },
-        "machine_height": { "default_value": 400 },	
-        "machine_max_feedrate_x": { "value": 500 },
-        "machine_max_feedrate_y": { "value": 500 },
-        "machine_max_feedrate_z": { "value": 10 },
-        "machine_max_feedrate_e": { "value": 50 },
-        "machine_max_acceleration_x": { "value": 500 },
-        "machine_max_acceleration_y": { "value": 500 },
-        "machine_max_acceleration_z": { "value": 100 },
-        "machine_max_acceleration_e": { "value": 5000 },
-        "machine_acceleration": { "value": 500 },
-        "machine_max_jerk_xy": { "value": 10 },
-        "machine_max_jerk_z": { "value": 0.4 },
-        "machine_max_jerk_e": { "value": 5 },
-        "machine_heated_bed": { "default_value": true },
-        "material_diameter": { "default_value": 1.75 },
-        "acceleration_print": { "value": 500 },
-        "acceleration_travel": { "value": 500 },
-        "acceleration_travel_layer_0": { "value": "acceleration_travel" },
-        "acceleration_roofing": { "enabled": "acceleration_enabled and roofing_layer_count > 0 and top_layers > 0" },
-        "jerk_print": { "value": 8 },
-        "jerk_travel": { "value": "jerk_print" },
-        "jerk_travel_layer_0": { "value": "jerk_travel" },
-        "acceleration_enabled": { "value": false },
-        "jerk_enabled": { "value": false },
-        "speed_print": { "value": 50.0 } ,
-        "skirt_brim_speed": { "value": "speed_layer_0" },
-        "optimize_wall_printing_order": { "value": "True" },
-        "material_initial_print_temperature": { "value": "material_print_temperature" },
-        "material_final_print_temperature": { "value": "material_print_temperature" },
-        "z_seam_type": { "value": "'back'" },
-        "z_seam_corner": { "value": "'z_seam_corner_weighted'" },
-        "infill_pattern": { "value": "'lines'" },
-        "infill_before_walls": { "value": false },
-        "infill_overlap": { "value": 30.0 },
-        "skin_overlap": { "value": 10.0 },
-        "infill_wipe_dist": { "value": 0.0 },
-        "wall_0_wipe_dist": { "value": 0.0 },      
-        "retraction_amount": { "default_value": 3},
-        "retraction_speed": { "default_value": 50},
-        "adhesion_type": { "value": "'skirt'" },
-        "machine_start_gcode": { "default_value": "M201 X500.00 Y500.00 Z100.00 E5000.00 ;Setup machine max acceleration\nM203 X500.00 Y500.00 Z10.00 E50.00 ;Setup machine max feedrate\nM204 P500.00 R1000.00 T500.00 ;Setup Print/Retract/Travel acceleration\nM205 X8.00 Y8.00 Z0.40 E5.00 ;Setup Jerk\nM220 S100 ;Reset Feedrate\nM221 S100 ;Reset Flowrate\n\nG28 ;Home\nG29 ;Automatic Leveling\n\nG92 E0 ;Reset Extruder\nG1 Z2.0 F3000 ;Move Z Axis up\nG1 X10.1 Y20 Z0.28 F5000.0 ;Move to start position\nG1 X10.1 Y200.0 Z0.28 F1500.0 E15 ;Draw the first line\nG1 X10.4 Y200.0 Z0.28 F5000.0 ;Move to side a little\nG1 X10.4 Y20 Z0.28 F1500.0 E30 ;Draw the second line\nG92 E0 ;Reset Extruder\nG1 Z2.0 F3000 ;Move Z Axis up\n" },
-        "machine_end_gcode": { "default_value": "G91 ;Relative positioning\nG1 E-2 F2700 ;Retract a bit\nG1 E-2 Z0.2 F2400 ;Retract and raise Z\nG1 X0 Y240 F3000 ;Wipe out\nG1 Z10 ;Raise Z more\nG90 ;Absolute positioning\n\nG1 X0 Y{machine_depth} ;Present print\nM106 S0 ;Turn-off fan\nM104 S0 ;Turn-off hotend\nM140 S0 ;Turn-off bed\n\nM84 X Y E ;Disable all steppers but Z\n" }
-    }
-}
+{
+    "version": 2,
+    "name": "Sovol-SV03 (Legacy)",
+    "inherits": "fdmprinter",
+    "metadata":
+    {
+        "visible": true,
+        "author": "Sovol",
+        "manufacturer": "Sovol 3D",
+        "file_formats": "text/x-gcode",
+        "has_machine_quality": false,
+        "has_variants": false,
+        "machine_extruder_trains": { "0": "SV03_extruder_0" },
+        "preferred_quality_type": "draft"
+    },
+    "overrides":
+    {
+        "acceleration_enabled": { "value": false },
+        "acceleration_print": { "value": 500 },
+        "acceleration_roofing": { "enabled": "acceleration_enabled and roofing_layer_count > 0 and top_layers > 0" },
+        "acceleration_travel": { "value": 500 },
+        "acceleration_travel_layer_0": { "value": "acceleration_travel" },
+        "adhesion_type": { "value": "'skirt'" },
+        "infill_before_walls": { "value": false },
+        "infill_overlap": { "value": 30.0 },
+        "infill_pattern": { "value": "'lines'" },
+        "infill_wipe_dist": { "value": 0.0 },
+        "jerk_enabled": { "value": false },
+        "jerk_print": { "value": 8 },
+        "jerk_travel": { "value": "jerk_print" },
+        "jerk_travel_layer_0": { "value": "jerk_travel" },
+        "machine_acceleration": { "value": 500 },
+        "machine_depth": { "default_value": 350 },
+        "machine_end_gcode": { "default_value": "G91 ;Relative positioning\nG1 E-2 F2700 ;Retract a bit\nG1 E-2 Z0.2 F2400 ;Retract and raise Z\nG1 X0 Y240 F3000 ;Wipe out\nG1 Z10 ;Raise Z more\nG90 ;Absolute positioning\n\nG1 X0 Y{machine_depth} ;Present print\nM106 S0 ;Turn-off fan\nM104 S0 ;Turn-off hotend\nM140 S0 ;Turn-off bed\n\nM84 X Y E ;Disable all steppers but Z\n" },
+        "machine_heated_bed": { "default_value": true },
+        "machine_height": { "default_value": 400 },
+        "machine_max_acceleration_e": { "value": 5000 },
+        "machine_max_acceleration_x": { "value": 500 },
+        "machine_max_acceleration_y": { "value": 500 },
+        "machine_max_acceleration_z": { "value": 100 },
+        "machine_max_feedrate_e": { "value": 50 },
+        "machine_max_feedrate_x": { "value": 500 },
+        "machine_max_feedrate_y": { "value": 500 },
+        "machine_max_feedrate_z": { "value": 10 },
+        "machine_max_jerk_e": { "value": 5 },
+        "machine_max_jerk_xy": { "value": 10 },
+        "machine_max_jerk_z": { "value": 0.4 },
+        "machine_name": { "default_value": "SV03" },
+        "machine_start_gcode": { "default_value": "M201 X500.00 Y500.00 Z100.00 E5000.00 ;Setup machine max acceleration\nM203 X500.00 Y500.00 Z10.00 E50.00 ;Setup machine max feedrate\nM204 P500.00 R1000.00 T500.00 ;Setup Print/Retract/Travel acceleration\nM205 X8.00 Y8.00 Z0.40 E5.00 ;Setup Jerk\nM220 S100 ;Reset Feedrate\nM221 S100 ;Reset Flowrate\n\nG28 ;Home\nG29 ;Automatic Leveling\n\nG92 E0 ;Reset Extruder\nG1 Z2.0 F3000 ;Move Z Axis up\nG1 X10.1 Y20 Z0.28 F5000.0 ;Move to start position\nG1 X10.1 Y200.0 Z0.28 F1500.0 E15 ;Draw the first line\nG1 X10.4 Y200.0 Z0.28 F5000.0 ;Move to side a little\nG1 X10.4 Y20 Z0.28 F1500.0 E30 ;Draw the second line\nG92 E0 ;Reset Extruder\nG1 Z2.0 F3000 ;Move Z Axis up\n" },
+        "machine_width": { "default_value": 350 },
+        "material_diameter": { "default_value": 1.75 },
+        "material_final_print_temperature": { "value": "material_print_temperature" },
+        "material_initial_print_temperature": { "value": "material_print_temperature" },
+        "optimize_wall_printing_order": { "value": "True" },
+        "retraction_amount": { "default_value": 3 },
+        "retraction_speed": { "default_value": 50 },
+        "skin_overlap": { "value": 10.0 },
+        "skirt_brim_speed": { "value": "speed_layer_0" },
+        "speed_print": { "value": 50.0 },
+        "wall_0_wipe_dist": { "value": 0.0 },
+        "z_seam_corner": { "value": "'z_seam_corner_weighted'" },
+        "z_seam_type": { "value": "'back'" }
+    }
+}

+ 31 - 2
resources/definitions/ankermake_m5.def.json

@@ -17,7 +17,37 @@
     },
     "overrides":
     {
-        "acceleration_print": { "value": "2500" },
+        "acceleration_enabled": { "value": "true" },
+        "acceleration_infill": { "maximum_value_warning": "2500" },
+        "acceleration_layer_0": { "maximum_value_warning": "2500" },
+        "acceleration_prime_tower": { "maximum_value_warning": "2500" },
+        "acceleration_print":
+        {
+            "maximum_value_warning": "2500",
+            "value": "2500"
+        },
+        "acceleration_print_layer_0": { "maximum_value_warning": "2500" },
+        "acceleration_roofing": { "maximum_value_warning": "2500" },
+        "acceleration_skirt_brim": { "maximum_value_warning": "2500" },
+        "acceleration_support": { "maximum_value_warning": "2500" },
+        "acceleration_support_bottom": { "maximum_value_warning": "2500" },
+        "acceleration_support_infill": { "maximum_value_warning": "2500" },
+        "acceleration_support_interface": { "maximum_value_warning": "2500" },
+        "acceleration_support_roof": { "maximum_value_warning": "2500" },
+        "acceleration_topbottom": { "maximum_value_warning": "2500" },
+        "acceleration_travel":
+        {
+            "maximum_value_warning": "2500",
+            "value": "acceleration_print"
+        },
+        "acceleration_travel_layer_0":
+        {
+            "maximum_value_warning": "2500",
+            "value": "acceleration_travel"
+        },
+        "acceleration_wall": { "maximum_value_warning": "2500" },
+        "acceleration_wall_0": { "maximum_value_warning": "2500" },
+        "acceleration_wall_x": { "maximum_value_warning": "2500" },
         "adhesion_type": { "default_value": "skirt" },
         "cool_min_layer_time": { "value": 6 },
         "cool_min_speed": { "value": 30 },
@@ -91,7 +121,6 @@
         "top_bottom_thickness": { "value": "layer_height * 4" },
         "wall_overhang_angle": { "value": 55 },
         "wall_overhang_speed_factor": { "value": 55 },
-        "xy_offset_layer_0": { "value": -0.2 },
         "zig_zaggify_infill": { "value": "infill_pattern == 'cross' or infill_pattern == 'cross_3d' or infill_pattern == 'lines'" }
     }
 }

+ 20 - 14
resources/definitions/creality_cr10spro.def.json

@@ -1,24 +1,30 @@
 {
-    "name": "Creality CR-10S Pro",
     "version": 2,
+    "name": "Creality CR-10S Pro",
     "inherits": "creality_cr10",
-    "overrides": {
-        "machine_name": { "default_value": "Creality CR-10S Pro" },
-        "machine_start_gcode": { "default_value": "M201 X500.00 Y500.00 Z100.00 E5000.00 ;Setup machine max acceleration\nM203 X500.00 Y500.00 Z10.00 E50.00 ;Setup machine max feedrate\nM204 P500.00 R1000.00 T500.00 ;Setup Print/Retract/Travel acceleration\nM205 X8.00 Y8.00 Z0.40 E5.00 ;Setup Jerk\nM220 S100 ;Reset Feedrate\nM221 S100 ;Reset Flowrate\n\nG28 ;Home\nG29 ;Auto bed Level\n\nG92 E0 ;Reset Extruder\nG1 Z2.0 F3000 ;Move Z Axis up\nG1 X10.1 Y20 Z0.28 F5000.0 ;Move to start position\nG1 X10.1 Y200.0 Z0.28 F1500.0 E15 ;Draw the first line\nG1 X10.4 Y200.0 Z0.28 F5000.0 ;Move to side a little\nG1 X10.4 Y20 Z0.28 F1500.0 E30 ;Draw the second line\nG92 E0 ;Reset Extruder\nG1 Z2.0 F3000 ;Move Z Axis up\n"},
-        "machine_head_with_fans_polygon": { "default_value": [
+    "metadata":
+    {
+        "platform": "creality_cr10spro.3mf",
+        "platform_offset": [
+            -150,
+            0,
+            150
+        ],
+        "quality_definition": "creality_base"
+    },
+    "overrides":
+    {
+        "gantry_height": { "value": 30 },
+        "machine_head_with_fans_polygon":
+        {
+            "default_value": [
                 [-44, 34],
                 [-44, -34],
                 [38, -34],
                 [38, 34]
             ]
         },
-
-        "gantry_height": { "value": 30 }
-
-    },
-    "metadata": {
-        "quality_definition": "creality_base",
-        "platform": "creality_cr10spro.3mf",
-        "platform_offset": [ -150, 0, 150]
+        "machine_name": { "default_value": "Creality CR-10S Pro" },
+        "machine_start_gcode": { "default_value": "M201 X500.00 Y500.00 Z100.00 E5000.00 ;Setup machine max acceleration\nM203 X500.00 Y500.00 Z10.00 E50.00 ;Setup machine max feedrate\nM204 P500.00 R1000.00 T500.00 ;Setup Print/Retract/Travel acceleration\nM205 X8.00 Y8.00 Z0.40 E5.00 ;Setup Jerk\nM220 S100 ;Reset Feedrate\nM221 S100 ;Reset Flowrate\n\nG28 ;Home\nG29 ;Auto bed Level\nM420 S1 ;Save and use mesh\n\nG92 E0 ;Reset Extruder\nG1 Z2.0 F3000 ;Move Z Axis up\nG1 X10.1 Y20 Z0.28 F5000.0 ;Move to start position\nG1 X10.1 Y200.0 Z0.28 F1500.0 E15 ;Draw the first line\nG1 X10.4 Y200.0 Z0.28 F5000.0 ;Move to side a little\nG1 X10.4 Y20 Z0.28 F1500.0 E30 ;Draw the second line\nG92 E0 ;Reset Extruder\nG1 Z2.0 F3000 ;Move Z Axis up\n" }
     }
-}
+}

+ 32 - 0
resources/definitions/creality_ender3s1plus.def.json

@@ -0,0 +1,32 @@
+{
+    "version": 2,
+    "name": "Creality Ender-3 S1 Plus",
+    "inherits": "creality_base",
+    "metadata":
+    {
+        "visible": true,
+        "quality_definition": "creality_base"
+    },
+    "overrides":
+    {
+        "gantry_height": { "value": 25 },
+        "machine_depth": { "default_value": 300 },
+        "machine_head_with_fans_polygon":
+        {
+            "default_value": [
+                [-26, 34],
+                [-26, -32],
+                [32, -32],
+                [32, 34]
+            ]
+        },
+        "machine_height": { "default_value": 300 },
+        "machine_name": { "default_value": "Creality Ender-3 S1 Plus" },
+        "machine_start_gcode": { "default_value": "; Ender 3 S1 Plus Start G-code\nG28 ;Home\nG92 E0 ;Reset Extruder\nG1 Z2.0 F3000 ;Move Z Axis up\nG1 X10.1 Y20 Z0.28 F5000.0 ;Move to start position\nG1 X10.1 Y200.0 Z0.28 F1500.0 E15 ;Draw the first line\nG1 X10.4 Y200.0 Z0.28 F5000.0 ;Move to side a little\nG1 X10.4 Y20 Z0.28 F1500.0 E30 ;Draw the second line\nG92 E0 ;Reset Extruder\nG1 Z2.0 F3000 ;Move Z Axis up\n" },
+        "machine_width": { "default_value": 300 },
+        "retraction_amount": { "value": 0.8 },
+        "retraction_speed": { "default_value": 40 },
+        "speed_layer_0": { "value": 25 },
+        "speed_travel": { "value": "120.0 if speed_print < 60 else 250.0 if speed_print > 100 else speed_print * 2.5" }
+    }
+}

Некоторые файлы не были показаны из-за большого количества измененных файлов