Browse Source

Merge branch 'Ultimaker:main' into main

whoseyoung 2 years ago
parent
commit
e61bcf3033

+ 54 - 54
.github/workflows/printer-linter-pr-diagnose.yml

@@ -1,59 +1,59 @@
 name: printer-linter-pr-diagnose
 
 on:
-    pull_request:
-        path:
-            - 'resources/**'
+  pull_request:
+    path:
+      - "resources/**"
 
 jobs:
-    printer-linter-diagnose:
-        name: Printer linter PR diagnose
-
-        runs-on: ubuntu-latest
-        steps:
-            -   name: Checkout
-                uses: actions/checkout@v3
-                with:
-                    fetch-depth: 2
-
-            -   name: Setup Python and pip
-                uses: actions/setup-python@v4
-                with:
-                    python-version: 3.11.x
-                    cache: 'pip'
-                    cache-dependency-path: .github/workflows/requirements-printer-linter.txt
-
-            -   uses: technote-space/get-diff-action@v6
-                with:
-                    PATTERNS: |
-                        resources/+(extruders|definitions)/*.def.json
-                        resources/+(intent|quality|variants)/**/*.inst.cfg
-
-            -   name: Install Python requirements for runner
-                if: env.GIT_DIFF && !env.MATCHED_FILES
-                run: pip install -r .github/workflows/requirements-printer-linter.txt
-
-            -   name: Create results directory
-                run: mkdir printer-linter-result
-
-            -   name: Diagnose file(s)
-                if: env.GIT_DIFF && !env.MATCHED_FILES
-                run: python printer-linter/src/terminal.py --diagnose --report printer-linter-result/fixes.yml ${{ env.GIT_DIFF_FILTERED }}
-
-            -   name: Save PR metadata
-                run: |
-                    echo ${{ github.event.number }} > printer-linter-result/pr-id.txt
-                    echo ${{ github.event.pull_request.head.repo.full_name }} > printer-linter-result/pr-head-repo.txt
-                    echo ${{ github.event.pull_request.head.ref }} > printer-linter-result/pr-head-ref.txt
-
-            -   uses: actions/upload-artifact@v2
-                with:
-                    name: printer-linter-result
-                    path: printer-linter-result/
-
-            -   name: Run clang-tidy-pr-comments action
-                uses: platisd/clang-tidy-pr-comments@fix_suggestions_for_multiline_comments
-                with:
-                    github_token: ${{ secrets.GITHUB_TOKEN }}
-                    clang_tidy_fixes: result.yml
-                    request_changes: true
+  printer-linter-diagnose:
+    name: Printer linter PR diagnose
+
+    runs-on: ubuntu-latest
+    steps:
+      - name: Checkout
+        uses: actions/checkout@v3
+        with:
+          fetch-depth: 2
+
+      - name: Setup Python and pip
+        uses: actions/setup-python@v4
+        with:
+          python-version: 3.11.x
+          cache: "pip"
+          cache-dependency-path: .github/workflows/requirements-printer-linter.txt
+
+      - uses: technote-space/get-diff-action@v6
+        with:
+          PATTERNS: |
+            resources/+(extruders|definitions)/*.def.json
+            resources/+(intent|quality|variants)/**/*.inst.cfg
+
+      - name: Install Python requirements for runner
+        if: env.GIT_DIFF && !env.MATCHED_FILES
+        run: pip install -r .github/workflows/requirements-printer-linter.txt
+
+      - name: Create results directory
+        run: mkdir printer-linter-result
+
+      - name: Diagnose file(s)
+        if: env.GIT_DIFF && !env.MATCHED_FILES
+        run: python printer-linter/src/terminal.py --diagnose --report printer-linter-result/fixes.yml ${{ env.GIT_DIFF_FILTERED }}
+
+      - name: Save PR metadata
+        run: |
+          echo ${{ github.event.number }} > printer-linter-result/pr-id.txt
+          echo ${{ github.event.pull_request.head.repo.full_name }} > printer-linter-result/pr-head-repo.txt
+          echo ${{ github.event.pull_request.head.ref }} > printer-linter-result/pr-head-ref.txt
+
+      - uses: actions/upload-artifact@v2
+        with:
+          name: printer-linter-result
+          path: printer-linter-result/
+
+      - name: Run clang-tidy-pr-comments action
+        uses: platisd/clang-tidy-pr-comments@master
+        with:
+          github_token: ${{ secrets.GITHUB_TOKEN }}
+          clang_tidy_fixes: result.yml
+          request_changes: true

