mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-18 04:07:57 -06:00
Merge branch '4.0' of github.com:Ultimaker/Cura
This commit is contained in:
commit
aac82a0852
10 changed files with 34 additions and 51 deletions
|
@ -1043,6 +1043,12 @@ class BuildVolume(SceneNode):
|
||||||
else:
|
else:
|
||||||
raise Exception("Unknown bed adhesion type. Did you forget to update the build volume calculations for your new bed adhesion type?")
|
raise Exception("Unknown bed adhesion type. Did you forget to update the build volume calculations for your new bed adhesion type?")
|
||||||
|
|
||||||
|
max_length_available = 0.5 * min(
|
||||||
|
self._global_container_stack.getProperty("machine_width", "value"),
|
||||||
|
self._global_container_stack.getProperty("machine_depth", "value")
|
||||||
|
)
|
||||||
|
bed_adhesion_size = min(bed_adhesion_size, max_length_available)
|
||||||
|
|
||||||
support_expansion = 0
|
support_expansion = 0
|
||||||
support_enabled = self._global_container_stack.getProperty("support_enable", "value")
|
support_enabled = self._global_container_stack.getProperty("support_enable", "value")
|
||||||
support_offset = self._global_container_stack.getProperty("support_offset", "value")
|
support_offset = self._global_container_stack.getProperty("support_offset", "value")
|
||||||
|
|
|
@ -289,16 +289,21 @@ class ConvexHullDecorator(SceneNodeDecorator):
|
||||||
# Add extra margin depending on adhesion type
|
# Add extra margin depending on adhesion type
|
||||||
adhesion_type = self._global_stack.getProperty("adhesion_type", "value")
|
adhesion_type = self._global_stack.getProperty("adhesion_type", "value")
|
||||||
|
|
||||||
|
max_length_available = 0.5 * min(
|
||||||
|
self._getSettingProperty("machine_width", "value"),
|
||||||
|
self._getSettingProperty("machine_depth", "value")
|
||||||
|
)
|
||||||
|
|
||||||
if adhesion_type == "raft":
|
if adhesion_type == "raft":
|
||||||
extra_margin = max(0, self._getSettingProperty("raft_margin", "value"))
|
extra_margin = min(max_length_available, max(0, self._getSettingProperty("raft_margin", "value")))
|
||||||
elif adhesion_type == "brim":
|
elif adhesion_type == "brim":
|
||||||
extra_margin = max(0, self._getSettingProperty("brim_line_count", "value") * self._getSettingProperty("skirt_brim_line_width", "value"))
|
extra_margin = min(max_length_available, max(0, self._getSettingProperty("brim_line_count", "value") * self._getSettingProperty("skirt_brim_line_width", "value")))
|
||||||
elif adhesion_type == "none":
|
elif adhesion_type == "none":
|
||||||
extra_margin = 0
|
extra_margin = 0
|
||||||
elif adhesion_type == "skirt":
|
elif adhesion_type == "skirt":
|
||||||
extra_margin = max(
|
extra_margin = min(max_length_available, max(
|
||||||
0, self._getSettingProperty("skirt_gap", "value") +
|
0, self._getSettingProperty("skirt_gap", "value") +
|
||||||
self._getSettingProperty("skirt_line_count", "value") * self._getSettingProperty("skirt_brim_line_width", "value"))
|
self._getSettingProperty("skirt_line_count", "value") * self._getSettingProperty("skirt_brim_line_width", "value")))
|
||||||
else:
|
else:
|
||||||
raise Exception("Unknown bed adhesion type. Did you forget to update the convex hull calculations for your new bed adhesion type?")
|
raise Exception("Unknown bed adhesion type. Did you forget to update the convex hull calculations for your new bed adhesion type?")
|
||||||
|
|
||||||
|
|
|
@ -119,7 +119,7 @@ class CloudApiClient:
|
||||||
except (UnicodeDecodeError, JSONDecodeError, ValueError) as err:
|
except (UnicodeDecodeError, JSONDecodeError, ValueError) as err:
|
||||||
error = CloudError(code=type(err).__name__, title=str(err), http_code=str(status_code),
|
error = CloudError(code=type(err).__name__, title=str(err), http_code=str(status_code),
|
||||||
id=str(time()), http_status="500")
|
id=str(time()), http_status="500")
|
||||||
Logger.logException("e", "Could not parse the stardust response: %s", error)
|
Logger.logException("e", "Could not parse the stardust response: %s", error.toDict())
|
||||||
return status_code, {"errors": [error.toDict()]}
|
return status_code, {"errors": [error.toDict()]}
|
||||||
|
|
||||||
## Parses the given models and calls the correct callback depending on the result.
|
## Parses the given models and calls the correct callback depending on the result.
|
||||||
|
|
|
@ -138,10 +138,10 @@ class CloudOutputDeviceManager:
|
||||||
|
|
||||||
## Handles an API error received from the cloud.
|
## Handles an API error received from the cloud.
|
||||||
# \param errors: The errors received
|
# \param errors: The errors received
|
||||||
def _onApiError(self, errors: List[CloudError]) -> None:
|
def _onApiError(self, errors: List[CloudError] = None) -> None:
|
||||||
text = ". ".join(e.title for e in errors) # TODO: translate errors
|
Logger.log("w", str(errors))
|
||||||
message = Message(
|
message = Message(
|
||||||
text = text,
|
text = self.I18N_CATALOG.i18nc("@info:description", "There was an error connecting to the cloud."),
|
||||||
title = self.I18N_CATALOG.i18nc("@info:title", "Error"),
|
title = self.I18N_CATALOG.i18nc("@info:title", "Error"),
|
||||||
lifetime = 10
|
lifetime = 10
|
||||||
)
|
)
|
||||||
|
|
|
@ -4690,6 +4690,7 @@
|
||||||
"default_value": 8.0,
|
"default_value": 8.0,
|
||||||
"minimum_value": "0.0",
|
"minimum_value": "0.0",
|
||||||
"maximum_value_warning": "50.0",
|
"maximum_value_warning": "50.0",
|
||||||
|
"maximum_value": "0.5 * min(machine_width, machine_depth)",
|
||||||
"enabled": "resolveOrValue('adhesion_type') == 'brim'",
|
"enabled": "resolveOrValue('adhesion_type') == 'brim'",
|
||||||
"settable_per_mesh": false,
|
"settable_per_mesh": false,
|
||||||
"settable_per_extruder": true,
|
"settable_per_extruder": true,
|
||||||
|
@ -4704,6 +4705,7 @@
|
||||||
"default_value": 20,
|
"default_value": 20,
|
||||||
"minimum_value": "0",
|
"minimum_value": "0",
|
||||||
"maximum_value_warning": "50 / skirt_brim_line_width",
|
"maximum_value_warning": "50 / skirt_brim_line_width",
|
||||||
|
"maximum_value": "0.5 * min(machine_width, machine_depth) / skirt_brim_line_width",
|
||||||
"value": "math.ceil(brim_width / (skirt_brim_line_width * initial_layer_line_width_factor / 100.0))",
|
"value": "math.ceil(brim_width / (skirt_brim_line_width * initial_layer_line_width_factor / 100.0))",
|
||||||
"enabled": "resolveOrValue('adhesion_type') == 'brim'",
|
"enabled": "resolveOrValue('adhesion_type') == 'brim'",
|
||||||
"settable_per_mesh": false,
|
"settable_per_mesh": false,
|
||||||
|
|
|
@ -58,6 +58,7 @@ Item
|
||||||
|
|
||||||
property alias showProfileFolder: showProfileFolderAction;
|
property alias showProfileFolder: showProfileFolderAction;
|
||||||
property alias documentation: documentationAction;
|
property alias documentation: documentationAction;
|
||||||
|
property alias showTroubleshooting: showTroubleShootingAction
|
||||||
property alias reportBug: reportBugAction;
|
property alias reportBug: reportBugAction;
|
||||||
property alias about: aboutAction;
|
property alias about: aboutAction;
|
||||||
|
|
||||||
|
@ -69,18 +70,26 @@ Item
|
||||||
|
|
||||||
UM.I18nCatalog{id: catalog; name: "cura"}
|
UM.I18nCatalog{id: catalog; name: "cura"}
|
||||||
|
|
||||||
|
|
||||||
|
Action
|
||||||
|
{
|
||||||
|
id: showTroubleShootingAction
|
||||||
|
onTriggered: Qt.openUrlExternally("https://ultimaker.com/en/troubleshooting")
|
||||||
|
text: catalog.i18nc("@action:inmenu", "Show Online Troubleshooting Guide");
|
||||||
|
}
|
||||||
|
|
||||||
Action
|
Action
|
||||||
{
|
{
|
||||||
id:toggleFullScreenAction
|
id:toggleFullScreenAction
|
||||||
shortcut: StandardKey.FullScreen;
|
shortcut: StandardKey.FullScreen;
|
||||||
text: catalog.i18nc("@action:inmenu","Toggle Full Screen");
|
text: catalog.i18nc("@action:inmenu", "Toggle Full Screen");
|
||||||
iconName: "view-fullscreen";
|
iconName: "view-fullscreen";
|
||||||
}
|
}
|
||||||
|
|
||||||
Action
|
Action
|
||||||
{
|
{
|
||||||
id: undoAction;
|
id: undoAction;
|
||||||
text: catalog.i18nc("@action:inmenu menubar:edit","&Undo");
|
text: catalog.i18nc("@action:inmenu menubar:edit", "&Undo");
|
||||||
iconName: "edit-undo";
|
iconName: "edit-undo";
|
||||||
shortcut: StandardKey.Undo;
|
shortcut: StandardKey.Undo;
|
||||||
onTriggered: UM.OperationStack.undo();
|
onTriggered: UM.OperationStack.undo();
|
||||||
|
|
|
@ -97,6 +97,7 @@ Item
|
||||||
title: catalog.i18nc("@title:menu menubar:toplevel", "&Help")
|
title: catalog.i18nc("@title:menu menubar:toplevel", "&Help")
|
||||||
|
|
||||||
MenuItem { action: Cura.Actions.showProfileFolder }
|
MenuItem { action: Cura.Actions.showProfileFolder }
|
||||||
|
MenuItem { action: Cura.Actions.showTroubleshooting}
|
||||||
MenuItem { action: Cura.Actions.documentation }
|
MenuItem { action: Cura.Actions.documentation }
|
||||||
MenuItem { action: Cura.Actions.reportBug }
|
MenuItem { action: Cura.Actions.reportBug }
|
||||||
MenuSeparator { }
|
MenuSeparator { }
|
||||||
|
|
|
@ -97,6 +97,7 @@ Item
|
||||||
spacing: UM.Theme.getSize("narrow_margin").height
|
spacing: UM.Theme.getSize("narrow_margin").height
|
||||||
width: container.width - ((height > container.maximumHeight) ? container.ScrollBar.vertical.background.width : 0) //Make room for scroll bar if there is any.
|
width: container.width - ((height > container.maximumHeight) ? container.ScrollBar.vertical.background.width : 0) //Make room for scroll bar if there is any.
|
||||||
height: childrenRect.height
|
height: childrenRect.height
|
||||||
|
interactive: false // let the ScrollView process scroll events.
|
||||||
|
|
||||||
section.property: "modelData.printerType"
|
section.property: "modelData.printerType"
|
||||||
section.criteria: ViewSection.FullString
|
section.criteria: ViewSection.FullString
|
||||||
|
|
|
@ -68,11 +68,6 @@ Item
|
||||||
// TODO Create a reusable component with these properties to not define them separately for each component
|
// TODO Create a reusable component with these properties to not define them separately for each component
|
||||||
labelColumnWidth: parent.firstColumnWidth
|
labelColumnWidth: parent.firstColumnWidth
|
||||||
}
|
}
|
||||||
|
|
||||||
RecommendedTroubleshootingGuides
|
|
||||||
{
|
|
||||||
width: parent.width
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
UM.SettingPropertyProvider
|
UM.SettingPropertyProvider
|
||||||
|
|
|
@ -1,36 +0,0 @@
|
||||||
// Copyright (c) 2019 Ultimaker B.V.
|
|
||||||
// Cura is released under the terms of the LGPLv3 or higher.
|
|
||||||
|
|
||||||
import QtQuick 2.10
|
|
||||||
import QtQuick.Controls 1.4
|
|
||||||
import QtQuick.Controls.Styles 1.4
|
|
||||||
|
|
||||||
import UM 1.2 as UM
|
|
||||||
import Cura 1.0 as Cura
|
|
||||||
|
|
||||||
|
|
||||||
Item
|
|
||||||
{
|
|
||||||
id: tipsCell
|
|
||||||
anchors.top: adhesionCheckBox.visible ? adhesionCheckBox.bottom : (enableSupportCheckBox.visible ? supportExtruderCombobox.bottom : infillCellRight.bottom)
|
|
||||||
anchors.topMargin: Math.round(UM.Theme.getSize("default_margin").height * 2)
|
|
||||||
anchors.left: parent.left
|
|
||||||
width: parent.width
|
|
||||||
height: tipsText.contentHeight * tipsText.lineCount
|
|
||||||
|
|
||||||
Label
|
|
||||||
{
|
|
||||||
id: tipsText
|
|
||||||
anchors.left: parent.left
|
|
||||||
anchors.leftMargin: UM.Theme.getSize("default_margin").width
|
|
||||||
anchors.right: parent.right
|
|
||||||
anchors.rightMargin: UM.Theme.getSize("default_margin").width
|
|
||||||
anchors.top: parent.top
|
|
||||||
wrapMode: Text.WordWrap
|
|
||||||
text: catalog.i18nc("@label", "Need help improving your prints?<br>Read the <a href='%1'>Ultimaker Troubleshooting Guides</a>").arg("https://ultimaker.com/en/troubleshooting")
|
|
||||||
font: UM.Theme.getFont("default")
|
|
||||||
color: UM.Theme.getColor("text")
|
|
||||||
linkColor: UM.Theme.getColor("text_link")
|
|
||||||
onLinkActivated: Qt.openUrlExternally(link)
|
|
||||||
}
|
|
||||||
}
|
|
Loading…
Add table
Add a link
Reference in a new issue