Skip to content

Commit

Permalink
Merge branch 'main' into CURA-10475_engineplugin
Browse files Browse the repository at this point in the history
  • Loading branch information
casperlamboo committed Aug 28, 2023
2 parents 7d46257 + 95aec61 commit 2ffcfa3
Show file tree
Hide file tree
Showing 26 changed files with 192 additions and 104 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,9 @@ jobs:
run: echo -n "$GPG_PRIVATE_KEY" | base64 --decode | gpg --import

- name: Get Conan configuration
run: conan config install https://github.com/Ultimaker/conan-config.git
run: |
conan config install https://github.com/Ultimaker/conan-config.git
conan config install https://github.com/Ultimaker/conan-config.git -a "-b runner/${{ runner.os }}/${{ runner.arch }}"
- name: Use Conan download cache (Bash)
run: conan config set storage.download_cache="$HOME/.conan/conan_download_cache"
Expand Down
8 changes: 3 additions & 5 deletions .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -144,15 +144,13 @@ jobs:
p12-password: ${{ secrets.MACOS_CERT_PASSPHRASE }}

- name: Get Conan configuration
run: conan config install https://github.com/Ultimaker/conan-config.git
run: |
conan config install https://github.com/Ultimaker/conan-config.git
conan config install https://github.com/Ultimaker/conan-config.git -a "-b runner/${{ runner.os }}/${{ runner.arch }}"
- name: Use Conan download cache (Bash)
run: conan config set storage.download_cache="$HOME/.conan/conan_download_cache"

- name: Set architecture conan profile
if: ${{ inputs.architecture == 'X64' }}
run: conan profile update settings.arch=x86_64 default

- name: Create the Packages (Bash)
run: conan install $CURA_CONAN_VERSION ${{ inputs.conan_args }} --build=missing --update -if cura_inst -g VirtualPythonEnv -o cura:enterprise=$ENTERPRISE -o cura:staging=$STAGING --json "cura_inst/conan_install_info.json"

Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,9 @@ jobs:
run: conan profile new default --detect --force

- name: Get Conan configuration
run: conan config install https://github.com/Ultimaker/conan-config.git
run: |
conan config install https://github.com/Ultimaker/conan-config.git
conan config install https://github.com/Ultimaker/conan-config.git -a "-b runner/${{ runner.os }}/${{ runner.arch }}"
- name: Use Conan download cache (Powershell)
run: conan config set storage.download_cache="C:\Users\runneradmin\.conan\conan_download_cache"
Expand Down
7 changes: 2 additions & 5 deletions cura/Scene/ConvexHullDecorator.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,11 +111,7 @@ def getConvexHull(self) -> Optional[Polygon]:

# Parent can be None if node is just loaded.
if self._isSingularOneAtATimeNode():
hull = self.getConvexHullHeadFull()
if hull is None:
return None
hull = self._add2DAdhesionMargin(hull)
return hull
return self.getConvexHullHeadFull()

return self._compute2DConvexHull()

Expand Down Expand Up @@ -323,6 +319,7 @@ def _getHeadAndFans(self) -> Polygon:

def _compute2DConvexHeadFull(self) -> Optional[Polygon]:
convex_hull = self._compute2DConvexHull()
convex_hull = self._add2DAdhesionMargin(convex_hull)
if convex_hull:
return convex_hull.getMinkowskiHull(self._getHeadAndFans())
return None
Expand Down
4 changes: 2 additions & 2 deletions packaging/MacOS/build_macos.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,6 @@ def create_dmg(filename: str, dist_path: str, source_path: str, app_name: str) -
app_name = f"{args.app_name}.app"

if args.build_pkg:
create_pkg_installer(args.filename + ".pkg", args.dist_path, cura_version, app_name)
create_pkg_installer(f"{args.filename}.pkg", args.dist_path, cura_version, app_name)
if args.build_dmg:
create_dmg(args.filename + ".dmg", args.dist_path, args.source_path, app_name)
create_dmg(f"{args.filename}.dmg", args.dist_path, args.source_path, app_name)
63 changes: 35 additions & 28 deletions plugins/RemovableDriveOutputDevice/RemovableDriveOutputDevice.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Copyright (c) 2018 Ultimaker B.V.
# Cura is released under the terms of the LGPLv3 or higher.

