Skip to content

Commit

Permalink
Merge branch 'main' into voron-volumetric-speed
Browse files Browse the repository at this point in the history
  • Loading branch information
NerdyGriffin authored Feb 18, 2025
2 parents aa3dc59 + ac0fd92 commit 5ce0dc9
Show file tree
Hide file tree
Showing 239 changed files with 5,994 additions and 271 deletions.
2 changes: 1 addition & 1 deletion UltiMaker-Cura.spec.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ app = BUNDLE(
coll,
name='{{ display_name }}.app',
icon={{ icon }},
bundle_identifier={{ osx_bundle_identifier }} + "_" + '{{ display_name }}'.replace(" ", "_") + "_" {{ short_version }},
bundle_identifier={{ osx_bundle_identifier }} + "_" + '{{ display_name }}'.replace(" ", "_"),
version={{ version }},
info_plist={
'CFBundleDisplayName': '{{ display_name }}',
Expand Down
6 changes: 3 additions & 3 deletions conandata.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ requirements:
- "curaengine/5.10.0-alpha.0@ultimaker/testing"
- "cura_binary_data/5.10.0-alpha.0@ultimaker/testing"
- "fdm_materials/5.10.0-alpha.0@ultimaker/testing"
- "dulcificum/0.2.1@ultimaker/stable"
- "pysavitar/5.4.0-alpha.0@ultimaker/stable"
- "pynest2d/5.4.0-alpha.0@ultimaker/stable"
- "dulcificum/5.10.0@ultimaker/stable"
- "pysavitar/5.10.0@ultimaker/stable"
- "pynest2d/5.10.0@ultimaker/stable"
requirements_internal:
- "fdm_materials/5.10.0-alpha.0@internal/testing"
- "cura_private_data/5.10.0-alpha.0@internal/testing"
Expand Down
1 change: 0 additions & 1 deletion conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ class CuraConan(ConanFile):
generators = "VirtualPythonEnv"
tool_requires = "gettext/0.22.5"

# FIXME: Remove specific branch once merged to main
python_requires = "translationextractor/[>=2.2.0]@ultimaker/stable"

options = {
Expand Down
9 changes: 7 additions & 2 deletions cura/PrinterOutput/FormatMaps.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ class FormatMaps:
"fire_e": "ultimaker_method",
"lava_f": "ultimaker_methodx",
"magma_10": "ultimaker_methodxl",
"sketch": "ultimaker_sketch"
"sketch": "ultimaker_sketch",
"sketch_large": "ultimaker_sketch_large",
"sketch_sprint": "ultimaker_sketch_sprint"
}

# A map from the extruder-name in their native file-formats to the internal name we use.
Expand All @@ -23,7 +25,10 @@ class FormatMaps:
"mk14_c": "1C",
"mk14": "1A",
"mk14_s": "2A",
"mk14_e": "LABS"
"mk14_e": "LABS",
"sketch_extruder": "0.4mm",
"sketch_l_extruder": "0.4mm",
"sketch_sprint_extruder": "0.4mm",
}

# A map from the material-name in their native file-formats to some info, including the internal name we use.
Expand Down
14 changes: 13 additions & 1 deletion cura/PrinterOutput/Models/PrinterConfigurationModel.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
# Copyright (c) 2018 Ultimaker B.V.
# Copyright (c) 2025 UltiMaker
# Cura is released under the terms of the LGPLv3 or higher.

from PyQt6.QtCore import pyqtProperty, QObject, pyqtSignal
from typing import List

from UM.Settings.ContainerRegistry import ContainerRegistry
from UM.Settings.DefinitionContainer import DefinitionContainer

MYPY = False
if MYPY:
from cura.PrinterOutput.Models.ExtruderConfigurationModel import ExtruderConfigurationModel
Expand Down Expand Up @@ -68,6 +71,15 @@ def hasAnyMaterialLoaded(self) -> bool:
return True
return False

@pyqtProperty("QStringList", constant=True)
def validCoresForPrinterType(self) -> List[str]:
printers = ContainerRegistry.getInstance().findContainersMetadata(
ignore_case=True, type="machine", name=self._printer_type, container_type=DefinitionContainer)
id = printers[0]["id"] if len(printers) > 0 and "id" in printers[0] else ""
definitions = ContainerRegistry.getInstance().findContainersMetadata(
ignore_case=True, type="variant", definition=id+"*")
return [x["name"] for x in definitions]

def __str__(self):
message_chunks = []
message_chunks.append("Printer type: " + self._printer_type)
Expand Down
1 change: 1 addition & 0 deletions cura/Settings/ExtruderManager.py
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,7 @@ def getUsedExtruderStacks(self) -> List["ExtruderStack"]:
limit_to_extruder_feature_list = ["wall_0_extruder_nr",
"wall_x_extruder_nr",
"roofing_extruder_nr",
"flooring_extruder_nr",
"top_bottom_extruder_nr",
"infill_extruder_nr",
]
Expand Down
2 changes: 1 addition & 1 deletion cura/Settings/MachineManager.py
Original file line number Diff line number Diff line change
Expand Up @@ -1678,7 +1678,7 @@ def activeQualityDisplayNameMap(self) -> ActiveQuality:
intent_category = self.activeIntentCategory,
intent_name = IntentCategoryModel.translation(self.activeIntentCategory, "name", self.activeIntentCategory.title()),
custom_profile = self.activeQualityOrQualityChangesName if global_stack.qualityChanges is not empty_quality_changes_container else None,
layer_height = self.activeQualityLayerHeight if self.isActiveQualitySupported else None,
layer_height = float("{:.2f}".format(self.activeQualityLayerHeight)) if self.isActiveQualitySupported else None,
is_experimental = self.isActiveQualityExperimental and self.isActiveQualitySupported
)

