Skip to content

Commit

Permalink
Merge branch 'Ultimaker:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
whoseyoung authored Oct 24, 2024
2 parents b66cc9d + a1029d8 commit fdc4de2
Show file tree
Hide file tree
Showing 102 changed files with 3,200 additions and 535 deletions.
4 changes: 2 additions & 2 deletions conandata.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version: "5.9.0-alpha.0"
version: "5.10.0-alpha.0"
requirements:
- "cura_resources/(latest)@ultimaker/testing"
- "uranium/(latest)@ultimaker/testing"
Expand All @@ -10,7 +10,7 @@ requirements:
- "pynest2d/5.3.0"
- "native_cad_plugin/2.0.0"
requirements_internal:
- "fdm_materials/5.8.1"
- "fdm_materials/(latest)@ultimaker/testing"
- "cura_private_data/(latest)@internal/testing"
urls:
default:
Expand Down
2 changes: 1 addition & 1 deletion cura/ApplicationMetadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# Each release has a fixed SDK version coupled with it. It doesn't make sense to make it configurable because, for
# example Cura 3.2 with SDK version 6.1 will not work. So the SDK version is hard-coded here and left out of the
# CuraVersion.py.in template.
CuraSDKVersion = "8.8.0"
CuraSDKVersion = "8.9.0"