import os
import os.path

from UM.Application import Application
Expand Down Expand Up @@ -143,38 +144,44 @@ def _onProgress(self, job, progress):

def _onFinished(self, job):
if self._stream:
# Explicitly closing the stream flushes the write-buffer
error = job.getError()
try:
# Explicitly closing the stream flushes the write-buffer
self._stream.close()
self._stream = None
except:
Logger.logException("w", "An exception occurred while trying to write to removable drive.")
message = Message(catalog.i18nc("@info:status", "Could not save to removable drive {0}: {1}").format(self.getName(),str(job.getError())),
title = catalog.i18nc("@info:title", "Error"),
message_type = Message.MessageType.ERROR)
except Exception as e:
if not error:
# Only log new error if there was no previous one
error = e

self._stream = None
self._writing = False
self.writeFinished.emit(self)

if not error:
message = Message(
catalog.i18nc("@info:status", "Saved to Removable Drive {0} as {1}").format(self.getName(),
os.path.basename(
job.getFileName())),
title=catalog.i18nc("@info:title", "File Saved"),
message_type=Message.MessageType.POSITIVE)
message.addAction("eject", catalog.i18nc("@action:button", "Eject"), "eject",
catalog.i18nc("@action", "Eject removable device {0}").format(self.getName()))
message.actionTriggered.connect(self._onActionTriggered)
message.show()
self.writeSuccess.emit(self)
else:
try:
os.remove(job.getFileName())
except Exception as e:
Logger.logException("e", "Exception when trying to remove incomplete exported file %s",
str(job.getFileName()))
message = Message(catalog.i18nc("@info:status",
"Could not save to removable drive {0}: {1}").format(self.getName(),
str(job.getError())),
title=catalog.i18nc("@info:title", "Error"),
message_type=Message.MessageType.ERROR)
message.show()
self.writeError.emit(self)
return

self._writing = False
self.writeFinished.emit(self)
if job.getResult():
message = Message(catalog.i18nc("@info:status", "Saved to Removable Drive {0} as {1}").format(self.getName(), os.path.basename(job.getFileName())),
title = catalog.i18nc("@info:title", "File Saved"),
message_type = Message.MessageType.POSITIVE)
message.addAction("eject", catalog.i18nc("@action:button", "Eject"), "eject", catalog.i18nc("@action", "Eject removable device {0}").format(self.getName()))
message.actionTriggered.connect(self._onActionTriggered)
message.show()
self.writeSuccess.emit(self)
else:
message = Message(catalog.i18nc("@info:status",
"Could not save to removable drive {0}: {1}").format(self.getName(),
str(job.getError())),
title = catalog.i18nc("@info:title", "Error"),
message_type = Message.MessageType.ERROR)
message.show()
self.writeError.emit(self)
job.getStream().close()

def _onActionTriggered(self, message, action):
if action == "eject":
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,24 +37,13 @@ def updateProgressText(self, output_device):

def finalize(self, new_devices_added, new_output_devices):
self.setProgress(None)
num_devices_added = len(new_devices_added)
max_disp_devices = 3

if num_devices_added > max_disp_devices:
num_hidden = num_devices_added - max_disp_devices
device_name_list = ["<li>{} ({})</li>".format(device.name, device.printerTypeName) for device in
new_output_devices[0: max_disp_devices]]
device_name_list.append(
"<li>" + self.i18n_catalog.i18ncp("info:{0} gets replaced by a number of printers", "... and {0} other",
"... and {0} others", num_hidden) + "</li>")
device_names = "".join(device_name_list)
else:
device_names = "".join(
["<li>{} ({})</li>".format(device.name, device.printerTypeName) for device in new_devices_added])