Expand Down
4 changes: 2 additions & 2 deletions packaging/AppImage/cura.desktop.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ GenericName=3D Printing Software
GenericName[de]=3D-Druck-Software
GenericName[nl]=3D-Print Software
Comment=Cura converts 3D models into paths for a 3D printer. It prepares your print for maximum accuracy, minimum printing time and good reliability with many extra features that make your print come out great.
Exec=UltiMaker-Cura %F
Exec=UltiMaker-Cura %U
Icon=cura-icon
Terminal=false
Type=Application
MimeType=model/stl;application/vnd.ms-3mfdocument;application/prs.wavefront-obj;image/bmp;image/gif;image/jpeg;image/png;text/x-gcode;application/x-amf;application/x-ply;application/x-ctm;model/vnd.collada+xml;model/gltf-binary;model/gltf+json;model/vnd.collada+xml+zip;
MimeType=model/stl;application/vnd.ms-3mfdocument;model/3mf;application/prs.wavefront-obj;image/bmp;image/gif;image/jpeg;image/png;text/x-gcode;application/x-amf;application/x-ply;application/x-ctm;model/vnd.collada+xml;model/gltf-binary;model/gltf+json;model/vnd.collada+xml+zip;x-scheme-handler/cura;
Categories=Graphics;
Keywords=3D;Printing;
X-AppImage-Version={{ cura_version }}
4 changes: 2 additions & 2 deletions plugins/MachineSettingsAction/MachineSettingsPrinterTab.qml
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ Item

settingStoreIndex: propertyStoreIndex

labelText: catalog.i18nc("@label", "Y min")
labelText: catalog.i18nc("@label", "Y min ( '-' towards back)")
labelFont: base.labelFont
labelWidth: base.labelWidth
controlWidth: base.controlWidth
Expand Down Expand Up @@ -254,7 +254,7 @@ Item
settingKey: "machine_head_with_fans_polygon"
settingStoreIndex: propertyStoreIndex

labelText: catalog.i18nc("@label", "Y max")
labelText: catalog.i18nc("@label", "Y max ( '+' towards front)")
labelFont: base.labelFont
labelWidth: base.labelWidth
controlWidth: base.controlWidth
Expand Down
87 changes: 86 additions & 1 deletion plugins/MakerbotWriter/MakerbotWriter.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,13 @@ def __init__(self) -> None:
suffixes=["makerbot"]
)
)
MimeTypeDatabase.addMimeType(
MimeType(
name="application/x-makerbot-replicator_plus",
comment="Makerbot Toolpath Package",
suffixes=["makerbot"]
)
)

