Skip to content

Commit

Permalink
Merge branch '5.5'
Browse files Browse the repository at this point in the history
  • Loading branch information
jellespijker committed Sep 27, 2023
2 parents e25f1b0 + 96ccd50 commit 1e8a5d8
Show file tree
Hide file tree
Showing 675 changed files with 134 additions and 100 deletions.
1 change: 1 addition & 0 deletions .printer-linter
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ checks:
diagnostic-mesh-file-extension: true
diagnostic-mesh-file-size: true
diagnostic-definition-redundant-override: true
diagnostic-resources-macos-app-directory-name: true
fixes:
diagnostic-definition-redundant-override: true
format:
Expand Down
2 changes: 1 addition & 1 deletion printer-linter/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[project]
name = "printerlinter"
description = "Cura UltiMaker printer linting tool"
version = "0.1.0"
version = "0.1.1"
authors = [
{ name = "UltiMaker", email = "[email protected]" }
]
Expand Down
13 changes: 7 additions & 6 deletions printer-linter/src/printerlinter/factory.py
Original file line number Diff line number Diff line change
@@ -1,26 +1,27 @@
from pathlib import Path
from typing import Optional
from typing import Optional, List

from .linters.profile import Profile
from .linters.defintion import Definition
from .linters.linter import Linter
from .linters.meshes import Meshes
from .linters.directory import Directory


def getLinter(file: Path, settings: dict) -> Optional[Linter]:
def getLinter(file: Path, settings: dict) -> Optional[List[Linter]]:
""" Returns a Linter depending on the file format """
if not file.exists():
return None

if ".inst" in file.suffixes and ".cfg" in file.suffixes:
return Profile(file, settings)
return [Directory(file, settings), Profile(file, settings)]

if ".def" in file.suffixes and ".json" in file.suffixes:
if file.stem in ("fdmprinter.def", "fdmextruder.def"):
return None
return Definition(file, settings)
return [Directory(file, settings), Definition(file, settings)]

if file.parent.stem == "meshes":
return Meshes(file, settings)
return [Meshes(file, settings)]

return None
return [Directory(file, settings)]
31 changes: 31 additions & 0 deletions printer-linter/src/printerlinter/linters/directory.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
from pathlib import Path
from typing import Iterator

from ..diagnostic import Diagnostic
from .linter import Linter


class Directory(Linter):
def __init__(self, file: Path, settings: dict) -> None:
""" Finds issues in the parent directory"""
super().__init__(file, settings)

def check(self) -> Iterator[Diagnostic]:
if self._settings["checks"].get("diagnostic-resources-macos-app-directory-name", False):
for check in self.checkForDotInDirName():
yield check

yield

def checkForDotInDirName(self) -> Iterator[Diagnostic]:
""" Check if there is a dot in the directory name, MacOS has trouble signing and notarizing otherwise """
if any("." in p for p in self._file.parent.parts):
yield Diagnostic(
file = self._file,
diagnostic_name = "diagnostic-resources-macos-app-directory-name",
message = f"Directory name containing a `.` not allowed {self._file.suffix}, rename directory containing this file e.q: `_`",
level = "Error",
offset = 1
)
yield

10 changes: 7 additions & 3 deletions printer-linter/src/terminal.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,12 +71,16 @@ def main() -> None:

def diagnoseIssuesWithFile(file: Path, settings: dict) -> List[Diagnostic]:
""" For file, runs all diagnostic checks in settings and returns a list of diagnostics """
linter = factory.getLinter(file, settings)
linters = factory.getLinter(file, settings)

if not linter:
if not linters:
return []

return list(filter(lambda d: d is not None, linter.check()))
linter_results = []
for linter in linters:
linter_results.extend(list(filter(lambda d: d is not None, linter.check())))

return linter_results


def applyFixesToFile(file, settings, full_body_check) -> None:
Expand Down
10 changes: 9 additions & 1 deletion resources/definitions/fdmprinter.def.json
Original file line number Diff line number Diff line change
Expand Up @@ -2453,7 +2453,7 @@
"material_print_temperature_layer_0":
{
"label": "Printing Temperature Initial Layer",
"description": "The temperature used for printing the first layer. Set at 0 to disable special handling of the initial layer.",
"description": "The temperature used for printing the first layer.",
"unit": "\u00b0C",
"type": "float",
"default_value": 215,
Expand Down Expand Up @@ -8125,6 +8125,14 @@
"resolve": "max(extruderValues('raft_base_wall_count'))",
"settable_per_mesh": false,
"settable_per_extruder": false
},
"group_outer_walls":
{
"label": "Group Outer Walls",
"description": "Outer walls of different islands in the same layer are printed in sequence. When enabled the amount of flow changes is limited because walls are printed one type at a time, when disabled the number of travels between islands is reduced because walls in the same islands are grouped.",
"type": "bool",
"default_value": true,
"settable_per_mesh": true
}
}
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,6 @@ jerk_wall_0 = 30
speed_print = 150
speed_wall = =speed_print
speed_wall_0 = 40
top_bottom_thickness = = 4 * layer_height
top_bottom_thickness = =4 * layer_height
wall_thickness = =2 * line_width

Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,6 @@ jerk_wall_0 = 30
speed_print = 150
speed_wall = =speed_print
speed_wall_0 = 40
top_bottom_thickness = = 4 * layer_height
top_bottom_thickness = =4 * layer_height
wall_thickness = =2 * line_width

Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,6 @@ jerk_wall_0 = 30
speed_print = 150
speed_wall = =speed_print
speed_wall_0 = 40
top_bottom_thickness = = 4 * layer_height
top_bottom_thickness = =4 * layer_height
wall_thickness = =2 * line_width

Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ version = 4

