Skip to content

Commit

Permalink
Merge branch '5.6'
Browse files Browse the repository at this point in the history
# Conflicts:
#	conanfile.py
  • Loading branch information
casperlamboo committed Nov 24, 2023
2 parents a7d4ba0 + 670f86d commit 4ce0928
Show file tree
Hide file tree
Showing 40 changed files with 13,347 additions and 12,946 deletions.
14 changes: 10 additions & 4 deletions conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -396,10 +396,16 @@ def generate(self):

if self.options.devtools:
entitlements_file = "'{}'".format(os.path.join(self.source_folder, "packaging", "MacOS", "cura.entitlements"))
self._generate_pyinstaller_spec(location = self.generators_folder,
entrypoint_location = "'{}'".format(os.path.join(self.source_folder, self.conan_data["pyinstaller"]["runinfo"]["entrypoint"])).replace("\\", "\\\\"),
icon_path = "'{}'".format(os.path.join(self.source_folder, "packaging", self.conan_data["pyinstaller"]["icon"][str(self.settings.os)])).replace("\\", "\\\\"),
entitlements_file = entitlements_file if self.settings.os == "Macos" else "None")
self._generate_pyinstaller_spec(
location=self.generators_folder,
entrypoint_location="'{}'".format(
os.path.join(self.source_folder, self.conan_data["pyinstaller"]["runinfo"]["entrypoint"])).replace(
"\\", "\\\\"),
icon_path="'{}'".format(os.path.join(self.source_folder, "packaging",
self.conan_data["pyinstaller"]["icon"][
str(self.settings.os)])).replace("\\", "\\\\"),
entitlements_file=entitlements_file if self.settings.os == "Macos" else "None"
)