+ 71 - 71
.github/workflows/printer-linter-pr-post.yml

@@ -1,81 +1,81 @@
 name: printer-linter-pr-post
 
 on:
-    workflow_run:
-        workflows: [ "printer-linter-pr-diagnose" ]
-        types: [ completed ]
+  workflow_run:
+    workflows: ["printer-linter-pr-diagnose"]
+    types: [completed]
 
 jobs:
-    clang-tidy-results:
-        # Trigger the job only if the previous (insecure) workflow completed successfully
-        if: ${{ github.event.workflow_run.event == 'pull_request' && github.event.workflow_run.conclusion == 'success' }}
-        runs-on: ubuntu-latest
-        steps:
-            -   name: Download analysis results
-                uses: actions/github-script@v3.1.0
-                with:
-                    script: |
-                        let artifacts = await github.actions.listWorkflowRunArtifacts({
-                            owner: context.repo.owner,
-                            repo: context.repo.repo,
-                            run_id: ${{github.event.workflow_run.id }},
-                        });
-                        let matchArtifact = artifacts.data.artifacts.filter((artifact) => {
-                            return artifact.name == "printer-linter-result"
-                        })[0];
-                        let download = await github.actions.downloadArtifact({
-                            owner: context.repo.owner,
-                            repo: context.repo.repo,
-                            artifact_id: matchArtifact.id,
-                            archive_format: "zip",
-                        });
-                        let fs = require("fs");
-                        fs.writeFileSync("${{github.workspace}}/printer-linter-result.zip", Buffer.from(download.data));
+  clang-tidy-results:
+    # Trigger the job only if the previous (insecure) workflow completed successfully
+    if: ${{ github.event.workflow_run.event == 'pull_request' && github.event.workflow_run.conclusion == 'success' }}
+    runs-on: ubuntu-latest
+    steps:
+      - name: Download analysis results
+        uses: actions/github-script@v3.1.0
+        with:
+          script: |
+            let artifacts = await github.actions.listWorkflowRunArtifacts({
+                owner: context.repo.owner,
+                repo: context.repo.repo,
+                run_id: ${{github.event.workflow_run.id }},
+            });
+            let matchArtifact = artifacts.data.artifacts.filter((artifact) => {
+                return artifact.name == "printer-linter-result"
+            })[0];
+            let download = await github.actions.downloadArtifact({
+                owner: context.repo.owner,
+                repo: context.repo.repo,
+                artifact_id: matchArtifact.id,
+                archive_format: "zip",
+            });
+            let fs = require("fs");
+            fs.writeFileSync("${{github.workspace}}/printer-linter-result.zip", Buffer.from(download.data));
 
-            -   name: Set environment variables
-                run: |
-                    mkdir printer-linter-result
-                    unzip printer-linter-result.zip -d printer-linter-result
-                    echo "pr_id=$(cat printer-linter-result/pr-id.txt)" >> $GITHUB_ENV
-                    echo "pr_head_repo=$(cat printer-linter-result/pr-head-repo.txt)" >> $GITHUB_ENV
-                    echo "pr_head_ref=$(cat printer-linter-result/pr-head-ref.txt)" >> $GITHUB_ENV
+      - name: Set environment variables
+        run: |
+          mkdir printer-linter-result
+          unzip printer-linter-result.zip -d printer-linter-result
+          echo "pr_id=$(cat printer-linter-result/pr-id.txt)" >> $GITHUB_ENV
+          echo "pr_head_repo=$(cat printer-linter-result/pr-head-repo.txt)" >> $GITHUB_ENV
+          echo "pr_head_ref=$(cat printer-linter-result/pr-head-ref.txt)" >> $GITHUB_ENV
 