_PNG_FORMAT = [
{"prefix": "isometric_thumbnail", "width": 120, "height": 120},
Expand Down Expand Up @@ -114,6 +121,8 @@ def write(self, stream: BufferedIOBase, nodes: List[SceneNode], mode=MeshWriter.
filename, filedata = "print.gcode", gcode_text_io.getvalue()
case "application/x-makerbot":
filename, filedata = "print.jsontoolpath", du.gcode_2_miracle_jtp(gcode_text_io.getvalue())
case "application/x-makerbot-replicator_plus":
filename, filedata = "print.jsontoolpath", du.gcode_2_miracle_jtp(gcode_text_io.getvalue(), nb_extruders=1)
case _:
raise Exception("Unsupported Mime type")

Expand Down Expand Up @@ -249,11 +258,87 @@ def _getMeta(self, root_nodes: List[SceneNode]) -> Tuple[Dict[str, any], str]:

meta["preferences"] = dict()
bounds = application.getBuildVolume().getBoundingBox()
intent = CuraApplication.getInstance().getIntentManager().currentIntentCategory
meta["preferences"]["instance0"] = {
"machineBounds": [bounds.right, bounds.front, bounds.left, bounds.back] if bounds is not None else None,
"printMode": CuraApplication.getInstance().getIntentManager().currentIntentCategory,
"printMode": intent
}

if file_format == "application/x-makerbot":
accel_overrides = meta["accel_overrides"] = {}
if intent in ['highspeed', 'highspeedsolid']:
accel_overrides['do_input_shaping'] = True
accel_overrides['do_corner_rounding'] = True
bead_mode_overrides = accel_overrides["bead_mode"] = {}

accel_enabled = global_stack.getProperty('acceleration_enabled', 'value')

if accel_enabled:
global_accel_setting = global_stack.getProperty('acceleration_print', 'value')
accel_overrides["rate_mm_per_s_sq"] = {
"x": global_accel_setting,
"y": global_accel_setting
}

if global_stack.getProperty('acceleration_travel_enabled', 'value'):
travel_accel_setting = global_stack.getProperty('acceleration_travel', 'value')
bead_mode_overrides['Travel Move'] = {
"rate_mm_per_s_sq": {
"x": travel_accel_setting,
"y": travel_accel_setting
}
}

jerk_enabled = global_stack.getProperty('jerk_enabled', 'value')
if jerk_enabled:
global_jerk_setting = global_stack.getProperty('jerk_print', 'value')
accel_overrides["max_speed_change_mm_per_s"] = {
"x": global_jerk_setting,
"y": global_jerk_setting
}

if global_stack.getProperty('jerk_travel_enabled', 'value'):
travel_jerk_setting = global_stack.getProperty('jerk_travel', 'value')
if 'Travel Move' not in bead_mode_overrides:
bead_mode_overrides['Travel Move' ] = {}
bead_mode_overrides['Travel Move'].update({
"max_speed_change_mm_per_s": {
"x": travel_jerk_setting,
"y": travel_jerk_setting
}
})


# Get bead mode settings per extruder
available_bead_modes = {
"infill": "FILL",
"prime_tower": "PRIME_TOWER",
"roofing": "TOP_SURFACE",
"support_infill": "SUPPORT",
"support_interface": "SUPPORT_INTERFACE",
"wall_0": "WALL_OUTER",
"wall_x": "WALL_INNER",
"skirt_brim": "SKIRT"
}
for idx, extruder in enumerate(extruders):
for bead_mode_setting, bead_mode_tag in available_bead_modes.items():
ext_specific_tag = "%s_%s" % (bead_mode_tag, idx)
if accel_enabled or jerk_enabled:
bead_mode_overrides[ext_specific_tag] = {}

if accel_enabled:
accel_val = extruder.getProperty('acceleration_%s' % bead_mode_setting, 'value')
bead_mode_overrides[ext_specific_tag]["rate_mm_per_s_sq"] = {
"x": accel_val,
"y": accel_val
}
if jerk_enabled:
jerk_val = extruder.getProperty('jerk_%s' % bead_mode_setting, 'value')
bead_mode_overrides[ext_specific_tag][ "max_speed_change_mm_per_s"] = {
"x": jerk_val,
"y": jerk_val
}

meta["miracle_config"] = {"gaggles": {"instance0": {}}}

version_info = dict()
Expand Down
6 changes: 6 additions & 0 deletions plugins/MakerbotWriter/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@ def getMetaData():
"description": catalog.i18nc("@item:inlistbox", "Makerbot Sketch Printfile"),
"mime_type": "application/x-makerbot-sketch",
"mode": MakerbotWriter.MakerbotWriter.OutputMode.BinaryMode,
},
{
"extension": file_extension,
"description": catalog.i18nc("@item:inlistbox", "Makerbot Replicator+ Printfile"),
"mime_type": "application/x-makerbot-replicator_plus",
"mode": MakerbotWriter.MakerbotWriter.OutputMode.BinaryMode,
}
]
},
Expand Down
2 changes: 1 addition & 1 deletion plugins/PostProcessingPlugin/Script.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ def getValue(self, line: str, key: str, default = None) -> Any:
if not key in line or (';' in line and line.find(key) > line.find(';')):
return default
sub_part = line[line.find(key) + 1:]
m = re.search('^-?[0-9]+\.?[0-9]*', sub_part)
m = re.search(r'^-?[0-9]+\.?[0-9]*', sub_part)
if m is None:
return default
try:
Expand Down
2 changes: 1 addition & 1 deletion plugins/PostProcessingPlugin/scripts/PauseAtHeight.py
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,7 @@ def execute(self, data: List[str]) -> List[str]:
nbr_negative_layers += 1

#Track the latest printing temperature in order to resume at the correct temperature.
if re.match("T(\d*)", line):
if re.match(r"T(\d*)", line):
current_t = self.getValue(line, "T")
m = self.getValue(line, "M")
if m is not None and (m == 104 or m == 109) and self.getValue(line, "S") is not None:
Expand Down
Loading

0 comments on commit 5ce0dc9

Please sign in to comment.