if new_devices_added:
message_text = self.i18n_catalog.i18nc("info:status",
"Printers added from Digital Factory:") + f"<ul>{device_names}</ul>"
device_names = ""
for device in new_devices_added:
device_names = device_names + "<li>{} ({})</li>".format(device.name, device.printerTypeName)
message_title = self.i18n_catalog.i18nc("info:status", "Printers added from Digital Factory:")
message_text = f"{message_title}<ul>{device_names}</ul>"
self.setText(message_text)
else:
self.hide()
14 changes: 13 additions & 1 deletion resources/definitions/fdmprinter.def.json
Original file line number Diff line number Diff line change
Expand Up @@ -1664,16 +1664,28 @@
"small_skin_width":
{
"label": "Small Top/Bottom Width",
"description": "Small top/bottom regions are filled with walls instead of the default top/bottom pattern. This helps to avoids jerky motions.",
"description": "Small top/bottom regions are filled with walls instead of the default top/bottom pattern. This helps to avoids jerky motions. Off for the topmost (air-exposed) layer by default (see 'Small Top/Bottom On Surface').",
"value": "skin_line_width * 2",
"default_value": 1,
"minimum_value": "0",
"maximum_value_warning": "skin_line_width * 3",
"type": "float",
"enabled": "(top_layers > 0 or bottom_layers > 0) and top_bottom_pattern != 'concentric'",
"limit_to_extruder": "top_bottom_extruder_nr",
"settable_per_mesh": true,
"unit": "mm"
},
"small_skin_on_surface":
{
"label": "Small Top/Bottom On Surface",
"description": "Enable small (up to 'Small Top/Bottom Width') regions on the topmost skinned layer (exposed to air) to be filled with walls instead of the default pattern.",
"value": "False",
"default_value": false,
"type": "bool",
"enabled": "small_skin_width > 0 and top_layers > 0",
"limit_to_extruder": "top_bottom_extruder_nr",
"settable_per_mesh": true
},
"skin_no_small_gaps_heuristic":
{
"label": "No Skin in Z Gaps",
Expand Down
9 changes: 5 additions & 4 deletions resources/definitions/kingroon_kp3s_pro.def.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,14 @@
"metadata":
{
"visible": true,
"author": "willuhmjs",
"platform": "kingroon_kp3s.stl",
"quality_definition": "kingroon_base",
"author": "willuhmjs"
"quality_definition": "kingroon_base"
},
"overrides":
{
"machine_acceleration": { "value": 1000 },
"machine_depth": { "default_value": 200 },
"machine_height": { "default_value": 200 },
"machine_max_acceleration_e": { "value": 1000 },
"machine_max_acceleration_x": { "value": 1000 },
Expand All @@ -23,7 +24,7 @@
"machine_max_feedrate_z": { "value": 4 },
"machine_max_jerk_xy": { "value": 15 },
"machine_max_jerk_z": { "value": 0.4 },
"machine_name": { "default_value": "Kingroon KP3S" },
"machine_name": { "default_value": "Kingroon KP3S Pro" },
"machine_steps_per_mm_e": { "value": 764 },
"machine_steps_per_mm_x": { "value": 160 },
"machine_steps_per_mm_y": { "value": 160 },
Expand All @@ -34,4 +35,4 @@
"retraction_speed": { "value": 40 },
"speed_z_hop": { "value": 4 }
}
}
}
2 changes: 1 addition & 1 deletion resources/definitions/tizyx_evy.def.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
[25, 49],
[25, -49],
[-25, -49],
[25, 49]
[-25, 49]
]
},
"machine_heated_bed": { "default_value": true },
Expand Down
2 changes: 1 addition & 1 deletion resources/definitions/tizyx_evy_dual.def.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
[25, 49],
[25, -49],
[-25, -49],
[25, 49]
[-25, 49]
]
},
"machine_heated_bed": { "default_value": true },
Expand Down
2 changes: 1 addition & 1 deletion resources/definitions/tizyx_k25.def.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
[25, 49],
[25, -49],
[-25, -49],
[25, 49]
[-25, 49]
]
},
"machine_heated_bed": { "default_value": true },
Expand Down
8 changes: 8 additions & 0 deletions resources/qml/Actions.qml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ Item
property alias showProfileFolder: showProfileFolderAction
property alias documentation: documentationAction
property alias showTroubleshooting: showTroubleShootingAction
property alias openSponsershipPage: openSponsershipPageAction
property alias reportBug: reportBugAction
property alias whatsNew: whatsNewAction
property alias about: aboutAction
Expand Down Expand Up @@ -90,6 +91,13 @@ Item
text: catalog.i18nc("@action:inmenu", "Show Online Troubleshooting")
}