-            -   uses: actions/checkout@v3
-                with:
-                    repository: ${{ env.pr_head_repo }}
-                    ref: ${{ env.pr_head_ref }}
-                    persist-credentials: false
+      - uses: actions/checkout@v3
+        with:
+          repository: ${{ env.pr_head_repo }}
+          ref: ${{ env.pr_head_ref }}
+          persist-credentials: false
 
-            -   name: Redownload analysis results
-                uses: actions/github-script@v3.1.0
-                with:
-                    script: |
-                        let artifacts = await github.actions.listWorkflowRunArtifacts({
-                            owner: context.repo.owner,
-                            repo: context.repo.repo,
-                            run_id: ${{github.event.workflow_run.id }},
-                        });
-                        let matchArtifact = artifacts.data.artifacts.filter((artifact) => {
-                            return artifact.name == "printer-linter-result"
-                        })[0];
-                        let download = await github.actions.downloadArtifact({
-                            owner: context.repo.owner,
-                            repo: context.repo.repo,
-                            artifact_id: matchArtifact.id,
-                            archive_format: "zip",
-                        });
-                        let fs = require("fs");
-                        fs.writeFileSync("${{github.workspace}}/printer-linter-result.zip", Buffer.from(download.data));
+      - name: Redownload analysis results
+        uses: actions/github-script@v3.1.0
+        with:
+          script: |
+            let artifacts = await github.actions.listWorkflowRunArtifacts({
+                owner: context.repo.owner,
+                repo: context.repo.repo,
+                run_id: ${{github.event.workflow_run.id }},
+            });
+            let matchArtifact = artifacts.data.artifacts.filter((artifact) => {
+                return artifact.name == "printer-linter-result"
+            })[0];
+            let download = await github.actions.downloadArtifact({
+                owner: context.repo.owner,
+                repo: context.repo.repo,
+                artifact_id: matchArtifact.id,
+                archive_format: "zip",
+            });
+            let fs = require("fs");
+            fs.writeFileSync("${{github.workspace}}/printer-linter-result.zip", Buffer.from(download.data));
 
-            -   name: Extract analysis results
-                run: |
-                    mkdir printer-linter-result
-                    unzip printer-linter-result.zip -d printer-linter-result
+      - name: Extract analysis results
+        run: |
+          mkdir printer-linter-result
+          unzip printer-linter-result.zip -d printer-linter-result
 
-            -   name: Run clang-tidy-pr-comments action
-                uses: platisd/clang-tidy-pr-comments@fix_suggestions_for_multiline_comments
-                with:
-                    github_token: ${{ secrets.GITHUB_TOKEN }}
-                    clang_tidy_fixes: printer-linter-result/fixes.yml
-                    pull_request_id: ${{ env.pr_id }}
-                    request_changes: true
+      - name: Run clang-tidy-pr-comments action
+        uses: platisd/clang-tidy-pr-comments@master
+        with:
+          github_token: ${{ secrets.GITHUB_TOKEN }}
+          clang_tidy_fixes: printer-linter-result/fixes.yml
+          pull_request_id: ${{ env.pr_id }}
+          request_changes: true

+ 19 - 1
cura/Settings/ExtruderManager.py

@@ -2,13 +2,15 @@
 # Cura is released under the terms of the LGPLv3 or higher.
 
 from PyQt6.QtCore import pyqtSignal, pyqtProperty, QObject, QVariant  # For communicating data and events to Qt.