if self.options.get_safe("enable_i18n", False):
# Update the po and pot files
Expand Down
19 changes: 18 additions & 1 deletion plugins/CuraEngineBackend/StartSliceJob.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from string import Formatter
from enum import IntEnum
import time
from typing import Any, cast, Dict, List, Optional, Set
from typing import Any, cast, Dict, List, Optional, Set, Tuple
import re
import pyArcus as Arcus # For typing.
from PyQt6.QtCore import QCoreApplication
Expand Down Expand Up @@ -68,7 +68,23 @@ def __init__(self, default_extruder_nr: int = -1, *,
self._default_extruder_nr: int = default_extruder_nr
self._additional_per_extruder_settings: Optional[Dict[str, Dict[str, any]]] = additional_per_extruder_settings

def get_field(self, field_name, args: [str], kwargs: dict) -> Tuple[str, str]:
# get_field method parses all fields in the format-string and parses them individually to the get_value method.
# e.g. for a string "Hello {foo.bar}" would the complete field "foo.bar" would be passed to get_field, and then
# the individual parts "foo" and "bar" would be passed to get_value. This poses a problem for us, because want
# to parse the entire field as a single expression. To solve this, we override the get_field method and return
# the entire field as the expression.
return self.get_value(field_name, args, kwargs), field_name

def get_value(self, expression: str, args: [str], kwargs: dict) -> str:

# The following variables are not settings, but only become available after slicing.
# when these variables are encountered, we return them as-is. They are replaced later
# when the actual values are known.
post_slice_data_variables = ["filament_cost", "print_time", "filament_amount", "filament_weight", "jobname"]
if expression in post_slice_data_variables:
return f"{{{expression}}}"

extruder_nr = self._default_extruder_nr

# The settings may specify a specific extruder to use. This is done by
Expand Down Expand Up @@ -102,6 +118,7 @@ def get_value(self, expression: str, args: [str], kwargs: dict) -> str:
setting_function = SettingFunction(expression)
value = setting_function(container_stack, additional_variables=additional_variables)


return value


Expand Down
6 changes: 3 additions & 3 deletions resources/definitions/fdmprinter.def.json
Original file line number Diff line number Diff line change
Expand Up @@ -2602,7 +2602,7 @@
"maximum_value_warning": "120",
"settable_per_mesh": false,
"settable_per_extruder": false,
"resolve": "sum(extruderValues(\"material_shrinkage_percentage\")) / len(extruderValues(\"material_shrinkage_percentage\"))",
"resolve": "max(extruderValues(\"material_shrinkage_percentage\")) if any(extruderValues('material_is_support_material')) else sum(extruderValues(\"material_shrinkage_percentage\")) / len(extruderValues(\"material_shrinkage_percentage\"))",
"children":
{
"material_shrinkage_percentage_xy":
Expand All @@ -2618,7 +2618,7 @@
"maximum_value_warning": "120",
"settable_per_mesh": false,
"settable_per_extruder": false,
"resolve": "sum(extruderValues(\"material_shrinkage_percentage_xy\")) / len(extruderValues(\"material_shrinkage_percentage_xy\"))",
"resolve": "max(extruderValues(\"material_shrinkage_percentage\")) if any(extruderValues('material_is_support_material')) else sum(extruderValues(\"material_shrinkage_percentage_xy\")) / len(extruderValues(\"material_shrinkage_percentage_xy\"))",
"value": "material_shrinkage_percentage"
},
"material_shrinkage_percentage_z":
Expand All @@ -2634,7 +2634,7 @@
"maximum_value_warning": "120",
"settable_per_mesh": false,
"settable_per_extruder": false,
"resolve": "sum(extruderValues(\"material_shrinkage_percentage_z\")) / len(extruderValues(\"material_shrinkage_percentage_z\"))",
"resolve": "max(extruderValues(\"material_shrinkage_percentage_z\")) if any(extruderValues('material_is_support_material')) else sum(extruderValues(\"material_shrinkage_percentage_z\")) / len(extruderValues(\"material_shrinkage_percentage_z\"))",
"value": "material_shrinkage_percentage"
}
}
Expand Down
1 change: 0 additions & 1 deletion resources/definitions/ultimaker_method_base.def.json
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,6 @@
"material_initial_print_temperature": { "value": "material_print_temperature-10" },
"material_print_temperature": { "value": "default_material_print_temperature" },
"material_shrinkage_percentage": { "enabled": true },
"material_shrinkage_percentage_z": { "resolve": "0.9852*sum(extruderValues(\"material_shrinkage_percentage_z\")) / len(extruderValues(\"material_shrinkage_percentage_z\"))" },
"min_wall_line_width": { "value": 0.4 },
"minimum_support_area": { "value": 0.1 },
"multiple_mesh_overlap": { "value": 0 },
Expand Down
1 change: 0 additions & 1 deletion resources/definitions/ultimaker_methodxl.def.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@
"machine_height": { "default_value": 320 },
"machine_name": { "default_value": "UltiMaker Method XL" },
"machine_width": { "default_value": 410 },
"material_shrinkage_percentage_z": { "resolve": "sum(extruderValues(\"material_shrinkage_percentage_z\")) / len(extruderValues(\"material_shrinkage_percentage_z\"))" },
"prime_tower_position_x": { "value": "(305 - (resolveOrValue('prime_tower_base_size') if (resolveOrValue('adhesion_type') == 'raft' or resolveOrValue('prime_tower_brim_enable')) else 0) - max(max(extruderValues('travel_avoid_distance')) + max(extruderValues('support_offset')) + (extruderValue(skirt_brim_extruder_nr, 'skirt_brim_line_width') * extruderValue(skirt_brim_extruder_nr, 'skirt_line_count') * extruderValue(skirt_brim_extruder_nr, 'initial_layer_line_width_factor') / 100 + extruderValue(skirt_brim_extruder_nr, 'skirt_gap') if resolveOrValue('adhesion_type') == 'skirt' else 0) + (resolveOrValue('draft_shield_dist') if resolveOrValue('draft_shield_enabled') else 0), max(map(abs, extruderValues('machine_nozzle_offset_x'))), 1)) - (305 / 2)" },
"prime_tower_position_y": { "value": "305 - prime_tower_size - (resolveOrValue('prime_tower_base_size') if (resolveOrValue('adhesion_type') == 'raft' or resolveOrValue('prime_tower_brim_enable')) else 0) - max(max(extruderValues('travel_avoid_distance')) + max(extruderValues('support_offset')) + (extruderValue(skirt_brim_extruder_nr, 'skirt_brim_line_width') * extruderValue(skirt_brim_extruder_nr, 'skirt_line_count') * extruderValue(skirt_brim_extruder_nr, 'initial_layer_line_width_factor') / 100 + extruderValue(skirt_brim_extruder_nr, 'skirt_gap') if resolveOrValue('adhesion_type') == 'skirt' else 0) + (resolveOrValue('draft_shield_dist') if resolveOrValue('draft_shield_enabled') else 0), max(map(abs, extruderValues('machine_nozzle_offset_y'))), 1) - (305 / 2)" },
"speed_travel": { "value": 500 }
Expand Down
24 changes: 12 additions & 12 deletions resources/i18n/cs_CZ/fdmprinter.def.json.po
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Cura 5.1\n"
"Report-Msgid-Bugs-To: [email protected]\n"
"POT-Creation-Date: 2023-10-31 19:13+0000\n"
"POT-Creation-Date: 2023-11-15 12:26+0000\n"
"PO-Revision-Date: 2023-02-16 20:35+0100\n"
"Last-Translator: Miroslav Šustek <[email protected]>\n"
"Language-Team: DenyCZ <www.github.com/DenyCZ>\n"
Expand Down Expand Up @@ -461,6 +461,10 @@ msgctxt "build_volume_temperature label"
msgid "Build Volume Temperature"
msgstr "Teplota sestavení"

