mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-14 13:46:01 +08:00
Merge branch 'master' of https://github.com/Ultimaker/Cura
This commit is contained in:
commit
eda781ce7b
@ -270,7 +270,7 @@ class ExtruderManager(QObject):
|
|||||||
return []
|
return []
|
||||||
|
|
||||||
# Get the extruders of all printable meshes in the scene
|
# Get the extruders of all printable meshes in the scene
|
||||||
meshes = [node for node in DepthFirstIterator(scene_root) if type(node) is SceneNode and node.isSelectable()]
|
meshes = [node for node in DepthFirstIterator(scene_root) if isinstance(node, SceneNode) and node.isSelectable()]
|
||||||
for mesh in meshes:
|
for mesh in meshes:
|
||||||
extruder_stack_id = mesh.callDecoration("getActiveExtruder")
|
extruder_stack_id = mesh.callDecoration("getActiveExtruder")
|
||||||
if not extruder_stack_id:
|
if not extruder_stack_id:
|
||||||
|
@ -198,23 +198,24 @@ class CuraEngineBackend(QObject, Backend):
|
|||||||
self._slice_start_time = time()
|
self._slice_start_time = time()
|
||||||
if not self._build_plates_to_be_sliced:
|
if not self._build_plates_to_be_sliced:
|
||||||
self.processingProgress.emit(1.0)
|
self.processingProgress.emit(1.0)
|
||||||
self.backendStateChange.emit(BackendState.Done)
|
|
||||||
Logger.log("w", "Slice unnecessary, nothing has changed that needs reslicing.")
|
Logger.log("w", "Slice unnecessary, nothing has changed that needs reslicing.")
|
||||||
return
|
return
|
||||||
|
|
||||||
if self._process_layers_job:
|
if self._process_layers_job:
|
||||||
Logger.log("d", " ## Process layers job still busy, trying later")
|
Logger.log("d", " ## Process layers job still busy, trying later")
|
||||||
self._invokeSlice()
|
|
||||||
return
|
return
|
||||||
|
|
||||||
|
if not hasattr(self._scene, "gcode_list"):
|
||||||
|
self._scene.gcode_list = {}
|
||||||
|
|
||||||
# see if we really have to slice
|
# see if we really have to slice
|
||||||
active_build_plate = Application.getInstance().getBuildPlateModel().activeBuildPlate
|
active_build_plate = Application.getInstance().getBuildPlateModel().activeBuildPlate
|
||||||
build_plate_to_be_sliced = self._build_plates_to_be_sliced.pop(0)
|
build_plate_to_be_sliced = self._build_plates_to_be_sliced.pop(0)
|
||||||
Logger.log("d", "Going to slice build plate [%s]!" % build_plate_to_be_sliced)
|
Logger.log("d", "Going to slice build plate [%s]!" % build_plate_to_be_sliced)
|
||||||
num_objects = self._numObjects()
|
num_objects = self._numObjects()
|
||||||
if build_plate_to_be_sliced not in num_objects or num_objects[build_plate_to_be_sliced] == 0:
|
if build_plate_to_be_sliced not in num_objects or num_objects[build_plate_to_be_sliced] == 0:
|
||||||
|
self._scene.gcode_list[build_plate_to_be_sliced] = []
|
||||||
Logger.log("d", "Build plate %s has 0 objects to be sliced, skipping", build_plate_to_be_sliced)
|
Logger.log("d", "Build plate %s has 0 objects to be sliced, skipping", build_plate_to_be_sliced)
|
||||||
self._invokeSlice()
|
|
||||||
return
|
return
|
||||||
|
|
||||||
self._stored_layer_data = []
|
self._stored_layer_data = []
|
||||||
@ -231,8 +232,6 @@ class CuraEngineBackend(QObject, Backend):
|
|||||||
self.processingProgress.emit(0.0)
|
self.processingProgress.emit(0.0)
|
||||||
self.backendStateChange.emit(BackendState.NotStarted)
|
self.backendStateChange.emit(BackendState.NotStarted)
|
||||||
|
|
||||||
if not hasattr(self._scene, "gcode_list"):
|
|
||||||
self._scene.gcode_list = {}
|
|
||||||
self._scene.gcode_list[build_plate_to_be_sliced] = [] #[] indexed by build plate number
|
self._scene.gcode_list[build_plate_to_be_sliced] = [] #[] indexed by build plate number
|
||||||
self._slicing = True
|
self._slicing = True
|
||||||
self.slicingStarted.emit()
|
self.slicingStarted.emit()
|
||||||
@ -357,6 +356,18 @@ class CuraEngineBackend(QObject, Backend):
|
|||||||
else:
|
else:
|
||||||
self.backendStateChange.emit(BackendState.NotStarted)
|
self.backendStateChange.emit(BackendState.NotStarted)
|
||||||
|
|
||||||
|
if job.getResult() == StartSliceJob.StartJobResult.NothingToSlice:
|
||||||
|
if Application.getInstance().platformActivity:
|
||||||
|
self._error_message = Message(catalog.i18nc("@info:status", "Nothing to slice because none of the models fit the build volume. Please scale or rotate models to fit."),
|
||||||
|
title = catalog.i18nc("@info:title", "Unable to slice"))
|
||||||
|
self._error_message.show()
|
||||||
|
self.backendStateChange.emit(BackendState.Error)
|
||||||
|
else:
|
||||||
|
self.backendStateChange.emit(BackendState.NotStarted)
|
||||||
|
pass
|
||||||
|
self._invokeSlice()
|
||||||
|
return
|
||||||
|
|
||||||
# Preparation completed, send it to the backend.
|
# Preparation completed, send it to the backend.
|
||||||
self._socket.sendMessage(job.getSliceMessage())
|
self._socket.sendMessage(job.getSliceMessage())
|
||||||
|
|
||||||
|
@ -3854,12 +3854,11 @@
|
|||||||
"support_tree_branch_diameter_angle":
|
"support_tree_branch_diameter_angle":
|
||||||
{
|
{
|
||||||
"label": "Tree Support Branch Diameter Angle",
|
"label": "Tree Support Branch Diameter Angle",
|
||||||
"description": "The angle of the branches' diameter as they gradually become thicker towards the bottom. An angle of 0 will cause the branches to have uniform thickness over their length. A negative angle makes them thinner towards the bottom, so be careful as they might disappear. A small positive angle can increase stability of the tree support.",
|
"description": "The angle of the branches' diameter as they gradually become thicker towards the bottom. An angle of 0 will cause the branches to have uniform thickness over their length. A bit of an angle can increase stability of the tree support.",
|
||||||
"unit": "°",
|
"unit": "°",
|
||||||
"type": "float",
|
"type": "float",
|
||||||
"minimum_value": "-89.9999",
|
"minimum_value": "0",
|
||||||
"maximum_value": "89.9999",
|
"maximum_value": "89.9999",
|
||||||
"minimum_value_warning": "0",
|
|
||||||
"maximum_value_warning": "15",
|
"maximum_value_warning": "15",
|
||||||
"default_value": 5,
|
"default_value": 5,
|
||||||
"limit_to_extruder": "support_infill_extruder_nr",
|
"limit_to_extruder": "support_infill_extruder_nr",
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
import QtQuick 2.8
|
import QtQuick 2.8
|
||||||
import QtQuick.Controls 2.1
|
import QtQuick.Controls 2.1
|
||||||
import QtQuick.Layouts 1.1
|
import QtQuick.Layouts 1.3
|
||||||
|
|
||||||
import UM 1.2 as UM
|
import UM 1.2 as UM
|
||||||
import Cura 1.0 as Cura
|
import Cura 1.0 as Cura
|
||||||
|
@ -1,9 +1,8 @@
|
|||||||
// Copyright (c) 2015 Ultimaker B.V.
|
// Copyright (c) 2015 Ultimaker B.V.
|
||||||
// Cura is released under the terms of the LGPLv3 or higher.
|
// Cura is released under the terms of the LGPLv3 or higher.
|
||||||
|
|
||||||
import QtQuick 2.0
|
import QtQuick 2.8
|
||||||
|
import QtQuick.Controls 2.1
|
||||||
import QtQuick.Controls 1.2
|
|
||||||
|
|
||||||
import "Settings"
|
import "Settings"
|
||||||
|
|
||||||
|
@ -1,17 +1,17 @@
|
|||||||
// Copyright (c) 2017 Ultimaker B.V.
|
// Copyright (c) 2017 Ultimaker B.V.
|
||||||
// Cura is released under the terms of the LGPLv3 or higher.
|
// Cura is released under the terms of the LGPLv3 or higher.
|
||||||
|
|
||||||
import QtQuick 2.2
|
import QtQuick 2.8
|
||||||
import QtQuick.Controls 1.1
|
import QtQuick.Controls 1.4
|
||||||
import QtQuick.Controls.Styles 1.1
|
import QtQuick.Controls.Styles 1.4
|
||||||
import QtQuick.Layouts 1.1
|
import QtQuick.Layouts 1.3
|
||||||
|
|
||||||
import UM 1.2 as UM
|
import UM 1.2 as UM
|
||||||
import Cura 1.2 as Cura
|
import Cura 1.2 as Cura
|
||||||
|
|
||||||
Item
|
Item
|
||||||
{
|
{
|
||||||
id: base;
|
id: base
|
||||||
|
|
||||||
signal showTooltip(Item item, point location, string text);
|
signal showTooltip(Item item, point location, string text);
|
||||||
signal hideTooltip();
|
signal hideTooltip();
|
||||||
@ -70,6 +70,18 @@ Item
|
|||||||
onActiveVariantChanged: qualityModel.update()
|
onActiveVariantChanged: qualityModel.update()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Connections {
|
||||||
|
target: base
|
||||||
|
onVisibleChanged:
|
||||||
|
{
|
||||||
|
// update needs to be called when the widgets are visible, otherwise the step width calculation
|
||||||
|
// will fail because the width of an invisible item is 0.
|
||||||
|
if (visible) {
|
||||||
|
qualityModel.update();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
ListModel
|
ListModel
|
||||||
{
|
{
|
||||||
id: qualityModel
|
id: qualityModel
|
||||||
@ -103,7 +115,7 @@ Item
|
|||||||
if (Cura.SimpleModeSettingsManager.isProfileUserCreated) {
|
if (Cura.SimpleModeSettingsManager.isProfileUserCreated) {
|
||||||
qualityModel.qualitySliderActiveIndex = -1
|
qualityModel.qualitySliderActiveIndex = -1
|
||||||
} else {
|
} else {
|
||||||
qualityModel.qualitySliderActiveIndex = i
|
qualityModel.qualitySliderActiveIndex = i
|
||||||
}
|
}
|
||||||
|
|
||||||
qualityModel.existingQualityProfile = 1
|
qualityModel.existingQualityProfile = 1
|
||||||
@ -183,11 +195,10 @@ Item
|
|||||||
text:
|
text:
|
||||||
{
|
{
|
||||||
var result = ""
|
var result = ""
|
||||||
if(Cura.MachineManager.activeMachine != null){
|
if (Cura.MachineManager.activeMachine != null) {
|
||||||
|
result = Cura.ProfilesModel.getItem(index).layer_height_without_unit
|
||||||
|
|
||||||
var result = Cura.ProfilesModel.getItem(index).layer_height_without_unit
|
if (result == undefined)
|
||||||
|
|
||||||
if(result == undefined)
|
|
||||||
result = ""
|
result = ""
|
||||||
}
|
}
|
||||||
return result
|
return result
|
||||||
|
Loading…
x
Reference in New Issue
Block a user