mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-14 05:15:52 +08:00
Merge branch '3.0'
This commit is contained in:
commit
30c9ccfb7f
@ -1359,6 +1359,10 @@ class CuraApplication(QtApplication):
|
|||||||
# Find node location
|
# Find node location
|
||||||
offset_shape_arr, hull_shape_arr = ShapeArray.fromNode(node, min_offset = min_offset)
|
offset_shape_arr, hull_shape_arr = ShapeArray.fromNode(node, min_offset = min_offset)
|
||||||
|
|
||||||
|
# If a model is to small then it will not contain any points
|
||||||
|
if offset_shape_arr is None and hull_shape_arr is None:
|
||||||
|
return
|
||||||
|
|
||||||
# Step is for skipping tests to make it a lot faster. it also makes the outcome somewhat rougher
|
# Step is for skipping tests to make it a lot faster. it also makes the outcome somewhat rougher
|
||||||
node, _ = arranger.findNodePlacement(node, offset_shape_arr, hull_shape_arr, step = 10)
|
node, _ = arranger.findNodePlacement(node, offset_shape_arr, hull_shape_arr, step = 10)
|
||||||
|
|
||||||
|
@ -46,6 +46,10 @@ class ShapeArray:
|
|||||||
# For one_at_a_time printing you need the convex hull head.
|
# For one_at_a_time printing you need the convex hull head.
|
||||||
hull_head_verts = node.callDecoration("getConvexHullHead") or hull_verts
|
hull_head_verts = node.callDecoration("getConvexHullHead") or hull_verts
|
||||||
|
|
||||||
|
# If a model is to small then it will not contain any points
|
||||||
|
if not hull_verts.getPoints().any():
|
||||||
|
return None, None
|
||||||
|
|
||||||
offset_verts = hull_head_verts.getMinkowskiHull(Polygon.approximatedCircle(min_offset))
|
offset_verts = hull_head_verts.getMinkowskiHull(Polygon.approximatedCircle(min_offset))
|
||||||
offset_points = copy.deepcopy(offset_verts._points) # x, y
|
offset_points = copy.deepcopy(offset_verts._points) # x, y
|
||||||
offset_points[:, 0] = numpy.add(offset_points[:, 0], -transform_x)
|
offset_points[:, 0] = numpy.add(offset_points[:, 0], -transform_x)
|
||||||
|
@ -136,7 +136,7 @@ Rectangle
|
|||||||
anchors.rightMargin: UM.Theme.getSize("sidebar_margin").width
|
anchors.rightMargin: UM.Theme.getSize("sidebar_margin").width
|
||||||
anchors.top:
|
anchors.top:
|
||||||
{
|
{
|
||||||
if (settingsModeLabel.contentWidth >= parent.width - width - UM.Theme.getSize("sidebar_margin").width)
|
if (settingsModeLabel.contentWidth >= parent.width - width - UM.Theme.getSize("sidebar_margin").width * 2)
|
||||||
{
|
{
|
||||||
return settingsModeLabel.bottom;
|
return settingsModeLabel.bottom;
|
||||||
}
|
}
|
||||||
@ -186,12 +186,18 @@ Rectangle
|
|||||||
UM.Theme.getColor("action_button")
|
UM.Theme.getColor("action_button")
|
||||||
Behavior on color { ColorAnimation { duration: 50; } }
|
Behavior on color { ColorAnimation { duration: 50; } }
|
||||||
Label {
|
Label {
|
||||||
anchors.centerIn: parent
|
anchors.left: parent.left
|
||||||
|
anchors.right: parent.right
|
||||||
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
|
anchors.leftMargin: UM.Theme.getSize("default_lining").width * 2
|
||||||
|
anchors.rightMargin: UM.Theme.getSize("default_lining").width * 2
|
||||||
color: (control.checked || control.pressed) ? UM.Theme.getColor("action_button_active_text") :
|
color: (control.checked || control.pressed) ? UM.Theme.getColor("action_button_active_text") :
|
||||||
control.hovered ? UM.Theme.getColor("action_button_hovered_text") :
|
control.hovered ? UM.Theme.getColor("action_button_hovered_text") :
|
||||||
UM.Theme.getColor("action_button_text")
|
UM.Theme.getColor("action_button_text")
|
||||||
font: UM.Theme.getFont("default")
|
font: UM.Theme.getFont("default")
|
||||||
text: control.text;
|
text: control.text
|
||||||
|
horizontalAlignment: Text.AlignHCenter
|
||||||
|
elide: Text.ElideMiddle
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
label: Item { }
|
label: Item { }
|
||||||
|
@ -316,10 +316,13 @@ Item
|
|||||||
anchors.top: speedSlider.bottom
|
anchors.top: speedSlider.bottom
|
||||||
|
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
|
anchors.right: speedSlider.left
|
||||||
|
anchors.rightMargin: UM.Theme.getSize("default_margin").width
|
||||||
|
|
||||||
text: catalog.i18nc("@label", "Print Speed")
|
text: catalog.i18nc("@label", "Print Speed")
|
||||||
font: UM.Theme.getFont("default")
|
font: UM.Theme.getFont("default")
|
||||||
color: UM.Theme.getColor("text")
|
color: UM.Theme.getColor("text")
|
||||||
|
elide: Text.ElideRight
|
||||||
}
|
}
|
||||||
|
|
||||||
Label
|
Label
|
||||||
|
Loading…
x
Reference in New Issue
Block a user