msgctxt "prime_tower_brim_enable description"
msgid "By enabling this setting, your prime-tower will get a brim, even if the model doesn't. If you want a sturdier base for a high tower, you can increase the base height."
msgstr ""

msgctxt "center_object label"
msgid "Center Object"
msgstr "Centrovat objekt"
Expand Down Expand Up @@ -2519,10 +2523,6 @@ msgctxt "prime_tower_brim_enable label"
msgid "Prime Tower Base"
msgstr ""

msgctxt "prime_tower_base_curve_magnitude label"
msgid "Prime Tower Base Curve Magnitude"
msgstr ""

msgctxt "prime_tower_base_height label"
msgid "Prime Tower Base Height"
msgstr ""
Expand All @@ -2531,6 +2531,10 @@ msgctxt "prime_tower_base_size label"
msgid "Prime Tower Base Size"
msgstr ""

msgctxt "prime_tower_base_curve_magnitude label"
msgid "Prime Tower Base Slope"
msgstr ""

msgctxt "prime_tower_flow label"
msgid "Prime Tower Flow"
msgstr "Průtok u hlavní věžě"
Expand Down Expand Up @@ -2567,10 +2571,6 @@ msgctxt "prime_tower_position_y label"
msgid "Prime Tower Y Position"
msgstr "Pozice Y hlavní věže"

msgctxt "prime_tower_brim_enable description"
msgid "Prime-towers might need the extra adhesion afforded by a brim or raft, even if the model doesn't."
msgstr ""

msgctxt "acceleration_print label"
msgid "Print Acceleration"
msgstr "Akcelerace tisku"
Expand Down Expand Up @@ -3988,7 +3988,7 @@ msgid "The height of the initial layer in mm. A thicker initial layer makes adhe
msgstr "Výška počáteční vrstvy v mm. Silnější počáteční vrstva usnadňuje přilnavost k montážní desce."

msgctxt "prime_tower_base_height description"
msgid "The height of the prime tower base."
msgid "The height of the prime tower base. Increasing this value will result in a more sturdy prime tower because the base will be wider. If this setting is too low, the prime tower will not have a sturdy base."
msgstr ""