+
+from UM.Application import Application
 from UM.FlameProfiler import pyqtSlot
 
 import cura.CuraApplication # To get the global container stack to find the current machine.
+from UM.Util import parseBool
 from cura.Settings.GlobalStack import GlobalStack
 from UM.Logger import Logger
 from UM.Scene.Iterator.DepthFirstIterator import DepthFirstIterator
-from UM.Scene.SceneNode import SceneNode
 from UM.Scene.Selection import Selection
 from UM.Scene.Iterator.BreadthFirstIterator import BreadthFirstIterator
 from UM.Settings.ContainerRegistry import ContainerRegistry  # Finding containers by ID.
@@ -45,6 +47,7 @@ class ExtruderManager(QObject):
         self._selected_object_extruders = []  # type: List[Union[str, "ExtruderStack"]]
 
         Selection.selectionChanged.connect(self.resetSelectedObjectExtruders)
+        Application.getInstance().globalContainerStackChanged.connect(self.emitGlobalStackExtrudersChanged)  # When the machine is swapped we must update the active machine extruders
 
     extrudersChanged = pyqtSignal(QVariant)
     """Signal to notify other components when the list of extruders for a machine definition changes."""
@@ -52,6 +55,21 @@ class ExtruderManager(QObject):
     activeExtruderChanged = pyqtSignal()
     """Notify when the user switches the currently active extruder."""
 