Action
{
id: openSponsershipPageAction
onTriggered: Qt.openUrlExternally("https://ultimaker.com/software/ultimaker-cura/sponsor/")
text: catalog.i18nc("@action:inmenu", "Sponsor Cura")
}

Action
{
id: toggleFullScreenAction
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,10 @@ Popup
permissionsRequired: []
},
{
displayName: "UltiMaker Academy", //Not translated, since it's a brand name.
thumbnail: UM.Theme.getIcon("Knowledge"),
description: catalog.i18nc("@tooltip:button", "Become a 3D printing expert with UltiMaker e-learning."),
link: "https://academy.ultimaker.com/?utm_source=cura&utm_medium=software&utm_campaign=switcher-academy",
displayName: catalog.i18nc("@label:button", "Sponsor Cura"),
thumbnail: UM.Theme.getIcon("Heart"),
description: catalog.i18nc("@tooltip:button", "Show your support for Cura with a donation."),
link: "https://ultimaker.com/software/ultimaker-cura/sponsor/",
permissionsRequired: []
},
{
Expand Down
1 change: 1 addition & 0 deletions resources/qml/Menus/HelpMenu.qml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ Cura.Menu
Cura.MenuItem { action: Cura.Actions.showTroubleshooting}
Cura.MenuItem { action: Cura.Actions.documentation }
Cura.MenuItem { action: Cura.Actions.reportBug }
Cura.MenuItem { action: Cura.Actions.openSponsershipPage }
Cura.MenuSeparator { }
Cura.MenuItem { action: Cura.Actions.whatsNew }
Cura.MenuItem { action: Cura.Actions.about }
Expand Down
38 changes: 4 additions & 34 deletions resources/qml/Widgets/ScrollableTextArea.qml
Original file line number Diff line number Diff line change
Expand Up @@ -4,41 +4,11 @@
import QtQuick 2.10
import QtQuick.Controls 2.3

import UM 1.5 as UM
import UM 1.7 as UM
import Cura 1.1 as Cura


//
// Cura-style TextArea with scrolls
//
Flickable
// Wrapper to UM.ScrollableTextArea which was originally placed here
UM.ScrollableTextArea
{
id: scrollableTextAreaBase
property bool do_borders: true
property var back_color: UM.Theme.getColor("main_background")
property alias textArea: flickableTextArea

ScrollBar.vertical: UM.ScrollBar {}

TextArea.flickable: TextArea
{
id: flickableTextArea

background: Rectangle //Providing the background color and border.
{
anchors.fill: parent
anchors.margins: -border.width

color: scrollableTextAreaBase.back_color
border.color: UM.Theme.getColor("thick_lining")
border.width: scrollableTextAreaBase.do_borders ? UM.Theme.getSize("default_lining").width : 0
}

font: UM.Theme.getFont("default")
color: UM.Theme.getColor("text")
textFormat: TextEdit.PlainText
renderType: Text.NativeRendering
wrapMode: Text.Wrap
selectByMouse: true
}
}
}
2 changes: 2 additions & 0 deletions resources/setting_visibility/advanced.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ bottom_thickness
bottom_layers
ironing_enabled
skin_monotonic
small_skin_width
small_skin_on_surface

[infill]
infill_extruder_nr
Expand Down
1 change: 1 addition & 0 deletions resources/setting_visibility/expert.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ skin_monotonic
connect_skin_polygons
skin_angles
small_skin_width
small_skin_on_surface
skin_no_small_gaps_heuristic
skin_outline_count
ironing_enabled
Expand Down
Loading

0 comments on commit 2ffcfa3

Please sign in to comment.