msgctxt "support_bottom_stair_step_height description"
Expand Down Expand Up @@ -4064,7 +4064,7 @@ msgid "The length of material retracted during a retraction move."
msgstr "Délka materiálu zasunutého během pohybu zasunutí."

msgctxt "prime_tower_base_curve_magnitude description"
msgid "The magnitude factor used for the curve of the prime tower foot."
msgid "The magnitude factor used for the slope of the prime tower base. If you increase this value, the base will become slimmer. If you decrease it, the base will become thicker."
msgstr ""

msgctxt "machine_buildplate_type description"
Expand Down Expand Up @@ -4700,7 +4700,7 @@ msgid "The width of the interlocking structure beams."
msgstr "Šířka paprsků vzájemného propletení."

msgctxt "prime_tower_base_size description"
msgid "The width of the prime tower base."
msgid "The width of the prime tower brim/base. A larger base enhances adhesion to the build plate, but also reduces the effective print area."
msgstr ""

msgctxt "prime_tower_size description"
Expand Down
18 changes: 9 additions & 9 deletions resources/i18n/de_DE/cura.po
Original file line number Diff line number Diff line change
Expand Up @@ -559,7 +559,7 @@ msgstr "Alle Modelle in einem Raster anordnen"

msgctxt "@action:inmenu menubar:edit"
msgid "Arrange Selection"
msgstr ""
msgstr "Auswahl anordnen"

msgctxt "@label:button"
msgid "Ask a question"
Expand Down Expand Up @@ -1015,7 +1015,7 @@ msgstr "Die Antwort vom Server konnte nicht interpretiert werden."

msgctxt "@error:load"
msgid "Could not load GCodeWriter plugin. Try to re-enable the plugin."
msgstr ""
msgstr "Konnte GCodeWriter-Plugin nicht laden. Versuchen Sie, das Plugin wieder zu aktivieren."

msgctxt "@info:error"
msgid "Could not reach Marketplace."
Expand Down Expand Up @@ -2356,19 +2356,19 @@ msgstr "Stellen Sie sicher, dass der G-Code für Ihren Drucker und Ihre Druckerk

msgctxt "@item:inlistbox"
msgid "Makerbot Printfile"
msgstr ""
msgstr "Makerbot-Druckdatei"

msgctxt "name"
msgid "Makerbot Printfile Writer"
msgstr ""
msgstr "Makerbot-Druckdatei-Writer"

msgctxt "@error"
msgid "MakerbotWriter could not save to the designated path."
msgstr ""
msgstr "MakerbotWriter konnte nicht im angegebenen Pfad speichern."

msgctxt "@error:not supported"
msgid "MakerbotWriter does not support text mode."
msgstr ""
msgstr "MakerbotWriter unterstützt keinen Textmodus."

msgctxt "@action:inmenu"
msgid "Manage Materials..."
Expand Down Expand Up @@ -3019,7 +3019,7 @@ msgstr "Geben Sie bitte einen Namen für dieses Profil an."

msgctxt "@info"
msgid "Please provide a new name."
msgstr ""
msgstr "Bitte geben Sie einen neuen Namen an."

msgctxt "@text"
msgid "Please read and agree with the plugin licence."
Expand Down Expand Up @@ -3456,7 +3456,7 @@ msgstr "Bietet Unterstützung für das Schreiben von 3MF-Dateien."

msgctxt "description"
msgid "Provides support for writing MakerBot Format Packages."
msgstr ""
msgstr "Bietet Unterstützung für das Schreiben von MakerBot-Formatpaketen."

msgctxt "description"
msgid "Provides support for writing Ultimaker Format Packages."
Expand Down Expand Up @@ -3593,7 +3593,7 @@ msgstr "Umbenennen"

msgctxt "@title:window"
msgid "Rename"
msgstr ""
msgstr "Umbenennen"

msgctxt "@title:window"
msgid "Rename Profile"
Expand Down
Loading

0 comments on commit 4ce0928

Please sign in to comment.