try:
from cura.CuraVersion import CuraLatestURL
Expand Down
1 change: 1 addition & 0 deletions packaging/AppImage-builder/AppImageBuilder.yml.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ AppDir:
QT_PLUGIN_PATH: "$APPDIR/qt/plugins"
QML2_IMPORT_PATH: "$APPDIR/qt/qml"
QT_QPA_PLATFORMTHEME: xdgdesktopportal
QT_QPA_PLATFORM: xcb
GDK_PIXBUF_MODULEDIR: $APPDIR/usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders
GDK_PIXBUF_MODULE_FILE: $APPDIR/usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders.cache
path_mappings:
Expand Down
1 change: 1 addition & 0 deletions plugins/3MFReader/ThreeMFReader.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ def _convertSavitarNodeToUMNode(savitar_node: Savitar.SceneNode, file_name: str
vertices = numpy.resize(data, (int(data.size / 3), 3))
mesh_builder.setVertices(vertices)
mesh_builder.calculateNormals(fast=True)
mesh_builder.setMeshId(node_id)
if file_name:
# The filename is used to give the user the option to reload the file if it is changed on disk
# It is only set for the root node of the 3mf file
Expand Down
1 change: 0 additions & 1 deletion plugins/3MFReader/ThreeMFWorkspaceReader.py
Original file line number Diff line number Diff line change
Expand Up @@ -1354,7 +1354,6 @@ def _updateActiveMachine(self, global_stack):
return
machine_manager.setQualityChangesGroup(quality_changes_group, no_dialog = True)
else:
self._quality_type_to_apply = self._quality_type_to_apply.lower() if self._quality_type_to_apply else None
quality_group_dict = container_tree.getCurrentQualityGroups()
if self._quality_type_to_apply in quality_group_dict:
quality_group = quality_group_dict[self._quality_type_to_apply]
Expand Down
12 changes: 12 additions & 0 deletions plugins/CuraEngineBackend/CuraEngineBackend.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,9 @@ def __init__(self) -> None:
"""

super().__init__()
self._init_done = False
self._immediate_slice_after_init = False

# Find out where the engine is located, and how it is called.
# This depends on how Cura is packaged and which OS we are running on.
executable_name = "CuraEngine"
Expand Down Expand Up @@ -268,6 +271,10 @@ def initialize(self) -> None:
self._machine_error_checker = application.getMachineErrorChecker()
self._machine_error_checker.errorCheckFinished.connect(self._onStackErrorCheckFinished)

self._init_done = True
if self._immediate_slice_after_init:
self.slice()

def close(self) -> None:
"""Terminate the engine process.
Expand Down Expand Up @@ -342,6 +349,11 @@ def getLatestSnapshot(self) -> Optional[QImage]:
def slice(self) -> None:
"""Perform a slice of the scene."""

if not self._init_done:
self._immediate_slice_after_init = True
return
self._immediate_slice_after_init = False

self._createSnapshot()

self.startPlugins()
Expand Down
4 changes: 1 addition & 3 deletions plugins/MakerbotWriter/MakerbotWriter.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,15 +112,13 @@ def write(self, stream: BufferedIOBase, nodes: List[SceneNode], mode=MeshWriter.
match file_format:
case "application/x-makerbot-sketch":
filename, filedata = "print.gcode", gcode_text_io.getvalue()
self._PNG_FORMATS = self._PNG_FORMAT
case "application/x-makerbot":
filename, filedata = "print.jsontoolpath", du.gcode_2_miracle_jtp(gcode_text_io.getvalue())
self._PNG_FORMATS = self._PNG_FORMAT + self._PNG_FORMAT_METHOD
case _:
raise Exception("Unsupported Mime type")

png_files = []
for png_format in self._PNG_FORMATS:
for png_format in (self._PNG_FORMAT + self._PNG_FORMAT_METHOD):
width, height, prefix = png_format["width"], png_format["height"], png_format["prefix"]
thumbnail_buffer = self._createThumbnail(width, height)
if thumbnail_buffer is None:
Expand Down
14 changes: 12 additions & 2 deletions plugins/SimulationView/SimulationView.py
Original file line number Diff line number Diff line change
Expand Up @@ -256,9 +256,19 @@ def cumulativeLineDuration(self) -> List[float]:
polylines = self.getLayerData()
if polylines is not None:
for polyline in polylines.polygons:
for line_duration in list((polyline.lineLengths / polyline.lineFeedrates)[0]):
for line_index in range(len(polyline.lineLengths)):
line_length = polyline.lineLengths[line_index]
line_feedrate = polyline.lineFeedrates[line_index][0]

if line_feedrate > 0.0:
line_duration = line_length / line_feedrate
else:
# Something is wrong with this line, set an arbitrary non-null duration
line_duration = 0.1

total_duration += line_duration / SimulationView.SIMULATION_FACTOR
self._cumulative_line_duration.append(total_duration)

# for tool change we add an extra tool path
self._cumulative_line_duration.append(total_duration)
# set current cached layer
Expand Down Expand Up @@ -583,7 +593,7 @@ def calculateColorSchemeLimits(self) -> None:
self._max_thickness = sys.float_info.min
self._min_flow_rate = sys.float_info.max
self._max_flow_rate = sys.float_info.min
self._cumulative_line_duration = {}
self._cumulative_line_duration = []

# The colour scheme is only influenced by the visible lines, so filter the lines by if they should be visible.
visible_line_types = []
Expand Down
2 changes: 1 addition & 1 deletion resources/conandata.yml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
version: "5.9.0-alpha.0"
version: "5.9.0-beta.1"
2 changes: 1 addition & 1 deletion resources/definitions/fdmextruder.def.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"author": "Ultimaker",
"manufacturer": "Unknown",
"position": "0",
"setting_version": 23,
"setting_version": 24,
"type": "extruder"
},
"settings":
Expand Down
19 changes: 11 additions & 8 deletions resources/definitions/fdmprinter.def.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"type": "machine",
"author": "Unknown",
"manufacturer": "Unknown",
"setting_version": 23,
"setting_version": 24,
"file_formats": "text/x-gcode;model/stl;application/x-wavefront-obj;application/x3g",
"visible": false,
"has_materials": true,
Expand Down Expand Up @@ -8377,7 +8377,7 @@
"wall_overhang_angle":
{
"label": "Overhanging Wall Angle",
"description": "Walls that overhang more than this angle will be printed using overhanging wall settings. When the value is 90, no walls will be treated as overhanging. Overhang that gets supported by support will not be treated as overhang either.",
"description": "Walls that overhang more than this angle will be printed using overhanging wall settings. When the value is 90, no walls will be treated as overhanging. Overhang that gets supported by support will not be treated as overhang either. Furthermore, any line that's less than half overhanging will also not be treated as overhang.",
"unit": "\u00b0",
"type": "float",
"minimum_value": "0",
Expand Down Expand Up @@ -8938,7 +8938,7 @@
"scarf_joint_seam_length":
{
"label": "Scarf Seam Length",
"description": "When greater than 0, a scarf joint will be created on the Z seam to make it less visible.",
"description": "Determines the length of the scarf seam, a seam type that should make the Z seam less visible. Must be higher than 0 to be effective.",
"type": "float",
"default_value": 0,
"minimum_value": "0",
Expand All @@ -8950,28 +8950,31 @@
"scarf_joint_seam_start_height_ratio":
{
"label": "Scarf Seam Start Height",
"description": "This is the ratio over the total layer height where the scarf joint seam will start.",
"description": "The ratio of the selected layer height at which the scarf seam will begin. A lower number will result in a larger seam height. Must be lower than 100 to be effective.",
"type": "float",
"default_value": 0,
"minimum_value": 0,
"maximum_value": 100.0,
"unit": "%",
"limit_to_extruder": "wall_0_extruder_nr",
"settable_per_extruder": true,
"settable_per_mesh": true
"settable_per_mesh": true,
"enabled": "scarf_joint_seam_length > 0"
},
"scarf_split_distance":
{
"label": "Scarf Seam Split Distance",
"description": "This is the maximum length of an extrusion path when splitting a longer path to apply the scarf seam. A smaller distance will create a more precise but also more verbose G-Code.",
"label": "Scarf Seam Step Length",
"description": "Determines the length of each step in the flow change when extruding along the scarf seam. A smaller distance will result in a more precise but also more complex G-code.",
"type": "float",
"default_value": 1.0,
"minimum_value": 0.1,
"maximum_value": 100.0,
"maximum_value_warning": "scarf_joint_seam_length",
"unit": "mm",
"limit_to_extruder": "wall_0_extruder_nr",
"settable_per_extruder": true,
"settable_per_mesh": true
"settable_per_mesh": true,
"enabled": "scarf_joint_seam_length > 0"
},
"wall_0_start_speed_ratio":
{
Expand Down
2 changes: 2 additions & 0 deletions resources/definitions/ultimaker_method_base.def.json
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@
"bridge_wall_material_flow": { "value": "material_flow" },
"bridge_wall_speed": { "value": "speed_wall" },
"brim_width": { "value": 5 },
"cool_during_extruder_switch": { "value": "'only_last_extruder'" },
"cool_fan_enabled":
{
"force_depends_on_settings": [ "support_extruder_nr" ]
Expand Down Expand Up @@ -342,6 +343,7 @@
"multiple_mesh_overlap": { "value": 0 },
"optimize_wall_printing_order": { "value": true },
"prime_blob_enable": { "enabled": false },
"prime_tower_enable": { "default_value": true },
"prime_tower_flow": { "value": "material_flow" },
"prime_tower_line_width":
{
Expand Down
16 changes: 16 additions & 0 deletions resources/definitions/ultimaker_sketch.def.json
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,23 @@
"machine_nozzle_heat_up_speed": { "default_value": 1.4 },
"machine_start_gcode": { "default_value": "M140 S50 T0; Set Platform Temp\nM104 S220 T0; Set Extruder Temp\nG90; Use Absolute Positioning\nG28; Home\nM132 X Y Z A B; Set Current Position to Home\nG161 X Y F3300; Move to min axes positions\nM7 T0; Wait For Platform to Heat\nM6 T0; Wait For Extruders to Heat\nM651; Turn on back fan\nM907 X100 Y100 Z40 A80 B20; Set Stepper Currents\nM106; Enable Cooling Fan\n; Purge Line\nG92 E0; Reset Extruder Axis Position\nG1 X-26.18 Y-75.90 Z0.200 F420\nG1 X26.18 Y-75.90 E10\nG92 E0; Reset Extruder Axis Position\n; Start GCode\n" },
"machine_width": { "default_value": 150 },
"material_bed_temperature":
{
"maximum_value": 100,
"maximum_value_warning": 70
},
"material_bed_temperature_layer_0":
{
"maximum_value": 100,
"maximum_value_warning": 70
},
"material_diameter": { "default_value": 1.75 },
"material_flow": { "default_value": 100 },
"material_print_temperature":
{
"maximum_value": 240,
"maximum_value_warning": 230
},
"min_bead_width":
{
"minimum_value": "line_width * 0.5",
Expand All @@ -148,6 +163,7 @@
"enabled": true,
"value": "resolveOrValue('print_sequence') != 'one_at_a_time'"
},
"print_sequence": { "enabled": false },
"raft_margin": { "value": "5" },
"retract_at_layer_change": { "value": true },
"retraction_amount":
Expand Down
3 changes: 2 additions & 1 deletion resources/definitions/ultimaker_sketch_sprint.def.json
Original file line number Diff line number Diff line change
Expand Up @@ -171,11 +171,12 @@
"material_flow": { "default_value": 100 },
"material_print_temperature":
{
"maximum_value": 280,
"maximum_value": 260,
"maximum_value_warning": 240
},
"min_bead_width": { "value": 0.3 },
"multiple_mesh_overlap": { "value": "0" },
"print_sequence": { "enabled": false },
"raft_airgap": { "value": 0.35 },
"raft_base_acceleration": { "value": "acceleration_layer_0" },
"raft_base_speed":
Expand Down
4 changes: 2 additions & 2 deletions resources/extruders/ultimaker_method_extruder_left.def.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
"maximum_value": 1
},
"machine_extruder_cooling_fan_number": { "default_value": 0 },
"machine_extruder_end_code": { "default_value": "M106 P{extruder_nr} S1.0\nG91\nG0 Z0.4 F600\nG90\nG0 X{prime_tower_position_x - prime_tower_size/2} Y{prime_tower_position_y + prime_tower_size/2} F6000" },
"machine_extruder_start_code": { "default_value": "G0 X{prime_tower_position_x - prime_tower_size/2} Y{prime_tower_position_y + prime_tower_size/2} F6000\nM104 S{material_print_temperature}\nG4 S5\nG91\nG0 Z-0.4 F600\nG90\nM107 P{(extruder_nr+1)%2}\nM106 P{extruder_nr} S{(layer_z > 1 ? cool_fan_speed/100 : cool_fan_speed_0/100)}" },
"machine_extruder_end_code": { "default_value": "M104 S{material_standby_temperature}\nG91\nG0 Z0.4 F600\nG90\nG0 X{prime_tower_position_x - prime_tower_size/2} Y{prime_tower_position_y + prime_tower_size/2} F6000" },
"machine_extruder_start_code": { "default_value": "G0 X{prime_tower_position_x - prime_tower_size/2} Y{prime_tower_position_y + prime_tower_size/2} F6000\nG91\nG0 Z-0.4 F600\nG90" },
"machine_extruder_start_code_duration": { "default_value": 8 },
"machine_nozzle_offset_x": { "default_value": 0 },
"machine_nozzle_offset_y": { "default_value": 0 },
Expand Down
4 changes: 2 additions & 2 deletions resources/extruders/ultimaker_method_extruder_right.def.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
"maximum_value": 1
},
"machine_extruder_cooling_fan_number": { "default_value": 1 },
"machine_extruder_end_code": { "default_value": "M106 P{extruder_nr} S1.0\nG91\nG0 Z0.4 F600\nG90\nG0 X{prime_tower_position_x - prime_tower_size/2} Y{prime_tower_position_y + prime_tower_size/2} F6000" },
"machine_extruder_start_code": { "default_value": "G0 X{prime_tower_position_x - prime_tower_size/2} Y{prime_tower_position_y + prime_tower_size/2} F6000\nM104 S{material_print_temperature}\nG4 S5\nG91\nG0 Z-0.4 F600\nG90\nM107 P{(extruder_nr+1)%2}\nM106 P{extruder_nr} S{(layer_z > 1 ? cool_fan_speed/100 : cool_fan_speed_0/100)}" },
"machine_extruder_end_code": { "default_value": "M104 S{material_standby_temperature}\nG91\nG0 Z0.4 F600\nG90\nG0 X{prime_tower_position_x - prime_tower_size/2} Y{prime_tower_position_y + prime_tower_size/2} F6000" },
"machine_extruder_start_code": { "default_value": "G0 X{prime_tower_position_x - prime_tower_size/2} Y{prime_tower_position_y + prime_tower_size/2} F6000\nG91\nG0 Z-0.4 F600\nG90" },
"machine_extruder_start_code_duration": { "default_value": 8 },
"machine_nozzle_offset_x": { "default_value": 0 },
"machine_nozzle_offset_y": { "default_value": 0 },
Expand Down
4 changes: 2 additions & 2 deletions resources/extruders/ultimaker_methodx_extruder_left.def.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
"maximum_value": "1"
},
"machine_extruder_cooling_fan_number": { "default_value": 0 },
"machine_extruder_end_code": { "default_value": "M106 P{extruder_nr} S1.0\nG91\nG0 Z0.4 F600\nG90\nG0 X{prime_tower_position_x - prime_tower_size/2} Y{prime_tower_position_y + prime_tower_size/2} F6000" },
"machine_extruder_start_code": { "default_value": "G0 X{prime_tower_position_x - prime_tower_size/2} Y{prime_tower_position_y + prime_tower_size/2} F6000\nM104 S{material_print_temperature}\nG4 S5\nG91\nG0 Z-0.4 F600\nG90\nM107 P{(extruder_nr+1)%2}\nM106 P{extruder_nr} S{(layer_z > 1 ? cool_fan_speed/100 : cool_fan_speed_0/100)}" },
"machine_extruder_end_code": { "default_value": "M104 S{material_standby_temperature}\nG91\nG0 Z0.4 F600\nG90\nG0 X{prime_tower_position_x - prime_tower_size/2} Y{prime_tower_position_y + prime_tower_size/2} F6000" },
"machine_extruder_start_code": { "default_value": "G0 X{prime_tower_position_x - prime_tower_size/2} Y{prime_tower_position_y + prime_tower_size/2} F6000\nG91\nG0 Z-0.4 F600\nG90" },
"machine_extruder_start_code_duration": { "default_value": 8 },
"machine_nozzle_offset_x": { "default_value": 0 },
"machine_nozzle_offset_y": { "default_value": 0 },
Expand Down
4 changes: 2 additions & 2 deletions resources/extruders/ultimaker_methodx_extruder_right.def.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
"maximum_value": "1"
},
"machine_extruder_cooling_fan_number": { "default_value": 1 },
"machine_extruder_end_code": { "default_value": "M106 P{extruder_nr} S1.0\nG91\nG0 Z0.4 F600\nG90\nG0 X{prime_tower_position_x - prime_tower_size/2} Y{prime_tower_position_y + prime_tower_size/2} F6000" },
"machine_extruder_start_code": { "default_value": "G0 X{prime_tower_position_x - prime_tower_size/2} Y{prime_tower_position_y + prime_tower_size/2} F6000\nM104 S{material_print_temperature}\nG4 S5\nG91\nG0 Z-0.4 F600\nG90\nM107 P{(extruder_nr+1)%2}\nM106 P{extruder_nr} S{(layer_z > 1 ? cool_fan_speed/100 : cool_fan_speed_0/100)}" },
"machine_extruder_end_code": { "default_value": "M104 S{material_standby_temperature}\nG91\nG0 Z0.4 F600\nG90\nG0 X{prime_tower_position_x - prime_tower_size/2} Y{prime_tower_position_y + prime_tower_size/2} F6000" },
"machine_extruder_start_code": { "default_value": "G0 X{prime_tower_position_x - prime_tower_size/2} Y{prime_tower_position_y + prime_tower_size/2} F6000\nG91\nG0 Z-0.4 F600\nG90" },
"machine_extruder_start_code_duration": { "default_value": 8 },
"machine_nozzle_offset_x": { "default_value": 0 },
"machine_nozzle_offset_y": { "default_value": 0 },
Expand Down
4 changes: 2 additions & 2 deletions resources/extruders/ultimaker_methodxl_extruder_left.def.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
"maximum_value": "1"
},
"machine_extruder_cooling_fan_number": { "default_value": 0 },
"machine_extruder_end_code": { "default_value": "M106 P{extruder_nr} S1.0\nG91\nG0 Z0.4 F600\nG90\nG0 X{prime_tower_position_x - prime_tower_size/2} Y{prime_tower_position_y + prime_tower_size/2} F6000" },
"machine_extruder_start_code": { "default_value": "G0 X{prime_tower_position_x - prime_tower_size/2} Y{prime_tower_position_y + prime_tower_size/2} F6000\nM104 S{material_print_temperature}\nG4 S5\nG91\nG0 Z-0.4 F600\nG90\nM107 P{(extruder_nr+1)%2}\nM106 P{extruder_nr} S{(layer_z > 1 ? cool_fan_speed/100 : cool_fan_speed_0/100)}" },
"machine_extruder_end_code": { "default_value": "M104 S{material_standby_temperature}\nG91\nG0 Z0.4 F600\nG90\nG0 X{prime_tower_position_x - prime_tower_size/2} Y{prime_tower_position_y + prime_tower_size/2} F6000" },
"machine_extruder_start_code": { "default_value": "G0 X{prime_tower_position_x - prime_tower_size/2} Y{prime_tower_position_y + prime_tower_size/2} F6000\nG91\nG0 Z-0.4 F600\nG90" },
"machine_extruder_start_code_duration": { "default_value": 10 },
"machine_nozzle_offset_x": { "default_value": 0 },
"machine_nozzle_offset_y": { "default_value": 0 },
Expand Down
Loading

0 comments on commit fdc4de2

Please sign in to comment.