[metadata]
intent_category = quick
is_experimental = True
material = ultimaker_pla
quality_type = verydraft
setting_version = 22
Expand All @@ -23,6 +22,6 @@ jerk_wall_0 = 30
speed_print = 150
speed_wall = =speed_print
speed_wall_0 = 40
top_bottom_thickness = = 4 * layer_height
top_bottom_thickness = =4 * layer_height
wall_thickness = =2 * line_width

Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,6 @@ jerk_wall_0 = 30
speed_print = 150
speed_wall = =speed_print
speed_wall_0 = 40
top_bottom_thickness = = 4 * layer_height
top_bottom_thickness = =4 * layer_height
wall_thickness = =2 * line_width

Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ version = 4

[metadata]
intent_category = quick
is_experimental = True
material = ultimaker_tough_pla
quality_type = verydraft
setting_version = 22
Expand All @@ -23,6 +22,6 @@ jerk_wall_0 = 30
speed_print = 150
speed_wall = =speed_print
speed_wall_0 = 40
top_bottom_thickness = = 4 * layer_height
top_bottom_thickness = =4 * layer_height
wall_thickness = =2 * line_width

Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@ jerk_print = 30
jerk_wall_0 = 30
speed_wall = =speed_print
speed_wall_0 = 40
top_bottom_thickness = = 4 * layer_height
top_bottom_thickness = =4 * layer_height
wall_thickness = =wall_line_width_0

Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@ jerk_print = 30
jerk_wall_0 = 30
speed_wall = =speed_print
speed_wall_0 = 40
top_bottom_thickness = = 4 * layer_height
top_bottom_thickness = =4 * layer_height
wall_thickness = =wall_line_width_0

Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@ jerk_print = 30
jerk_wall_0 = 30
speed_wall = =speed_print
speed_wall_0 = 40
top_bottom_thickness = = 4 * layer_height
top_bottom_thickness = =4 * layer_height
wall_thickness = =wall_line_width_0

Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@ jerk_print = 30
jerk_wall_0 = 30
speed_wall = =speed_print
speed_wall_0 = 40
top_bottom_thickness = = 4 * layer_height
top_bottom_thickness = =4 * layer_height
wall_thickness = =wall_line_width_0

Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,6 @@ jerk_wall_0 = 30
speed_print = 150
speed_wall = =speed_print
speed_wall_0 = 40
top_bottom_thickness = = 4 * layer_height
top_bottom_thickness = =4 * layer_height
wall_thickness = =2 * line_width

Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,6 @@ jerk_wall_0 = 30
speed_print = 150
speed_wall = =speed_print
speed_wall_0 = 40
top_bottom_thickness = = 4 * layer_height
top_bottom_thickness = =4 * layer_height
wall_thickness = =2 * line_width

Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,6 @@ jerk_wall_0 = 30
speed_print = 150
speed_wall = =speed_print
speed_wall_0 = 40
top_bottom_thickness = = 4 * layer_height
top_bottom_thickness = =4 * layer_height
wall_thickness = =2 * line_width

Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ version = 4

[metadata]
intent_category = quick
is_experimental = True
material = ultimaker_pla
quality_type = verydraft
setting_version = 22
Expand All @@ -23,6 +22,6 @@ jerk_wall_0 = 30
speed_print = 150
speed_wall = =speed_print
speed_wall_0 = 40
top_bottom_thickness = = 4 * layer_height
top_bottom_thickness = =4 * layer_height
wall_thickness = =2 * line_width

Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,6 @@ jerk_wall_0 = 30
speed_print = 150
speed_wall = =speed_print
speed_wall_0 = 40
top_bottom_thickness = = 4 * layer_height
top_bottom_thickness = =4 * layer_height
wall_thickness = =2 * line_width

Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ version = 4

[metadata]
intent_category = quick
is_experimental = True
material = ultimaker_tough_pla
quality_type = verydraft
setting_version = 22
Expand All @@ -23,6 +22,6 @@ jerk_wall_0 = 30
speed_print = 150
speed_wall = =speed_print
speed_wall_0 = 40
top_bottom_thickness = = 4 * layer_height
top_bottom_thickness = =4 * layer_height
wall_thickness = =2 * line_width

Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@ jerk_print = 30
jerk_wall_0 = 30
speed_wall = =speed_print
speed_wall_0 = 40
top_bottom_thickness = = 4 * layer_height
top_bottom_thickness = =4 * layer_height
wall_thickness = =wall_line_width_0

Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@ jerk_print = 30
jerk_wall_0 = 30
speed_wall = =speed_print
speed_wall_0 = 40
top_bottom_thickness = = 4 * layer_height
top_bottom_thickness = =4 * layer_height
wall_thickness = =wall_line_width_0

Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@ jerk_print = 30
jerk_wall_0 = 30
speed_wall = =speed_print
speed_wall_0 = 40
top_bottom_thickness = = 4 * layer_height
top_bottom_thickness = =4 * layer_height
wall_thickness = =wall_line_width_0

Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@ jerk_print = 30
jerk_wall_0 = 30
speed_wall = =speed_print
speed_wall_0 = 40
top_bottom_thickness = = 4 * layer_height
top_bottom_thickness = =4 * layer_height
wall_thickness = =wall_line_width_0

Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ Flickable
padding: UM.Theme.getSize("default_margin").width
spacing: UM.Theme.getSize("default_margin").height

width: recommendedPrintSetup.width - 2 * padding - (scroll.visible ? scroll.width : 0)
width: recommendedPrintSetup.width - 2 * padding - UM.Theme.getSize("thin_margin").width

// TODO
property real firstColumnWidth: Math.round(width / 3)
Expand Down
Loading

0 comments on commit 1e8a5d8

Please sign in to comment.