+    def emitGlobalStackExtrudersChanged(self):
+        # HACK
+        # The emit function can't be directly connected to another signal. This wrapper function is required.
+        # The extrudersChanged signal is emitted early when changing machines. This triggers it a second time
+        # after the extruder have changed properly. This is important for any QML using ExtruderManager.extruderIds
+        # This is a hack, but other behaviour relys on the updating in this order.
+        self.extrudersChanged.emit(self._application.getGlobalContainerStack().getId())
+
+    @pyqtProperty(int, notify = extrudersChanged)
+    def enabledExtruderCount(self) -> int:
+        global_container_stack = self._application.getGlobalContainerStack()
+        if global_container_stack:
+            return len([extruder for extruder in global_container_stack.extruderList if parseBool(extruder.getMetaDataEntry("enabled", "True"))])
+        return 0
+
     @pyqtProperty(str, notify = activeExtruderChanged)
     def activeExtruderStackId(self) -> Optional[str]:
         """Gets the unique identifier of the currently active extruder stack.

+ 0 - 13
cura/Settings/SimpleModeSettingsManager.py

@@ -42,21 +42,8 @@ class SimpleModeSettingsManager(QObject):
             for extruder_stack in global_stack.extruderList:
                 user_setting_keys.update(extruder_stack.userChanges.getAllKeys())
 
-        # remove settings that are visible in recommended (we don't show the reset button for those)
-        for skip_key in self.__ignored_custom_setting_keys:
-            if skip_key in user_setting_keys:
-                user_setting_keys.remove(skip_key)
-
         has_customized_user_settings = len(user_setting_keys) > 0
 
         if has_customized_user_settings != self._is_profile_customized:
             self._is_profile_customized = has_customized_user_settings
             self.isProfileCustomizedChanged.emit()
-
-    # These are the settings included in the Simple ("Recommended") Mode, so only when the other settings have been
-    # changed, we consider it as a user customized profile in the Simple ("Recommended") Mode.
-    __ignored_custom_setting_keys = ["support_enable",
-                                     "infill_sparse_density",
-                                     "gradual_infill_steps",
-                                     "adhesion_type",
-                                     "support_extruder_nr"]

+ 1 - 1
plugins/UM3NetworkPrinting/resources/qml/MonitorBuildplateConfiguration.qml

@@ -27,7 +27,7 @@ Item
     Row
     {
         height: parent.height
-        spacing: UM.Theme.getSize("print_setup_slider_handle").width // TODO: Theme! (Should be same as extruder spacing)
+        spacing: UM.Theme.getSize("slider_handle").width // TODO: Theme! (Should be same as extruder spacing)
 
         // This wrapper ensures that the buildplate icon is located centered
         // below an extruder icon.

+ 3 - 1
resources/definitions/creality_sermoonv1.def.json

@@ -27,6 +27,8 @@
         "machine_height": { "default_value": 165 },
         "machine_name": { "default_value": "Creality Sermoon V1" },
         "machine_start_gcode": { "default_value": "; -- START GCODE --\nG28 ;Home\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 Y170.0 Z0.28 F1500.0 E12 ;Draw the first line\nG1 X10.4 Y170.0 Z0.28 F5000.0 ;Move to side a little\nG1 X10.4 Y20 Z0.28 F1500.0 E25 ;Draw the second line\nG92 E0 ;Reset Extruder\nG1 Z2.0 F3000 ;Move Z Axis up" },
-        "machine_width": { "default_value": 175 }
+        "machine_width": { "default_value": 175 },
+        "retraction_amount": { "value": 0.8 },
+        "retraction_speed": { "default_value": 40 }
     }
 }

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

@@ -8161,6 +8161,7 @@
                         "small_feature_max_length":
                         {
                             "label": "Small Feature Max Length",
+                            "enabled": "small_hole_max_size > 0",
                             "description": "Feature outlines that are shorter than this length will be printed using Small Feature Speed.",
                             "unit": "mm",
                             "type": "float",
@@ -8174,6 +8175,7 @@
                 "small_feature_speed_factor":
                 {
                     "label": "Small Feature Speed",
+                    "enabled": "small_hole_max_size > 0",
                     "description": "Small features will be printed at this percentage of their normal print speed. Slower printing can help with adhesion and accuracy.",
                     "unit": "%",
                     "type": "float",
@@ -8186,6 +8188,7 @@
                 "small_feature_speed_factor_0":
                 {
                     "label": "Small Feature Initial Layer Speed",
+                    "enabled": "small_hole_max_size > 0",
                     "description": "Small features on the first layer will be printed at this percentage of their normal print speed. Slower printing can help with adhesion and accuracy.",
                     "unit": "%",
                     "type": "float",

+ 87 - 84
resources/definitions/ultimaker2.def.json

@@ -2,102 +2,105 @@
     "version": 2,
     "name": "Ultimaker 2",
     "inherits": "ultimaker",
-    "metadata": {
+    "metadata":
+    {
         "visible": true,
         "author": "Ultimaker",
         "manufacturer": "Ultimaker B.V.",
-        "weight": 3,
         "file_formats": "text/x-gcode",
         "platform": "ultimaker2_platform.obj",
-        "platform_texture": "Ultimaker2backplate.png",
-        "platform_offset": [9, 0, 0],
-        "has_materials": false,
+        "exclude_materials": [
+            "generic_hips",
+            "generic_petg",
+            "structur3d_dap100silicone",
+            "ultimaker_petg_red",
+            "ultimaker_petg_blue",
+            "ultimaker_petg_grey",
+            "ultimaker_petg_black",
+            "ultimaker_petg_green",
+            "ultimaker_petg_white",
+            "ultimaker_petg_orange",
+            "ultimaker_petg_silver",
+            "ultimaker_petg_yellow",
+            "ultimaker_petg_transparent",
+            "ultimaker_petg_red_translucent",
+            "ultimaker_petg_blue_translucent",
+            "ultimaker_petg_green_translucent",
+            "ultimaker_petg_yellow_fluorescent"
+        ],
+        "firmware_file": "MarlinUltimaker2.hex",
         "has_machine_quality": true,
+        "has_materials": false,
+        "machine_extruder_trains": { "0": "ultimaker2_extruder_0" },
+        "platform_offset": [
+            9,
+            0,
+            0
+        ],
+        "platform_texture": "Ultimaker2backplate.png",
         "preferred_variant_name": "0.4 mm",
-        "machine_extruder_trains":
-        {
-            "0": "ultimaker2_extruder_0"
-        },
-        "firmware_file": "MarlinUltimaker2.hex",
-        "exclude_materials": [ "generic_hips", "generic_petg", "structur3d_dap100silicone", "ultimaker_petg_red", "ultimaker_petg_blue", "ultimaker_petg_grey", "ultimaker_petg_black", "ultimaker_petg_green", "ultimaker_petg_white", "ultimaker_petg_orange", "ultimaker_petg_silver", "ultimaker_petg_yellow", "ultimaker_petg_transparent", "ultimaker_petg_red_translucent", "ultimaker_petg_blue_translucent", "ultimaker_petg_green_translucent", "ultimaker_petg_yellow_fluorescent"]
+        "weight": 3
     },
-    "overrides": {
-        "machine_name": { "default_value": "Ultimaker 2" },
-        "machine_start_gcode" : {
-            "value": "\"G0 F3000 Y50 ;avoid prime blob\"  if machine_gcode_flavor == \"UltiGCode\" else \"G21 ;metric values\\nG90 ;absolute positioning\\nM82 ;set extruder to absolute mode\\nM107 ;start with the fan off\\nG28 Z0 ;move Z to bottom endstops\\nG28 X0 Y0 ;move X/Y to endstops\\nG1 X15 Y0 F4000 ;move X/Y to front of printer\\nG1 Z15.0 F9000 ;move the platform to 15mm\\nG92 E0 ;zero the extruded length\\nG1 F200 E10 ;extrude 10 mm of feed stock\\nG92 E0 ;zero the extruded length again\\nG1 Y50 F9000\\n;Put printing message on LCD screen\\nM117 Printing...\""
-        },
-        "machine_end_gcode" : {
-            "value": "\";Version _2.6 of the firmware can abort the print too early if the file ends\\n;too soon. However if the file hasn't ended yet because there are comments at\\n;the end of the file, it won't abort yet. Therefore we have to put at least 512\\n;bytes at the end of the g-code so that the file is not yet finished by the\\n;time that the motion planner gets flushed. With firmware version _3.3 this\\n;should be fixed, so this comment wouldn't be necessary any more. Now we have\\n;to pad this text to make precisely 512 bytes.\"  if machine_gcode_flavor == \"UltiGCode\" else \"M104 S0 ;extruder heater off\\nM140 S0 ;heated bed heater off (if you have it)\\nG91 ;relative positioning\\nG1 E-1 F300  ;retract the filament a bit before lifting the nozzle, to release some of the pressure\\nG1 Z+0.5 E-5 X-20 Y-20 F9000 ;move Z up a bit and retract filament even more\\nG28 X0 Y0 ;move X/Y to min endstops, so the head is out of the way\\nM84 ;steppers off\\nG90 ;absolute positioning\\n;Version _2.6 of the firmware can abort the print too early if the file ends\\n;too soon. However if the file hasn't ended yet because there are comments at\\n;the end of the file, it won't abort yet. Therefore we have to put at least 512\\n;bytes at the end of the g-code so that the file is not yet finished by the\\n;time that the motion planner gets flushed. With firmware version _3.3 this\\n;should be fixed, so this comment wouldn't be necessary any more. Now we have\\n;to pad this text to make precisely 512 bytes.\""
-        },
-        "machine_width": {
-            "default_value": 223
-        },
-        "machine_depth": {
-            "default_value": 223
-        },
-        "machine_height": {
-            "default_value": 205
-        },
-        "machine_heated_bed": {
-            "default_value": true
-        },
-        "machine_head_with_fans_polygon":
+    "overrides":
+    {
+        "cool_fan_speed_0": { "value": 0 },
+        "gantry_height": { "value": "48" },
+        "layer_height_0": { "value": 0.3 },
+        "machine_acceleration": { "default_value": 3000 },
+        "machine_center_is_zero": { "default_value": false },
+        "machine_depth": { "default_value": 223 },
+        "machine_disallowed_areas":
         {
             "default_value": [
-                [ -42, 12 ],
-                [ -42, -32 ],
-                [ 62, 12 ],
-                [ 62, -32 ]
+                [
+                    [-115, 112.5],
+                    [-82, 112.5],
+                    [-84, 102.5],
+                    [-115, 102.5]
+                ],
+                [
+                    [115, 112.5],
+                    [115, 102.5],
+                    [110, 102.5],
+                    [108, 112.5]
+                ],
+                [
+                    [-115, -112.5],
+                    [-115, -104.5],
+                    [-84, -104.5],
+                    [-82, -112.5]
+                ],
+                [
+                    [115, -112.5],
+                    [108, -112.5],
+                    [110, -104.5],
+                    [115, -104.5]
+                ]
             ]
         },
-        "machine_center_is_zero": {
-            "default_value": false
-        },
-        "gantry_height": {
-            "value": "48"
-        },
-        "machine_use_extruder_offset_to_offset_coords": {
-            "default_value": true
-        },
-        "machine_gcode_flavor": {
-            "default_value": "UltiGCode"
-        },
-        "machine_disallowed_areas": {
+        "machine_end_gcode": { "value": "\";Version _2.6 of the firmware can abort the print too early if the file ends\\n;too soon. However if the file hasn't ended yet because there are comments at\\n;the end of the file, it won't abort yet. Therefore we have to put at least 512\\n;bytes at the end of the g-code so that the file is not yet finished by the\\n;time that the motion planner gets flushed. With firmware version _3.3 this\\n;should be fixed, so this comment wouldn't be necessary any more. Now we have\\n;to pad this text to make precisely 512 bytes.\"  if machine_gcode_flavor == \"UltiGCode\" else \"M104 S0 ;extruder heater off\\nM140 S0 ;heated bed heater off (if you have it)\\nG91 ;relative positioning\\nG1 E-1 F300  ;retract the filament a bit before lifting the nozzle, to release some of the pressure\\nG1 Z+0.5 E-5 X-20 Y-20 F9000 ;move Z up a bit and retract filament even more\\nG28 X0 Y0 ;move X/Y to min endstops, so the head is out of the way\\nM84 ;steppers off\\nG90 ;absolute positioning\\n;Version _2.6 of the firmware can abort the print too early if the file ends\\n;too soon. However if the file hasn't ended yet because there are comments at\\n;the end of the file, it won't abort yet. Therefore we have to put at least 512\\n;bytes at the end of the g-code so that the file is not yet finished by the\\n;time that the motion planner gets flushed. With firmware version _3.3 this\\n;should be fixed, so this comment wouldn't be necessary any more. Now we have\\n;to pad this text to make precisely 512 bytes.\"" },
+        "machine_gcode_flavor": { "default_value": "UltiGCode" },
+        "machine_head_with_fans_polygon":
+        {
             "default_value": [
-              [[-115,  112.5], [ -82,  112.5], [ -84,  102.5], [-115,  102.5]],
-              [[ 115,  112.5], [ 115,  102.5], [ 110,  102.5], [ 108,  112.5]],
-              [[-115, -112.5], [-115, -104.5], [ -84, -104.5], [ -82, -112.5]],
-              [[ 115, -112.5], [ 108, -112.5], [ 110, -104.5], [ 115, -104.5]]
-        ]},
-        "machine_nozzle_tip_outer_diameter": {
-            "default_value": 1
-        },
-        "machine_nozzle_head_distance": {
-            "default_value": 3
-        },
-        "machine_max_feedrate_x": {
-            "default_value": 300
-        },
-        "machine_max_feedrate_y": {
-            "default_value": 300
-        },
-        "machine_max_feedrate_z": {
-            "default_value": 40
-        },
-        "machine_acceleration": {
-            "default_value": 3000
-        },
-        "support_z_distance": {
-            "value": "0.1"
-        },
-        "cool_fan_speed_0": {
-            "value": 0
-        },
-        "layer_height_0": {
-            "value": 0.3
+                [-42, 12],
+                [-42, -32],
+                [62, 12],
+                [62, -32]
+            ]
         },
-        "speed_slowdown_layers": {
-            "value": 2
-        }
+        "machine_heated_bed": { "default_value": true },
+        "machine_height": { "default_value": 205 },
+        "machine_max_feedrate_x": { "default_value": 300 },
+        "machine_max_feedrate_y": { "default_value": 300 },
+        "machine_max_feedrate_z": { "default_value": 40 },
+        "machine_name": { "default_value": "Ultimaker 2" },
+        "machine_nozzle_head_distance": { "default_value": 3 },
+        "machine_nozzle_tip_outer_diameter": { "default_value": 1 },
+        "machine_start_gcode": { "value": "\"G0 F3000 Y50 ;avoid prime blob\"  if machine_gcode_flavor == \"UltiGCode\" else \"G21 ;metric values\\nG90 ;absolute positioning\\nM82 ;set extruder to absolute mode\\nM107 ;start with the fan off\\nG28 Z0 ;move Z to bottom endstops\\nG28 X0 Y0 ;move X/Y to endstops\\nG1 X15 Y0 F4000 ;move X/Y to front of printer\\nG1 Z15.0 F9000 ;move the platform to 15mm\\nG92 E0 ;zero the extruded length\\nG1 F200 E10 ;extrude 10 mm of feed stock\\nG92 E0 ;zero the extruded length again\\nG1 Y50 F9000\\n;Put printing message on LCD screen\\nM117 Printing...\"" },
+        "machine_use_extruder_offset_to_offset_coords": { "default_value": true },
+        "machine_width": { "default_value": 223 },
+        "speed_slowdown_layers": { "value": 2 },
+        "support_z_distance": { "value": "0.1" }
     }
-}
+}

+ 11 - 15
resources/definitions/ultimaker2_extended.def.json

@@ -2,25 +2,21 @@
     "version": 2,
     "name": "Ultimaker 2 Extended",
     "inherits": "ultimaker2",
-    "metadata": {
+    "metadata":
+    {
         "author": "Ultimaker",
         "manufacturer": "Ultimaker B.V.",
-        "quality_definition": "ultimaker2",
-        "weight": 3,
         "file_formats": "text/x-gcode",
         "platform": "ultimaker2_platform.obj",
+        "firmware_file": "MarlinUltimaker2extended.hex",
+        "machine_extruder_trains": { "0": "ultimaker2_extended_extruder_0" },
         "platform_texture": "Ultimaker2Extendedbackplate.png",
-        "machine_extruder_trains":
-        {
-            "0": "ultimaker2_extended_extruder_0"
-        },
-        "firmware_file": "MarlinUltimaker2extended.hex"
+        "quality_definition": "ultimaker2",
+        "weight": 3
     },
-
-    "overrides": {
-        "machine_name": { "default_value": "Ultimaker 2 Extended" },
-        "machine_height": {
-            "default_value": 305
-        }
+    "overrides":
+    {
+        "machine_height": { "default_value": 305 },
+        "machine_name": { "default_value": "Ultimaker 2 Extended" }
     }
-}
+}

+ 4 - 6
resources/definitions/ultimaker2_extended_olsson.def.json

@@ -2,11 +2,9 @@
     "version": 2,
     "name": "Ultimaker 2 Extended with Olsson",
     "inherits": "ultimaker2_extended",
-    "metadata": {
-        "has_variants": true
-    },
-
-    "overrides": {
+    "metadata": { "has_variants": true },
+    "overrides":
+    {
         "machine_name": { "default_value": "Ultimaker 2 Extended with Olsson" }
     }
-}
+}

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