mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-19 22:09:15 +08:00
Merge branch 'master' of https://github.com/Ultimaker/Cura.git into master-CURA-1923
This commit is contained in:
commit
7c6df5a485
@ -28,6 +28,7 @@ from cura.SetParentOperation import SetParentOperation
|
|||||||
|
|
||||||
from UM.Settings.SettingDefinition import SettingDefinition, DefinitionPropertyType
|
from UM.Settings.SettingDefinition import SettingDefinition, DefinitionPropertyType
|
||||||
from UM.Settings.ContainerRegistry import ContainerRegistry
|
from UM.Settings.ContainerRegistry import ContainerRegistry
|
||||||
|
from UM.Settings.SettingFunction import SettingFunction
|
||||||
|
|
||||||
from UM.i18n import i18nCatalog
|
from UM.i18n import i18nCatalog
|
||||||
|
|
||||||
@ -71,7 +72,6 @@ except ImportError:
|
|||||||
CuraVersion = "master" # [CodeStyle: Reflecting imported value]
|
CuraVersion = "master" # [CodeStyle: Reflecting imported value]
|
||||||
CuraBuildType = ""
|
CuraBuildType = ""
|
||||||
|
|
||||||
|
|
||||||
class CuraApplication(QtApplication):
|
class CuraApplication(QtApplication):
|
||||||
class ResourceTypes:
|
class ResourceTypes:
|
||||||
QmlFiles = Resources.UserType + 1
|
QmlFiles = Resources.UserType + 1
|
||||||
@ -100,6 +100,9 @@ class CuraApplication(QtApplication):
|
|||||||
SettingDefinition.addSupportedProperty("global_inherits_stack", DefinitionPropertyType.Function, default = "-1")
|
SettingDefinition.addSupportedProperty("global_inherits_stack", DefinitionPropertyType.Function, default = "-1")
|
||||||
SettingDefinition.addSettingType("extruder", None, str, Validator)
|
SettingDefinition.addSettingType("extruder", None, str, Validator)
|
||||||
|
|
||||||
|
SettingFunction.registerOperator("extruderValues", cura.Settings.ExtruderManager.getExtruderValues)
|
||||||
|
SettingFunction.registerOperator("extruderValue", cura.Settings.ExtruderManager.getExtruderValue)
|
||||||
|
|
||||||
## Add the 4 types of profiles to storage.
|
## Add the 4 types of profiles to storage.
|
||||||
Resources.addStorageType(self.ResourceTypes.QualityInstanceContainer, "quality")
|
Resources.addStorageType(self.ResourceTypes.QualityInstanceContainer, "quality")
|
||||||
Resources.addStorageType(self.ResourceTypes.VariantInstanceContainer, "variants")
|
Resources.addStorageType(self.ResourceTypes.VariantInstanceContainer, "variants")
|
||||||
@ -235,7 +238,7 @@ class CuraApplication(QtApplication):
|
|||||||
support
|
support
|
||||||
support_enable
|
support_enable
|
||||||
support_type
|
support_type
|
||||||
support_roof_density
|
support_interface_density
|
||||||
platform_adhesion
|
platform_adhesion
|
||||||
adhesion_type
|
adhesion_type
|
||||||
brim_width
|
brim_width
|
||||||
|
@ -44,6 +44,7 @@ class MachineAction(QObject, PluginObject):
|
|||||||
# /sa _reset
|
# /sa _reset
|
||||||
@pyqtSlot()
|
@pyqtSlot()
|
||||||
def reset(self):
|
def reset(self):
|
||||||
|
self._component = None
|
||||||
self._finished = False
|
self._finished = False
|
||||||
self._reset()
|
self._reset()
|
||||||
|
|
||||||
|
@ -35,6 +35,8 @@ class PrinterOutputDevice(QObject, OutputDevice):
|
|||||||
self._time_total = 0
|
self._time_total = 0
|
||||||
self._job_state = ""
|
self._job_state = ""
|
||||||
self._job_name = ""
|
self._job_name = ""
|
||||||
|
self._error_text = ""
|
||||||
|
self._accepts_commands = True
|
||||||
|
|
||||||
def requestWrite(self, node, file_name = None, filter_by_machine = False):
|
def requestWrite(self, node, file_name = None, filter_by_machine = False):
|
||||||
raise NotImplementedError("requestWrite needs to be implemented")
|
raise NotImplementedError("requestWrite needs to be implemented")
|
||||||
@ -77,6 +79,10 @@ class PrinterOutputDevice(QObject, OutputDevice):
|
|||||||
|
|
||||||
jobNameChanged = pyqtSignal()
|
jobNameChanged = pyqtSignal()
|
||||||
|
|
||||||
|
errorTextChanged = pyqtSignal()
|
||||||
|
|
||||||
|
acceptsCommandsChanged = pyqtSignal()
|
||||||
|
|
||||||
@pyqtProperty(str, notify = jobStateChanged)
|
@pyqtProperty(str, notify = jobStateChanged)
|
||||||
def jobState(self):
|
def jobState(self):
|
||||||
return self._job_state
|
return self._job_state
|
||||||
@ -102,6 +108,26 @@ class PrinterOutputDevice(QObject, OutputDevice):
|
|||||||
self._job_name = name
|
self._job_name = name
|
||||||
self.jobNameChanged.emit()
|
self.jobNameChanged.emit()
|
||||||
|
|
||||||
|
@pyqtProperty(str, notify = errorTextChanged)
|
||||||
|
def errorText(self):
|
||||||
|
return self._error_text
|
||||||
|
|
||||||
|
## Set the error-text that is shown in the print monitor in case of an error
|
||||||
|
def setErrorText(self, error_text):
|
||||||
|
if self._error_text != error_text:
|
||||||
|
self._error_text = error_text
|
||||||
|
self.errorTextChanged.emit()
|
||||||
|
|
||||||
|
@pyqtProperty(bool, notify = acceptsCommandsChanged)
|
||||||
|
def acceptsCommands(self):
|
||||||
|
return self._accepts_commands
|
||||||
|
|
||||||
|
## Set a flag to signal the UI that the printer is not (yet) ready to receive commands
|
||||||
|
def setAcceptsCommands(self, accepts_commands):
|
||||||
|
if self._accepts_commands != accepts_commands:
|
||||||
|
self._accepts_commands = accepts_commands
|
||||||
|
self.acceptsCommandsChanged.emit()
|
||||||
|
|
||||||
## Get the bed temperature of the bed (if any)
|
## Get the bed temperature of the bed (if any)
|
||||||
# This function is "final" (do not re-implement)
|
# This function is "final" (do not re-implement)
|
||||||
# /sa _getBedTemperature implementation function
|
# /sa _getBedTemperature implementation function
|
||||||
|
@ -6,6 +6,7 @@ from PyQt5.QtCore import pyqtSignal, pyqtProperty, pyqtSlot, QObject, QVariant #
|
|||||||
import UM.Application #To get the global container stack to find the current machine.
|
import UM.Application #To get the global container stack to find the current machine.
|
||||||
import UM.Logger
|
import UM.Logger
|
||||||
import UM.Settings.ContainerRegistry #Finding containers by ID.
|
import UM.Settings.ContainerRegistry #Finding containers by ID.
|
||||||
|
import UM.Settings.SettingFunction
|
||||||
|
|
||||||
|
|
||||||
## Manages all existing extruder stacks.
|
## Manages all existing extruder stacks.
|
||||||
@ -92,6 +93,15 @@ class ExtruderManager(QObject):
|
|||||||
return self._extruder_trains[global_container_stack.getId()][str(self._active_extruder_index)]
|
return self._extruder_trains[global_container_stack.getId()][str(self._active_extruder_index)]
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
## Get an extruder stack by index
|
||||||
|
def getExtruderStack(self, index):
|
||||||
|
global_container_stack = UM.Application.getInstance().getGlobalContainerStack()
|
||||||
|
if global_container_stack:
|
||||||
|
if global_container_stack.getId() in self._extruder_trains:
|
||||||
|
if str(index) in self._extruder_trains[global_container_stack.getId()]:
|
||||||
|
return self._extruder_trains[global_container_stack.getId()][str(index)]
|
||||||
|
return None
|
||||||
|
|
||||||
## Adds all extruders of a specific machine definition to the extruder
|
## Adds all extruders of a specific machine definition to the extruder
|
||||||
# manager.
|
# manager.
|
||||||
#
|
#
|
||||||
@ -273,3 +283,54 @@ class ExtruderManager(QObject):
|
|||||||
global_stack = UM.Application.getInstance().getGlobalContainerStack()
|
global_stack = UM.Application.getInstance().getGlobalContainerStack()
|
||||||
if global_stack and global_stack.getBottom():
|
if global_stack and global_stack.getBottom():
|
||||||
self.addMachineExtruders(global_stack.getBottom(), global_stack.getId())
|
self.addMachineExtruders(global_stack.getBottom(), global_stack.getId())
|
||||||
|
|
||||||
|
## Get all extruder values for a certain setting.
|
||||||
|
#
|
||||||
|
# This is exposed to SettingFunction so it can be used in value functions.
|
||||||
|
#
|
||||||
|
# \param key The key of the setting to retieve values for.
|
||||||
|
#
|
||||||
|
# \return A list of values for all extruders. If an extruder does not have a value, it will not be in the list.
|
||||||
|
# If no extruder has the value, the list will contain the global value.
|
||||||
|
@staticmethod
|
||||||
|
def getExtruderValues(key):
|
||||||
|
global_stack = UM.Application.getInstance().getGlobalContainerStack()
|
||||||
|
|
||||||
|
result = []
|
||||||
|
for extruder in ExtruderManager.getInstance().getMachineExtruders(global_stack.getId()):
|
||||||
|
value = extruder.getRawProperty(key, "value")
|
||||||
|
|
||||||
|
if not value:
|
||||||
|
continue
|
||||||
|
|
||||||
|
if isinstance(value, UM.Settings.SettingFunction):
|
||||||
|
value = value(extruder)
|
||||||
|
|
||||||
|
result.append(value)
|
||||||
|
|
||||||
|
if not result:
|
||||||
|
result.append(global_stack.getProperty(key, "value"))
|
||||||
|
|
||||||
|
return result
|
||||||
|
|
||||||
|
## Get the value for a setting from a specific extruder.
|
||||||
|
#
|
||||||
|
# This is exposed to SettingFunction to use in value functions.
|
||||||
|
#
|
||||||
|
# \param extruder_index The index of the extruder to get the value from.
|
||||||
|
# \param key The key of the setting to get the value of.
|
||||||
|
#
|
||||||
|
# \return The value of the setting for the specified extruder or None if not found.
|
||||||
|
@staticmethod
|
||||||
|
def getExtruderValue(extruder_index, key):
|
||||||
|
extruder = ExtruderManager.getInstance().getExtruderStack(extruder_index)
|
||||||
|
value = None
|
||||||
|
|
||||||
|
if extruder:
|
||||||
|
value = extruder.getRawProperty(key, "value")
|
||||||
|
if isinstance(value, UM.Settings.SettingFunction):
|
||||||
|
value = value(extruder)
|
||||||
|
else: #Just a value from global.
|
||||||
|
value = UM.Application.getInstance().getGlobalContainerStack().getProperty(key, "value")
|
||||||
|
|
||||||
|
return value
|
||||||
|
@ -553,7 +553,7 @@ class MachineManager(QObject):
|
|||||||
return ""
|
return ""
|
||||||
|
|
||||||
@pyqtSlot(str, str)
|
@pyqtSlot(str, str)
|
||||||
def renameQualityContainer(self, container_id, nbalew_name):
|
def renameQualityContainer(self, container_id, new_name):
|
||||||
containers = UM.Settings.ContainerRegistry.getInstance().findInstanceContainers(id = container_id, type = "quality")
|
containers = UM.Settings.ContainerRegistry.getInstance().findInstanceContainers(id = container_id, type = "quality")
|
||||||
if containers:
|
if containers:
|
||||||
new_name = self._createUniqueName("quality", containers[0].getName(), new_name,
|
new_name = self._createUniqueName("quality", containers[0].getName(), new_name,
|
||||||
@ -744,10 +744,7 @@ class MachineManager(QObject):
|
|||||||
# If the machine that is being removed is the currently active machine, set another machine as the active machine.
|
# If the machine that is being removed is the currently active machine, set another machine as the active machine.
|
||||||
activate_new_machine = (self._global_container_stack and self._global_container_stack.getId() == machine_id)
|
activate_new_machine = (self._global_container_stack and self._global_container_stack.getId() == machine_id)
|
||||||
|
|
||||||
stacks = UM.Settings.ContainerRegistry.getInstance().findContainerStacks(id = machine_id)
|
ExtruderManager.getInstance().removeMachineExtruders(machine_id)
|
||||||
if not stacks:
|
|
||||||
return
|
|
||||||
ExtruderManager.getInstance().removeMachineExtruders(stacks[0].getBottom().getId())
|
|
||||||
|
|
||||||
containers = UM.Settings.ContainerRegistry.getInstance().findInstanceContainers(type = "user", machine = machine_id)
|
containers = UM.Settings.ContainerRegistry.getInstance().findInstanceContainers(type = "user", machine = machine_id)
|
||||||
for container in containers:
|
for container in containers:
|
||||||
|
@ -10,6 +10,8 @@ from UM.Settings.InstanceContainer import InstanceContainer
|
|||||||
from UM.Settings.ContainerRegistry import ContainerRegistry
|
from UM.Settings.ContainerRegistry import ContainerRegistry
|
||||||
import UM.Logger
|
import UM.Logger
|
||||||
|
|
||||||
|
import cura.Settings
|
||||||
|
|
||||||
from UM.Application import Application
|
from UM.Application import Application
|
||||||
|
|
||||||
## A decorator that adds a container stack to a Node. This stack should be queried for all settings regarding
|
## A decorator that adds a container stack to a Node. This stack should be queried for all settings regarding
|
||||||
@ -26,7 +28,11 @@ class SettingOverrideDecorator(SceneNodeDecorator):
|
|||||||
self._stack.setDirty(False) # This stack does not need to be saved.
|
self._stack.setDirty(False) # This stack does not need to be saved.
|
||||||
self._instance = InstanceContainer(container_id = "SettingOverrideInstanceContainer")
|
self._instance = InstanceContainer(container_id = "SettingOverrideInstanceContainer")
|
||||||
self._stack.addContainer(self._instance)
|
self._stack.addContainer(self._instance)
|
||||||
self._extruder_stack = None #Stack upon which our stack is based.
|
|
||||||
|
if cura.Settings.ExtruderManager.getInstance().extruderCount > 1:
|
||||||
|
self._extruder_stack = cura.Settings.ExtruderManager.getInstance().activeExtruderStackId
|
||||||
|
else:
|
||||||
|
self._extruder_stack = None
|
||||||
|
|
||||||
self._stack.propertyChanged.connect(self._onSettingChanged)
|
self._stack.propertyChanged.connect(self._onSettingChanged)
|
||||||
|
|
||||||
@ -41,6 +47,10 @@ class SettingOverrideDecorator(SceneNodeDecorator):
|
|||||||
deep_copy = SettingOverrideDecorator()
|
deep_copy = SettingOverrideDecorator()
|
||||||
## Copy the instance
|
## Copy the instance
|
||||||
deep_copy._instance = copy.deepcopy(self._instance, memo)
|
deep_copy._instance = copy.deepcopy(self._instance, memo)
|
||||||
|
|
||||||
|
# Properly set the right extruder on the copy
|
||||||
|
deep_copy.setActiveExtruder(self._extruder_stack)
|
||||||
|
|
||||||
## Set the copied instance as the first (and only) instance container of the stack.
|
## Set the copied instance as the first (and only) instance container of the stack.
|
||||||
deep_copy._stack.replaceContainer(0, deep_copy._instance)
|
deep_copy._stack.replaceContainer(0, deep_copy._instance)
|
||||||
return deep_copy
|
return deep_copy
|
||||||
@ -61,7 +71,11 @@ class SettingOverrideDecorator(SceneNodeDecorator):
|
|||||||
if self._extruder_stack:
|
if self._extruder_stack:
|
||||||
extruder_stack = ContainerRegistry.getInstance().findContainerStacks(id = self._extruder_stack)
|
extruder_stack = ContainerRegistry.getInstance().findContainerStacks(id = self._extruder_stack)
|
||||||
if extruder_stack:
|
if extruder_stack:
|
||||||
|
if self._stack.getNextStack():
|
||||||
old_extruder_stack_id = self._stack.getNextStack().getId()
|
old_extruder_stack_id = self._stack.getNextStack().getId()
|
||||||
|
else:
|
||||||
|
old_extruder_stack_id = ""
|
||||||
|
|
||||||
self._stack.setNextStack(extruder_stack[0])
|
self._stack.setNextStack(extruder_stack[0])
|
||||||
if self._stack.getNextStack().getId() != old_extruder_stack_id: #Only reslice if the extruder changed.
|
if self._stack.getNextStack().getId() != old_extruder_stack_id: #Only reslice if the extruder changed.
|
||||||
Application.getInstance().getBackend().forceSlice()
|
Application.getInstance().getBackend().forceSlice()
|
||||||
|
@ -181,6 +181,11 @@ class CuraEngineBackend(Backend):
|
|||||||
self.slicingCancelled.emit()
|
self.slicingCancelled.emit()
|
||||||
self.processingProgress.emit(0)
|
self.processingProgress.emit(0)
|
||||||
Logger.log("d", "Attempting to kill the engine process")
|
Logger.log("d", "Attempting to kill the engine process")
|
||||||
|
|
||||||
|
if Application.getInstance().getCommandLineOption("external-backend", False):
|
||||||
|
self._createSocket()
|
||||||
|
return
|
||||||
|
|
||||||
if self._process is not None:
|
if self._process is not None:
|
||||||
Logger.log("d", "Killing engine process")
|
Logger.log("d", "Killing engine process")
|
||||||
try:
|
try:
|
||||||
|
@ -227,7 +227,7 @@ class StartSliceJob(Job):
|
|||||||
# global_inherits_stack property.
|
# global_inherits_stack property.
|
||||||
def _buildGlobalInheritsStackMessage(self, stack):
|
def _buildGlobalInheritsStackMessage(self, stack):
|
||||||
for key in stack.getAllKeys():
|
for key in stack.getAllKeys():
|
||||||
extruder = int(stack.getProperty(key, "global_inherits_stack"))
|
extruder = int(round(float(stack.getProperty(key, "global_inherits_stack"))))
|
||||||
if extruder >= 0: #Set to a specific extruder.
|
if extruder >= 0: #Set to a specific extruder.
|
||||||
setting_extruder = self._slice_message.addRepeatedMessage("global_inherits_stack")
|
setting_extruder = self._slice_message.addRepeatedMessage("global_inherits_stack")
|
||||||
setting_extruder.name = key
|
setting_extruder.name = key
|
||||||
|
@ -90,12 +90,20 @@ class GCodeWriter(MeshWriter):
|
|||||||
prefix_length = len(prefix)
|
prefix_length = len(prefix)
|
||||||
|
|
||||||
container_with_profile = stack.findContainer({"type": "quality"})
|
container_with_profile = stack.findContainer({"type": "quality"})
|
||||||
|
if not container_with_profile:
|
||||||
|
Logger.log("e", "No valid quality profile found, not writing settings to GCode!")
|
||||||
|
return ""
|
||||||
|
|
||||||
flat_global_container = self._createFlattenedContainerInstance(stack.getTop(),container_with_profile)
|
flat_global_container = self._createFlattenedContainerInstance(stack.getTop(),container_with_profile)
|
||||||
serialized = flat_global_container.serialize()
|
serialized = flat_global_container.serialize()
|
||||||
data = {"global_quality": serialized}
|
data = {"global_quality": serialized}
|
||||||
|
|
||||||
for extruder in ExtruderManager.getInstance().getMachineExtruders(stack.getId()):
|
for extruder in ExtruderManager.getInstance().getMachineExtruders(stack.getId()):
|
||||||
extruder_quality = extruder.findContainer({"type": "quality"})
|
extruder_quality = extruder.findContainer({"type": "quality"})
|
||||||
|
if not extruder_quality:
|
||||||
|
Logger.log("w", "No extruder quality profile found, not writing quality for extruder %s to file!", extruder.getId())
|
||||||
|
continue
|
||||||
|
|
||||||
flat_extruder_quality = self._createFlattenedContainerInstance(extruder.getTop(), extruder_quality)
|
flat_extruder_quality = self._createFlattenedContainerInstance(extruder.getTop(), extruder_quality)
|
||||||
|
|
||||||
extruder_serialized = flat_extruder_quality.serialize()
|
extruder_serialized = flat_extruder_quality.serialize()
|
||||||
|
@ -1,14 +1,18 @@
|
|||||||
|
# Copyright (c) 2016 Ultimaker B.V.
|
||||||
|
# Cura is released under the terms of the AGPLv3 or higher.
|
||||||
|
|
||||||
from PyQt5.QtCore import QObject, pyqtProperty, pyqtSignal
|
from PyQt5.QtCore import QObject, pyqtProperty, pyqtSignal
|
||||||
|
|
||||||
from UM.Application import Application
|
from UM.Application import Application
|
||||||
from UM.Settings.SettingInstance import SettingInstance
|
from UM.Settings.SettingInstance import SettingInstance
|
||||||
from UM.Logger import Logger
|
from UM.Logger import Logger
|
||||||
|
|
||||||
import UM.Settings.Models
|
import UM.Settings.Models
|
||||||
|
|
||||||
|
from cura.Settings.ExtruderManager import ExtruderManager #To get global-inherits-stack setting values from different extruders.
|
||||||
from cura.Settings.SettingOverrideDecorator import SettingOverrideDecorator
|
from cura.Settings.SettingOverrideDecorator import SettingOverrideDecorator
|
||||||
|
|
||||||
## The per object setting visibility handler ensures that only setting defintions that have a matching instance Container
|
## The per object setting visibility handler ensures that only setting
|
||||||
# are returned as visible.
|
# definitions that have a matching instance Container are returned as visible.
|
||||||
class PerObjectSettingVisibilityHandler(UM.Settings.Models.SettingVisibilityHandler):
|
class PerObjectSettingVisibilityHandler(UM.Settings.Models.SettingVisibilityHandler):
|
||||||
def __init__(self, parent = None, *args, **kwargs):
|
def __init__(self, parent = None, *args, **kwargs):
|
||||||
super().__init__(parent = parent, *args, **kwargs)
|
super().__init__(parent = parent, *args, **kwargs)
|
||||||
@ -54,10 +58,22 @@ class PerObjectSettingVisibilityHandler(UM.Settings.Models.SettingVisibilityHand
|
|||||||
if not settings.getInstance(item):
|
if not settings.getInstance(item):
|
||||||
definition = self._stack.getSettingDefinition(item)
|
definition = self._stack.getSettingDefinition(item)
|
||||||
if definition:
|
if definition:
|
||||||
settings.addInstance(SettingInstance(definition, settings))
|
new_instance = SettingInstance(definition, settings)
|
||||||
|
stack_nr = -1
|
||||||
|
if definition.global_inherits_stack and self._stack.getProperty("machine_extruder_count", "value") > 1:
|
||||||
|
#Obtain the value from the correct container stack. Only once, upon adding the setting.
|
||||||
|
stack_nr = str(int(round(float(self._stack.getProperty(item, "global_inherits_stack"))))) #Stack to get the setting from. Round it and remove the fractional part.
|
||||||
|
if stack_nr not in ExtruderManager.getInstance().extruderIds and self._stack.getProperty("extruder_nr", "value"): #Property not defined, but we have an extruder number.
|
||||||
|
stack_nr = str(int(round(float(self._stack.getProperty("extruder_nr", "value")))))
|
||||||
|
if stack_nr in ExtruderManager.getInstance().extruderIds: #We have either a global_inherits_stack or an extruder_nr.
|
||||||
|
stack = UM.Settings.ContainerRegistry.getInstance().findContainerStacks(id = ExtruderManager.getInstance().extruderIds[stack_nr])[0]
|
||||||
|
else:
|
||||||
|
stack = UM.Application.getInstance().getGlobalContainerStack()
|
||||||
|
new_instance.setProperty("value", stack.getProperty(item, "value"))
|
||||||
|
settings.addInstance(new_instance)
|
||||||
visibility_changed = True
|
visibility_changed = True
|
||||||
else:
|
else:
|
||||||
Logger.log("w", "Unable to add instance (%s) to perobject visibility because we couldn't find the matching definition", item)
|
Logger.log("w", "Unable to add instance (%s) to per-object visibility because we couldn't find the matching definition", item)
|
||||||
|
|
||||||
if visibility_changed:
|
if visibility_changed:
|
||||||
self.visibilityChanged.emit()
|
self.visibilityChanged.emit()
|
||||||
|
@ -127,11 +127,7 @@ Item {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Component.onCompleted:
|
|
||||||
{
|
|
||||||
// Ensure primary extruder is set as active
|
|
||||||
UM.ActiveTool.setProperty("SelectedActiveExtruder", extruders_model.getItem(0).id)
|
|
||||||
}
|
|
||||||
onActivated: UM.ActiveTool.setProperty("SelectedActiveExtruder", extruders_model.getItem(index).id);
|
onActivated: UM.ActiveTool.setProperty("SelectedActiveExtruder", extruders_model.getItem(index).id);
|
||||||
onModelChanged: updateCurrentIndex();
|
onModelChanged: updateCurrentIndex();
|
||||||
|
|
||||||
|
@ -8,6 +8,7 @@ from UM.Resources import Resources
|
|||||||
from UM.Application import Application
|
from UM.Application import Application
|
||||||
from UM.Preferences import Preferences
|
from UM.Preferences import Preferences
|
||||||
from UM.View.Renderer import Renderer
|
from UM.View.Renderer import Renderer
|
||||||
|
from UM.Settings.Validator import ValidatorState
|
||||||
|
|
||||||
from UM.View.GL.OpenGL import OpenGL
|
from UM.View.GL.OpenGL import OpenGL
|
||||||
|
|
||||||
@ -43,7 +44,7 @@ class SolidView(View):
|
|||||||
if Application.getInstance().getGlobalContainerStack():
|
if Application.getInstance().getGlobalContainerStack():
|
||||||
if Preferences.getInstance().getValue("view/show_overhang"):
|
if Preferences.getInstance().getValue("view/show_overhang"):
|
||||||
angle = Application.getInstance().getGlobalContainerStack().getProperty("support_angle", "value")
|
angle = Application.getInstance().getGlobalContainerStack().getProperty("support_angle", "value")
|
||||||
if angle is not None:
|
if angle is not None and Application.getInstance().getGlobalContainerStack().getProperty("support_angle", "validationState") == ValidatorState.Valid:
|
||||||
self._enabled_shader.setUniformValue("u_overhangAngle", math.cos(math.radians(90 - angle)))
|
self._enabled_shader.setUniformValue("u_overhangAngle", math.cos(math.radians(90 - angle)))
|
||||||
else:
|
else:
|
||||||
self._enabled_shader.setUniformValue("u_overhangAngle", math.cos(math.radians(0))) #Overhang angle of 0 causes no area at all to be marked as overhang.
|
self._enabled_shader.setUniformValue("u_overhangAngle", math.cos(math.radians(0))) #Overhang angle of 0 causes no area at all to be marked as overhang.
|
||||||
|
@ -34,7 +34,14 @@ _setting_name_translations = {
|
|||||||
"skirt_line_width": "skirt_brim_line_width",
|
"skirt_line_width": "skirt_brim_line_width",
|
||||||
"skirt_minimal_length": "skirt_brim_minimal_length",
|
"skirt_minimal_length": "skirt_brim_minimal_length",
|
||||||
"skirt_speed": "skirt_brim_speed",
|
"skirt_speed": "skirt_brim_speed",
|
||||||
"speed_support_lines": "speed_support_infill"
|
"speed_support_lines": "speed_support_infill",
|
||||||
|
"speed_support_roof": "speed_support_interface",
|
||||||
|
"support_roof_density": "support_interface_density",
|
||||||
|
"support_roof_enable": "support_interface_enable",
|
||||||
|
"support_roof_extruder_nr": "support_interface_extruder_nr",
|
||||||
|
"support_roof_line_distance": "support_interface_line_distance",
|
||||||
|
"support_roof_line_width": "support_interface_line_width",
|
||||||
|
"support_roof_pattern": "support_interface_pattern"
|
||||||
}
|
}
|
||||||
|
|
||||||
## How to translate variants of specific machines from the old version to the
|
## How to translate variants of specific machines from the old version to the
|
||||||
@ -146,32 +153,11 @@ class VersionUpgrade21to22(VersionUpgrade):
|
|||||||
for key, value in settings.items():
|
for key, value in settings.items():
|
||||||
if key == "fill_perimeter_gaps": #Setting is removed.
|
if key == "fill_perimeter_gaps": #Setting is removed.
|
||||||
del settings[key]
|
del settings[key]
|
||||||
elif key == "remove_overlapping_walls_0_enabled": #Setting is functionally replaced.
|
|
||||||
del settings[key]
|
|
||||||
settings["travel_compensate_overlapping_walls_0_enabled"] = value
|
|
||||||
elif key == "remove_overlapping_walls_enabled": #Setting is functionally replaced.
|
|
||||||
del settings[key]
|
|
||||||
settings["travel_compensate_overlapping_walls_enabled"] = value
|
|
||||||
elif key == "remove_overlapping_walls_x_enabled": #Setting is functionally replaced.
|
|
||||||
del settings[key]
|
|
||||||
settings["travel_compensate_overlapping_walls_x_enabled"] = value
|
|
||||||
elif key == "retraction_combing": #Combing was made into an enum instead of a boolean.
|
elif key == "retraction_combing": #Combing was made into an enum instead of a boolean.
|
||||||
settings[key] = "off" if (value == "False") else "all"
|
settings[key] = "off" if (value == "False") else "all"
|
||||||
elif key == "retraction_hop": #Setting key was changed.
|
elif key in _setting_name_translations:
|
||||||
del settings[key]
|
del settings[key]
|
||||||
settings["retraction_hop_enabled"] = value
|
settings[_setting_name_translations[key]] = value
|
||||||
elif key == "skirt_minimal_length": #Setting key was changed.
|
|
||||||
del settings[key]
|
|
||||||
settings["skirt_brim_minimal_length"] = value
|
|
||||||
elif key == "skirt_line_width": #Setting key was changed.
|
|
||||||
del settings[key]
|
|
||||||
settings["skirt_brim_line_width"] = value
|
|
||||||
elif key == "skirt_speed": #Setting key was changed.
|
|
||||||
del settings[key]
|
|
||||||
settings["skirt_brim_speed"] = value
|
|
||||||
elif key == "speed_support_lines": #Setting key was changed.
|
|
||||||
del settings[key]
|
|
||||||
settings["speed_support_infill"] = value
|
|
||||||
return settings
|
return settings
|
||||||
|
|
||||||
## Translates a setting name for the change from Cura 2.1 to 2.2.
|
## Translates a setting name for the change from Cura 2.1 to 2.2.
|
||||||
|
@ -506,7 +506,7 @@
|
|||||||
"default_value": 0.1,
|
"default_value": 0.1,
|
||||||
"minimum_value": "0.001",
|
"minimum_value": "0.001",
|
||||||
"minimum_value_warning": "0.04",
|
"minimum_value_warning": "0.04",
|
||||||
"maximum_value_warning": "0.8 * machine_nozzle_size",
|
"maximum_value_warning": "0.8 * min(extruderValues('machine_nozzle_size'))",
|
||||||
"settable_per_mesh": false,
|
"settable_per_mesh": false,
|
||||||
"settable_per_extruder": false
|
"settable_per_extruder": false
|
||||||
},
|
},
|
||||||
@ -519,7 +519,7 @@
|
|||||||
"default_value": 0.3,
|
"default_value": 0.3,
|
||||||
"minimum_value": "0.001",
|
"minimum_value": "0.001",
|
||||||
"minimum_value_warning": "0.04",
|
"minimum_value_warning": "0.04",
|
||||||
"maximum_value_warning": "0.8 * machine_nozzle_size",
|
"maximum_value_warning": "0.8 * min(extruderValues('machine_nozzle_size'))",
|
||||||
"settable_per_mesh": false,
|
"settable_per_mesh": false,
|
||||||
"settable_per_extruder": false
|
"settable_per_extruder": false
|
||||||
},
|
},
|
||||||
@ -635,16 +635,16 @@
|
|||||||
"settable_per_mesh": false,
|
"settable_per_mesh": false,
|
||||||
"settable_per_extruder": true
|
"settable_per_extruder": true
|
||||||
},
|
},
|
||||||
"support_roof_line_width":
|
"support_interface_line_width":
|
||||||
{
|
{
|
||||||
"label": "Support Roof Line Width",
|
"label": "Support Interface Line Width",
|
||||||
"description": "Width of a single support roof line.",
|
"description": "Width of a single support interface line.",
|
||||||
"unit": "mm",
|
"unit": "mm",
|
||||||
"default_value": 0.4,
|
"default_value": 0.4,
|
||||||
"minimum_value": "0.0001",
|
"minimum_value": "0.0001",
|
||||||
"maximum_value_warning": "machine_nozzle_size * 2",
|
"maximum_value_warning": "machine_nozzle_size * 2",
|
||||||
"type": "float",
|
"type": "float",
|
||||||
"enabled": "support_roof_enable",
|
"enabled": "extruderValue(support_extruder_nr, 'support_interface_enable')",
|
||||||
"value": "line_width",
|
"value": "line_width",
|
||||||
"settable_per_mesh": false,
|
"settable_per_mesh": false,
|
||||||
"settable_per_extruder": true
|
"settable_per_extruder": true
|
||||||
@ -1053,7 +1053,7 @@
|
|||||||
"unit": "°C",
|
"unit": "°C",
|
||||||
"type": "float",
|
"type": "float",
|
||||||
"default_value": 210,
|
"default_value": 210,
|
||||||
"minimum_value": "0",
|
"minimum_value": "-273.15",
|
||||||
"maximum_value_warning": "260",
|
"maximum_value_warning": "260",
|
||||||
"enabled": "not (material_flow_dependent_temperature)",
|
"enabled": "not (material_flow_dependent_temperature)",
|
||||||
"settable_per_mesh": false,
|
"settable_per_mesh": false,
|
||||||
@ -1066,6 +1066,7 @@
|
|||||||
"unit": "[[mm³,°C]]",
|
"unit": "[[mm³,°C]]",
|
||||||
"type": "str",
|
"type": "str",
|
||||||
"default_value": "[[3.5,200],[7.0,240]]",
|
"default_value": "[[3.5,200],[7.0,240]]",
|
||||||
|
"enabled": "False",
|
||||||
"comments": "old enabled function: material_flow_dependent_temperature",
|
"comments": "old enabled function: material_flow_dependent_temperature",
|
||||||
"settable_per_mesh": false,
|
"settable_per_mesh": false,
|
||||||
"settable_per_extruder": true
|
"settable_per_extruder": true
|
||||||
@ -1089,7 +1090,7 @@
|
|||||||
"unit": "°C",
|
"unit": "°C",
|
||||||
"type": "float",
|
"type": "float",
|
||||||
"default_value": 60,
|
"default_value": 60,
|
||||||
"minimum_value": "0",
|
"minimum_value": "-273.15",
|
||||||
"maximum_value_warning": "260",
|
"maximum_value_warning": "260",
|
||||||
"enabled": "machine_heated_bed",
|
"enabled": "machine_heated_bed",
|
||||||
"settable_per_mesh": false,
|
"settable_per_mesh": false,
|
||||||
@ -1268,7 +1269,7 @@
|
|||||||
"type": "float",
|
"type": "float",
|
||||||
"unit": "°C",
|
"unit": "°C",
|
||||||
"default_value": 150,
|
"default_value": 150,
|
||||||
"minimum_value": "0",
|
"minimum_value": "-273.15",
|
||||||
"maximum_value_warning": "260",
|
"maximum_value_warning": "260",
|
||||||
"settable_per_mesh": false,
|
"settable_per_mesh": false,
|
||||||
"settable_per_extruder": true
|
"settable_per_extruder": true
|
||||||
@ -1462,17 +1463,17 @@
|
|||||||
"settable_per_mesh": false,
|
"settable_per_mesh": false,
|
||||||
"settable_per_extruder": true
|
"settable_per_extruder": true
|
||||||
},
|
},
|
||||||
"speed_support_roof":
|
"speed_support_interface":
|
||||||
{
|
{
|
||||||
"label": "Support Roof Speed",
|
"label": "Support Interface Speed",
|
||||||
"description": "The speed at which the roofs of support are printed. Printing the support roof at lower speeds can improve overhang quality.",
|
"description": "The speed at which the roofs and bottoms of support are printed. Printing the them at lower speeds can improve overhang quality.",
|
||||||
"unit": "mm/s",
|
"unit": "mm/s",
|
||||||
"type": "float",
|
"type": "float",
|
||||||
"default_value": 40,
|
"default_value": 40,
|
||||||
"minimum_value": "0.1",
|
"minimum_value": "0.1",
|
||||||
"maximum_value": "299792458000",
|
"maximum_value": "299792458000",
|
||||||
"maximum_value_warning": "150",
|
"maximum_value_warning": "150",
|
||||||
"enabled": "support_roof_enable and support_enable",
|
"enabled": "extruderValue(support_extruder_nr, 'support_interface_enable') and support_enable",
|
||||||
"value": "speed_support / 1.5",
|
"value": "speed_support / 1.5",
|
||||||
"settable_per_mesh": false,
|
"settable_per_mesh": false,
|
||||||
"settable_per_extruder": true
|
"settable_per_extruder": true
|
||||||
@ -1545,8 +1546,8 @@
|
|||||||
"minimum_value": "0.1",
|
"minimum_value": "0.1",
|
||||||
"maximum_value": "299792458000",
|
"maximum_value": "299792458000",
|
||||||
"maximum_value_warning": "300",
|
"maximum_value_warning": "300",
|
||||||
"settable_per_mesh": true,
|
"settable_per_extruder": true,
|
||||||
"settable_per_extruder": true
|
"settable_per_mesh": false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -1693,9 +1694,9 @@
|
|||||||
"settable_per_mesh": false,
|
"settable_per_mesh": false,
|
||||||
"settable_per_extruder": true
|
"settable_per_extruder": true
|
||||||
},
|
},
|
||||||
"acceleration_support_roof": {
|
"acceleration_support_interface": {
|
||||||
"label": "Support Roof Acceleration",
|
"label": "Support Interface Acceleration",
|
||||||
"description": "The acceleration with which the roofs of support are printed. Printing the support roof at lower accelerations can improve overhang quality.",
|
"description": "The acceleration with which the roofs and bottoms of support are printed. Printing them at lower accelerations can improve overhang quality.",
|
||||||
"unit": "mm/s²",
|
"unit": "mm/s²",
|
||||||
"type": "float",
|
"type": "float",
|
||||||
"default_value": 3000,
|
"default_value": 3000,
|
||||||
@ -1703,7 +1704,7 @@
|
|||||||
"minimum_value": "0.1",
|
"minimum_value": "0.1",
|
||||||
"minimum_value_warning": "100",
|
"minimum_value_warning": "100",
|
||||||
"maximum_value_warning": "10000",
|
"maximum_value_warning": "10000",
|
||||||
"enabled": "acceleration_enabled and support_roof_enable and support_enable",
|
"enabled": "acceleration_enabled and extruderValue(support_extruder_nr, 'support_interface_enable') and support_enable",
|
||||||
"settable_per_mesh": false,
|
"settable_per_mesh": false,
|
||||||
"settable_per_extruder": true
|
"settable_per_extruder": true
|
||||||
}
|
}
|
||||||
@ -1748,8 +1749,39 @@
|
|||||||
"minimum_value_warning": "100",
|
"minimum_value_warning": "100",
|
||||||
"maximum_value_warning": "10000",
|
"maximum_value_warning": "10000",
|
||||||
"enabled": "acceleration_enabled",
|
"enabled": "acceleration_enabled",
|
||||||
|
"settable_per_mesh": true,
|
||||||
|
"children": {
|
||||||
|
"acceleration_print_layer_0":
|
||||||
|
{
|
||||||
|
"label": "Initial Layer Print Acceleration",
|
||||||
|
"description": "The acceleration during the printing of the initial layer.",
|
||||||
|
"unit": "mm/s",
|
||||||
|
"type": "float",
|
||||||
|
"default_value": 3000,
|
||||||
|
"value": "acceleration_layer_0",
|
||||||
|
"minimum_value": "0.1",
|
||||||
|
"minimum_value_warning": "100",
|
||||||
|
"maximum_value_warning": "10000",
|
||||||
|
"enabled": "acceleration_enabled",
|
||||||
"settable_per_mesh": true
|
"settable_per_mesh": true
|
||||||
},
|
},
|
||||||
|
"acceleration_travel_layer_0":
|
||||||
|
{
|
||||||
|
"label": "Initial Layer Travel Acceleration",
|
||||||
|
"description": "The acceleration for travel moves in the initial layer.",
|
||||||
|
"unit": "mm/s",
|
||||||
|
"type": "float",
|
||||||
|
"default_value": 3000,
|
||||||
|
"value": "acceleration_layer_0 * acceleration_travel / acceleration_print",
|
||||||
|
"minimum_value": "0.1",
|
||||||
|
"minimum_value_warning": "100",
|
||||||
|
"maximum_value_warning": "10000",
|
||||||
|
"enabled": "acceleration_enabled",
|
||||||
|
"settable_per_extruder": true,
|
||||||
|
"settable_per_mesh": false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"acceleration_skirt_brim": {
|
"acceleration_skirt_brim": {
|
||||||
"label": "Skirt/Brim Acceleration",
|
"label": "Skirt/Brim Acceleration",
|
||||||
"description": "The acceleration with which the skirt and brim are printed. Normally this is done with the initial layer acceleration, but sometimes you might want to print the skirt or brim at a different acceleration.",
|
"description": "The acceleration with which the skirt and brim are printed. Normally this is done with the initial layer acceleration, but sometimes you might want to print the skirt or brim at a different acceleration.",
|
||||||
@ -1881,9 +1913,9 @@
|
|||||||
"settable_per_mesh": false,
|
"settable_per_mesh": false,
|
||||||
"settable_per_extruder": true
|
"settable_per_extruder": true
|
||||||
},
|
},
|
||||||
"jerk_support_roof": {
|
"jerk_support_interface": {
|
||||||
"label": "Support Roof Jerk",
|
"label": "Support Interface Jerk",
|
||||||
"description": "The maximum instantaneous velocity change with which the roofs of support are printed.",
|
"description": "The maximum instantaneous velocity change with which the roofs and bottoms of support are printed.",
|
||||||
"unit": "mm/s",
|
"unit": "mm/s",
|
||||||
"type": "float",
|
"type": "float",
|
||||||
"default_value": 20,
|
"default_value": 20,
|
||||||
@ -1891,7 +1923,7 @@
|
|||||||
"minimum_value": "0.1",
|
"minimum_value": "0.1",
|
||||||
"minimum_value_warning": "5",
|
"minimum_value_warning": "5",
|
||||||
"maximum_value_warning": "50",
|
"maximum_value_warning": "50",
|
||||||
"enabled": "jerk_enabled and support_roof_enable and support_enable",
|
"enabled": "jerk_enabled and extruderValue(support_extruder_nr, 'support_interface_enable') and support_enable",
|
||||||
"settable_per_mesh": false,
|
"settable_per_mesh": false,
|
||||||
"settable_per_extruder": true
|
"settable_per_extruder": true
|
||||||
}
|
}
|
||||||
@ -1936,8 +1968,39 @@
|
|||||||
"minimum_value_warning": "5",
|
"minimum_value_warning": "5",
|
||||||
"maximum_value_warning": "50",
|
"maximum_value_warning": "50",
|
||||||
"enabled": "jerk_enabled",
|
"enabled": "jerk_enabled",
|
||||||
|
"settable_per_mesh": true,
|
||||||
|
"children": {
|
||||||
|
"jerk_print_layer_0":
|
||||||
|
{
|
||||||
|
"label": "Initial Layer Print Jerk",
|
||||||
|
"description": "The maximum instantaneous velocity change during the printing of the initial layer.",
|
||||||
|
"unit": "mm/s",
|
||||||
|
"type": "float",
|
||||||
|
"default_value": 20,
|
||||||
|
"value": "jerk_layer_0",
|
||||||
|
"minimum_value": "0.1",
|
||||||
|
"minimum_value_warning": "5",
|
||||||
|
"maximum_value_warning": "50",
|
||||||
|
"enabled": "jerk_enabled",
|
||||||
"settable_per_mesh": true
|
"settable_per_mesh": true
|
||||||
},
|
},
|
||||||
|
"jerk_travel_layer_0":
|
||||||
|
{
|
||||||
|
"label": "Initial Layer Travel Jerk",
|
||||||
|
"description": "The acceleration for travel moves in the initial layer.",
|
||||||
|
"unit": "mm/s",
|
||||||
|
"type": "float",
|
||||||
|
"default_value": 20,
|
||||||
|
"value": "jerk_layer_0 * jerk_travel / jerk_print",
|
||||||
|
"minimum_value": "0.1",
|
||||||
|
"minimum_value_warning": "5",
|
||||||
|
"maximum_value_warning": "50",
|
||||||
|
"enabled": "jerk_enabled",
|
||||||
|
"settable_per_extruder": true,
|
||||||
|
"settable_per_mesh": false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"jerk_skirt_brim": {
|
"jerk_skirt_brim": {
|
||||||
"label": "Skirt/Brim Jerk",
|
"label": "Skirt/Brim Jerk",
|
||||||
"description": "The maximum instantaneous velocity change with which the skirt and brim are printed.",
|
"description": "The maximum instantaneous velocity change with which the skirt and brim are printed.",
|
||||||
@ -2207,7 +2270,7 @@
|
|||||||
"description": "Connect the ZigZags. This will increase the strength of the zig zag support structure.",
|
"description": "Connect the ZigZags. This will increase the strength of the zig zag support structure.",
|
||||||
"type": "bool",
|
"type": "bool",
|
||||||
"default_value": true,
|
"default_value": true,
|
||||||
"enabled": "support_enable and (support_pattern == \"zigzag\")",
|
"enabled": "support_enable and (support_pattern == 'zigzag')",
|
||||||
"settable_per_mesh": false,
|
"settable_per_mesh": false,
|
||||||
"settable_per_extruder": true
|
"settable_per_extruder": true
|
||||||
},
|
},
|
||||||
@ -2263,7 +2326,7 @@
|
|||||||
"default_value": 0.15,
|
"default_value": 0.15,
|
||||||
"type": "float",
|
"type": "float",
|
||||||
"enabled": "support_enable",
|
"enabled": "support_enable",
|
||||||
"value": "support_z_distance",
|
"value": "extruderValue(support_extruder_nr, 'support_z_distance')",
|
||||||
"global_inherits_stack": "support_extruder_nr",
|
"global_inherits_stack": "support_extruder_nr",
|
||||||
"settable_per_mesh": true
|
"settable_per_mesh": true
|
||||||
},
|
},
|
||||||
@ -2319,7 +2382,7 @@
|
|||||||
"default_value": 0.2,
|
"default_value": 0.2,
|
||||||
"value": "machine_nozzle_size / 2",
|
"value": "machine_nozzle_size / 2",
|
||||||
"global_inherits_stack": "support_extruder_nr",
|
"global_inherits_stack": "support_extruder_nr",
|
||||||
"enabled": "support_enable and support_xy_overrides_z=='z_overrides_xy'",
|
"enabled": "support_enable and extruderValue(support_extruder_nr, 'support_xy_overrides_z') == 'z_overrides_xy'",
|
||||||
"settable_per_mesh": true
|
"settable_per_mesh": true
|
||||||
},
|
},
|
||||||
"support_bottom_stair_step_height":
|
"support_bottom_stair_step_height":
|
||||||
@ -2374,62 +2437,96 @@
|
|||||||
"enabled": "support_enable",
|
"enabled": "support_enable",
|
||||||
"settable_per_mesh": true
|
"settable_per_mesh": true
|
||||||
},
|
},
|
||||||
"support_roof_enable":
|
"support_interface_enable":
|
||||||
{
|
{
|
||||||
"label": "Enable Support Roof",
|
"label": "Enable Support Interface",
|
||||||
"description": "Generate a dense top skin at the top of the support on which the model is printed.",
|
"description": "Generate a dense interface between the model and the support. This will create a skin at the top of the support on which the model is printed and at the bottom of the support, where it rests on the model.",
|
||||||
"type": "bool",
|
"type": "bool",
|
||||||
"default_value": false,
|
"default_value": false,
|
||||||
"global_inherits_stack": "support_extruder_nr",
|
"global_inherits_stack": "support_extruder_nr",
|
||||||
"enabled": "support_enable",
|
"enabled": "support_enable",
|
||||||
"settable_per_mesh": true
|
"settable_per_mesh": true
|
||||||
},
|
},
|
||||||
"support_roof_height":
|
"support_interface_height":
|
||||||
{
|
{
|
||||||
"label": "Support Roof Thickness",
|
"label": "Support Interface Thickness",
|
||||||
"description": "The thickness of the support roofs.",
|
"description": "The thickness of the interface of the support where it touches with the model on the bottom or the top.",
|
||||||
"unit": "mm",
|
"unit": "mm",
|
||||||
"type": "float",
|
"type": "float",
|
||||||
"default_value": 1,
|
"default_value": 1,
|
||||||
"minimum_value": "0",
|
"minimum_value": "0",
|
||||||
"global_inherits_stack": "support_extruder_nr",
|
"global_inherits_stack": "support_extruder_nr",
|
||||||
"maximum_value_warning": "10",
|
"maximum_value_warning": "10",
|
||||||
"enabled": "support_roof_enable and support_enable",
|
"enabled": "extruderValue(support_extruder_nr, 'support_interface_enable') and support_enable",
|
||||||
|
"settable_per_mesh": true,
|
||||||
|
"children":
|
||||||
|
{
|
||||||
|
"support_roof_height":
|
||||||
|
{
|
||||||
|
"label": "Support Roof Thickness",
|
||||||
|
"description": "The thickness of the support roofs. This controls the amount of dense layers at the top of the support on which the model rests.",
|
||||||
|
"unit": "mm",
|
||||||
|
"type": "float",
|
||||||
|
"default_value": 1,
|
||||||
|
"value": "extruderValue(support_extruder_nr, 'support_interface_height')",
|
||||||
|
"minimum_value": "0",
|
||||||
|
"global_inherits_stack": "support_extruder_nr",
|
||||||
|
"maximum_value_warning": "10",
|
||||||
|
"enabled": "extruderValue(support_extruder_nr, 'support_interface_enable') and support_enable",
|
||||||
"settable_per_mesh": true
|
"settable_per_mesh": true
|
||||||
},
|
},
|
||||||
"support_roof_density":
|
"support_bottom_height":
|
||||||
{
|
{
|
||||||
"label": "Support Roof Density",
|
"label": "Support Bottom Thickness",
|
||||||
"description": "Adjusts the density of the roof of the support structure. A higher value results in better overhangs, but the supports are harder to remove.",
|
"description": "The thickness of the support bottoms. This controls the number of dense layers are printed on top of places of a model on which support rests.",
|
||||||
|
"unit": "mm",
|
||||||
|
"type": "float",
|
||||||
|
"default_value": 1,
|
||||||
|
"value": "extruderValue(support_extruder_nr, 'support_interface_height')",
|
||||||
|
"minimum_value": "0",
|
||||||
|
"minimum_value_warning": "extruderValue(support_extruder_nr, 'support_bottom_stair_step_height')",
|
||||||
|
"global_inherits_stack": "support_extruder_nr",
|
||||||
|
"maximum_value_warning": "10",
|
||||||
|
"enabled": "extruderValue(support_extruder_nr, 'support_interface_enable') and support_enable",
|
||||||
|
"settable_per_mesh": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"support_interface_density":
|
||||||
|
{
|
||||||
|
"label": "Support Interface Density",
|
||||||
|
"description": "Adjusts the density of the roofs and bottoms of the support structure. A higher value results in better overhangs, but the supports are harder to remove.",
|
||||||
"unit": "%",
|
"unit": "%",
|
||||||
"type": "float",
|
"type": "float",
|
||||||
"default_value": 100,
|
"default_value": 100,
|
||||||
"minimum_value": "0",
|
"minimum_value": "0",
|
||||||
"maximum_value_warning": "100",
|
"maximum_value_warning": "100",
|
||||||
"enabled":"support_roof_enable and support_enable",
|
"global_inherits_stack": "support_extruder_nr",
|
||||||
|
"enabled": "extruderValue(support_extruder_nr, 'support_interface_enable') and support_enable",
|
||||||
"settable_per_mesh": false,
|
"settable_per_mesh": false,
|
||||||
"settable_per_extruder": true,
|
"settable_per_extruder": true,
|
||||||
"children":
|
"children":
|
||||||
{
|
{
|
||||||
"support_roof_line_distance":
|
"support_interface_line_distance":
|
||||||
{
|
{
|
||||||
"label": "Support Roof Line Distance",
|
"label": "Support Interface Line Distance",
|
||||||
"description": "Distance between the printed support roof lines. This setting is calculated by the support roof Density, but can be adjusted separately.",
|
"description": "Distance between the printed support interface lines. This setting is calculated by the Support Interface Density, but can be adjusted separately.",
|
||||||
"unit": "mm",
|
"unit": "mm",
|
||||||
"type": "float",
|
"type": "float",
|
||||||
"default_value": 0.4,
|
"default_value": 0.4,
|
||||||
"minimum_value": "0",
|
"minimum_value": "0",
|
||||||
"value": "0 if support_roof_density == 0 else (support_roof_line_width * 100) / support_roof_density * (2 if support_roof_pattern == \"grid\" else (3 if support_roof_pattern == \"triangles\" else 1))",
|
"value": "0 if support_interface_density == 0 else (support_interface_line_width * 100) / support_interface_density * (2 if support_interface_pattern == \"grid\" else (3 if support_interface_pattern == \"triangles\" else 1))",
|
||||||
"enabled": "support_roof_enable and support_enable",
|
"global_inherits_stack": "support_extruder_nr",
|
||||||
|
"enabled": "extruderValue(support_extruder_nr, 'support_interface_enable') and support_enable",
|
||||||
"settable_per_mesh": false,
|
"settable_per_mesh": false,
|
||||||
"settable_per_extruder": true
|
"settable_per_extruder": true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"support_roof_pattern":
|
"support_interface_pattern":
|
||||||
{
|
{
|
||||||
"label": "Support Roof Pattern",
|
"label": "Support Interface Pattern",
|
||||||
"description": "The pattern with which the top of the support is printed.",
|
"description": "The pattern with which the interface of the support with the model is printed.",
|
||||||
"type": "enum",
|
"type": "enum",
|
||||||
"options":
|
"options":
|
||||||
{
|
{
|
||||||
@ -2440,7 +2537,8 @@
|
|||||||
"zigzag": "Zig Zag"
|
"zigzag": "Zig Zag"
|
||||||
},
|
},
|
||||||
"default_value": "concentric",
|
"default_value": "concentric",
|
||||||
"enabled": "support_roof_enable and support_enable",
|
"global_inherits_stack": "support_extruder_nr",
|
||||||
|
"enabled": "extruderValue(support_extruder_nr, 'support_interface_enable') and support_enable",
|
||||||
"settable_per_mesh": false,
|
"settable_per_mesh": false,
|
||||||
"settable_per_extruder": true
|
"settable_per_extruder": true
|
||||||
},
|
},
|
||||||
@ -2464,7 +2562,7 @@
|
|||||||
"global_inherits_stack": "support_extruder_nr",
|
"global_inherits_stack": "support_extruder_nr",
|
||||||
"minimum_value": "0",
|
"minimum_value": "0",
|
||||||
"maximum_value_warning": "10",
|
"maximum_value_warning": "10",
|
||||||
"enabled": "support_enable and support_use_towers",
|
"enabled": "support_enable and extruderValue(support_extruder_nr, 'support_use_towers')",
|
||||||
"settable_per_mesh": true
|
"settable_per_mesh": true
|
||||||
},
|
},
|
||||||
"support_minimal_diameter":
|
"support_minimal_diameter":
|
||||||
@ -2477,8 +2575,8 @@
|
|||||||
"global_inherits_stack": "support_extruder_nr",
|
"global_inherits_stack": "support_extruder_nr",
|
||||||
"minimum_value": "0",
|
"minimum_value": "0",
|
||||||
"maximum_value_warning": "10",
|
"maximum_value_warning": "10",
|
||||||
"maximum_value": "support_tower_diameter",
|
"maximum_value": "extruderValue(support_extruder_nr, 'support_tower_diameter')",
|
||||||
"enabled": "support_enable and support_use_towers",
|
"enabled": "support_enable and extruderValue(support_extruder_nr, 'support_use_towers')",
|
||||||
"settable_per_mesh": true
|
"settable_per_mesh": true
|
||||||
},
|
},
|
||||||
"support_tower_roof_angle":
|
"support_tower_roof_angle":
|
||||||
@ -2491,7 +2589,7 @@
|
|||||||
"maximum_value": "90",
|
"maximum_value": "90",
|
||||||
"default_value": 65,
|
"default_value": 65,
|
||||||
"global_inherits_stack": "support_extruder_nr",
|
"global_inherits_stack": "support_extruder_nr",
|
||||||
"enabled": "support_enable and support_use_towers",
|
"enabled": "support_enable and extruderValue(support_extruder_nr, 'support_use_towers')",
|
||||||
"settable_per_mesh": true
|
"settable_per_mesh": true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -3075,14 +3173,14 @@
|
|||||||
"settable_per_mesh": false,
|
"settable_per_mesh": false,
|
||||||
"settable_per_extruder": false
|
"settable_per_extruder": false
|
||||||
},
|
},
|
||||||
"support_roof_extruder_nr":
|
"support_interface_extruder_nr":
|
||||||
{
|
{
|
||||||
"label": "Support Roof Extruder",
|
"label": "Support Interface Extruder",
|
||||||
"description": "The extruder train to use for printing the roof of the support. This is used in multi-extrusion.",
|
"description": "The extruder train to use for printing the roofs and bottoms of the support. This is used in multi-extrusion.",
|
||||||
"type": "extruder",
|
"type": "extruder",
|
||||||
"default_value": "0",
|
"default_value": "0",
|
||||||
"value": "support_extruder_nr",
|
"value": "support_extruder_nr",
|
||||||
"enabled": "support_enable and support_roof_enable",
|
"enabled": "support_enable and extruderValue(support_extruder_nr, 'support_interface_enable')",
|
||||||
"settable_per_mesh": false,
|
"settable_per_mesh": false,
|
||||||
"settable_per_extruder": false
|
"settable_per_extruder": false
|
||||||
}
|
}
|
||||||
|
@ -54,13 +54,13 @@
|
|||||||
"speed_travel": { "default_value": 150 },
|
"speed_travel": { "default_value": 150 },
|
||||||
"speed_layer_0": {
|
"speed_layer_0": {
|
||||||
"minimum_value": "0.1",
|
"minimum_value": "0.1",
|
||||||
"default": 15.0
|
"default_value": 15.0
|
||||||
},
|
},
|
||||||
"infill_overlap": { "default": 10 },
|
"infill_overlap": { "default_value": 10 },
|
||||||
"cool_fan_enabled": { "default": false },
|
"cool_fan_enabled": { "default_value": false },
|
||||||
"cool_fan_speed": { "default": 0 },
|
"cool_fan_speed": { "default_value": 0 },
|
||||||
"skirt_line_count": { "default": 3 },
|
"skirt_line_count": { "default_value": 3 },
|
||||||
"skirt_gap": { "default": 4 },
|
"skirt_gap": { "default_value": 4 },
|
||||||
"skirt_brim_minimal_length": { "default": 200 }
|
"skirt_brim_minimal_length": { "default_value": 200 }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -7,5 +7,16 @@
|
|||||||
"author": "Ultimaker",
|
"author": "Ultimaker",
|
||||||
"manufacturer": "Ultimaker",
|
"manufacturer": "Ultimaker",
|
||||||
"visible": false
|
"visible": false
|
||||||
|
},
|
||||||
|
"overrides": {
|
||||||
|
"material_print_temperature": {
|
||||||
|
"minimum_value": "0"
|
||||||
|
},
|
||||||
|
"material_bed_temperature": {
|
||||||
|
"minimum_value": "0"
|
||||||
|
},
|
||||||
|
"material_standby_temperature": {
|
||||||
|
"minimum_value": "0"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -8,6 +8,7 @@
|
|||||||
"author": "Ultimaker",
|
"author": "Ultimaker",
|
||||||
"manufacturer": "Ultimaker",
|
"manufacturer": "Ultimaker",
|
||||||
"category": "Ultimaker",
|
"category": "Ultimaker",
|
||||||
|
"weight": 3,
|
||||||
"file_formats": "text/x-gcode",
|
"file_formats": "text/x-gcode",
|
||||||
"icon": "icon_ultimaker2.png",
|
"icon": "icon_ultimaker2.png",
|
||||||
"platform": "ultimaker2_platform.obj",
|
"platform": "ultimaker2_platform.obj",
|
||||||
@ -82,10 +83,10 @@
|
|||||||
"default_value": 45
|
"default_value": 45
|
||||||
},
|
},
|
||||||
"material_print_temperature": {
|
"material_print_temperature": {
|
||||||
"enabled": "False"
|
"enabled": "not (material_flow_dependent_temperature) and machine_gcode_flavor != \"UltiGCode\""
|
||||||
},
|
},
|
||||||
"material_bed_temperature": {
|
"material_bed_temperature": {
|
||||||
"enabled": "False"
|
"enabled": "machine_heated_bed and machine_gcode_flavor != \"UltiGCode\""
|
||||||
},
|
},
|
||||||
"machine_max_feedrate_x": {
|
"machine_max_feedrate_x": {
|
||||||
"default_value": 300
|
"default_value": 300
|
||||||
@ -103,22 +104,22 @@
|
|||||||
"default_value": 3000
|
"default_value": 3000
|
||||||
},
|
},
|
||||||
"material_diameter": {
|
"material_diameter": {
|
||||||
"enabled": "False"
|
"enabled": "machine_gcode_flavor != \"UltiGCode\""
|
||||||
},
|
},
|
||||||
"material_flow": {
|
"material_flow": {
|
||||||
"enabled": "False"
|
"enabled": "machine_gcode_flavor != \"UltiGCode\""
|
||||||
},
|
},
|
||||||
"retraction_amount": {
|
"retraction_amount": {
|
||||||
"enabled": "False"
|
"enabled": "retraction_enable and machine_gcode_flavor != \"UltiGCode\""
|
||||||
},
|
},
|
||||||
"retraction_speed": {
|
"retraction_speed": {
|
||||||
"enabled": "False"
|
"enabled": "retraction_enable and machine_gcode_flavor != \"UltiGCode\""
|
||||||
},
|
},
|
||||||
"retraction_retract_speed": {
|
"retraction_retract_speed": {
|
||||||
"enabled": "False"
|
"enabled": "retraction_enable and machine_gcode_flavor != \"UltiGCode\""
|
||||||
},
|
},
|
||||||
"retraction_prime_speed": {
|
"retraction_prime_speed": {
|
||||||
"enabled": "False"
|
"enabled": "retraction_enable and machine_gcode_flavor != \"UltiGCode\""
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -7,6 +7,7 @@
|
|||||||
"author": "Ultimaker",
|
"author": "Ultimaker",
|
||||||
"manufacturer": "Ultimaker",
|
"manufacturer": "Ultimaker",
|
||||||
"category": "Ultimaker",
|
"category": "Ultimaker",
|
||||||
|
"weight": 3,
|
||||||
"file_formats": "text/x-gcode",
|
"file_formats": "text/x-gcode",
|
||||||
"icon": "icon_ultimaker2.png",
|
"icon": "icon_ultimaker2.png",
|
||||||
"platform": "ultimaker2_platform.obj",
|
"platform": "ultimaker2_platform.obj",
|
||||||
|
@ -7,6 +7,7 @@
|
|||||||
"author": "Ultimaker",
|
"author": "Ultimaker",
|
||||||
"manufacturer": "Ultimaker",
|
"manufacturer": "Ultimaker",
|
||||||
"category": "Ultimaker",
|
"category": "Ultimaker",
|
||||||
|
"weight": 2,
|
||||||
"file_formats": "text/x-gcode",
|
"file_formats": "text/x-gcode",
|
||||||
"platform": "ultimaker2_platform.obj",
|
"platform": "ultimaker2_platform.obj",
|
||||||
"platform_texture": "Ultimaker2ExtendedPlusbackplate.png",
|
"platform_texture": "Ultimaker2ExtendedPlusbackplate.png",
|
||||||
|
@ -7,6 +7,7 @@
|
|||||||
"author": "Ultimaker",
|
"author": "Ultimaker",
|
||||||
"manufacturer": "Ultimaker",
|
"manufacturer": "Ultimaker",
|
||||||
"category": "Ultimaker",
|
"category": "Ultimaker",
|
||||||
|
"weight": 3,
|
||||||
"file_formats": "text/x-gcode",
|
"file_formats": "text/x-gcode",
|
||||||
"icon": "icon_ultimaker2.png",
|
"icon": "icon_ultimaker2.png",
|
||||||
"platform": "ultimaker2go_platform.obj",
|
"platform": "ultimaker2go_platform.obj",
|
||||||
|
@ -7,6 +7,7 @@
|
|||||||
"author": "Ultimaker",
|
"author": "Ultimaker",
|
||||||
"manufacturer": "Ultimaker",
|
"manufacturer": "Ultimaker",
|
||||||
"category": "Ultimaker",
|
"category": "Ultimaker",
|
||||||
|
"weight": 1,
|
||||||
"file_formats": "text/x-gcode",
|
"file_formats": "text/x-gcode",
|
||||||
"platform": "ultimaker2_platform.obj",
|
"platform": "ultimaker2_platform.obj",
|
||||||
"platform_texture": "Ultimaker2Plusbackplate.png",
|
"platform_texture": "Ultimaker2Plusbackplate.png",
|
||||||
|
@ -8,6 +8,7 @@
|
|||||||
"author": "Ultimaker",
|
"author": "Ultimaker",
|
||||||
"manufacturer": "Ultimaker",
|
"manufacturer": "Ultimaker",
|
||||||
"category": "Ultimaker",
|
"category": "Ultimaker",
|
||||||
|
"weight": 4,
|
||||||
"file_formats": "text/x-gcode",
|
"file_formats": "text/x-gcode",
|
||||||
"icon": "icon_ultimaker.png",
|
"icon": "icon_ultimaker.png",
|
||||||
"platform": "ultimaker_platform.stl",
|
"platform": "ultimaker_platform.stl",
|
||||||
|
@ -7,11 +7,13 @@
|
|||||||
"author": "Ultimaker",
|
"author": "Ultimaker",
|
||||||
"manufacturer": "Ultimaker",
|
"manufacturer": "Ultimaker",
|
||||||
"category": "Ultimaker",
|
"category": "Ultimaker",
|
||||||
|
"weight": 4,
|
||||||
"file_formats": "text/x-gcode",
|
"file_formats": "text/x-gcode",
|
||||||
"icon": "icon_ultimaker.png",
|
"icon": "icon_ultimaker.png",
|
||||||
"platform": "ultimaker2_platform.obj",
|
"platform": "ultimaker2_platform.obj",
|
||||||
"platform_texture": "UltimakerPlusbackplate.png",
|
"platform_texture": "UltimakerPlusbackplate.png",
|
||||||
"supported_actions":["UMOCheckup", "UpgradeFirmware", "BedLevel"]
|
"first_start_actions": ["UMOCheckup", "BedLevel"],
|
||||||
|
"supported_actions": ["UMOCheckup", "BedLevel", "UpgradeFirmware"]
|
||||||
},
|
},
|
||||||
|
|
||||||
"overrides": {
|
"overrides": {
|
||||||
|
@ -16,6 +16,7 @@ UM.Dialog
|
|||||||
{
|
{
|
||||||
id: base
|
id: base
|
||||||
title: catalog.i18nc("@title:window", "Add Printer")
|
title: catalog.i18nc("@title:window", "Add Printer")
|
||||||
|
property bool firstRun: false
|
||||||
property string preferredCategory: "Ultimaker"
|
property string preferredCategory: "Ultimaker"
|
||||||
property string activeCategory: preferredCategory
|
property string activeCategory: preferredCategory
|
||||||
|
|
||||||
@ -32,7 +33,7 @@ UM.Dialog
|
|||||||
signal machineAdded(string id)
|
signal machineAdded(string id)
|
||||||
function getMachineName()
|
function getMachineName()
|
||||||
{
|
{
|
||||||
var name = machineList.model.get(machineList.currentIndex).name
|
var name = machineList.model.getItem(machineList.currentIndex) != undefined ? machineList.model.getItem(machineList.currentIndex).name : ""
|
||||||
return name
|
return name
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -52,27 +53,15 @@ UM.Dialog
|
|||||||
{
|
{
|
||||||
id: machineList
|
id: machineList
|
||||||
|
|
||||||
model: ListModel
|
model: UM.DefinitionContainersModel
|
||||||
{
|
{
|
||||||
id: sortedMachineDefinitionsModel
|
id: machineDefinitionsModel
|
||||||
Component.onCompleted: {
|
filter: { "visible": true }
|
||||||
// DefinitionContainersModel is sorted alphabetically, but we want the preferred
|
sectionProperty: "category"
|
||||||
// category on top so we create a custom-sorted ListModel from it.
|
preferredSectionValue: preferredCategory
|
||||||
var items = [];
|
|
||||||
for(var i in machineDefinitionsModel.items) {
|
|
||||||
var item = machineDefinitionsModel.getItem(i);
|
|
||||||
if (item["category"] == preferredCategory)
|
|
||||||
sortedMachineDefinitionsModel.append(item);
|
|
||||||
else
|
|
||||||
items.push(item);
|
|
||||||
}
|
|
||||||
for(var i in items) {
|
|
||||||
sortedMachineDefinitionsModel.append(items[i]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
section.property: "category"
|
section.property: "section"
|
||||||
section.delegate: Button
|
section.delegate: Button
|
||||||
{
|
{
|
||||||
text: section
|
text: section
|
||||||
@ -111,11 +100,11 @@ UM.Dialog
|
|||||||
onClicked:
|
onClicked:
|
||||||
{
|
{
|
||||||
base.activeCategory = section;
|
base.activeCategory = section;
|
||||||
if (machineList.model.get(machineList.currentIndex).category != section) {
|
if (machineList.model.getItem(machineList.currentIndex).section != section) {
|
||||||
// Find the first machine from this category
|
// Find the first machine from this section
|
||||||
for(var i = 0; i < sortedMachineDefinitionsModel.count; i++) {
|
for(var i = 0; i < sortedMachineDefinitionsModel.count; i++) {
|
||||||
var item = sortedMachineDefinitionsModel.get(i);
|
var item = sortedMachineDefinitionsModel.getItem(i);
|
||||||
if (item.category == section) {
|
if (item.section == section) {
|
||||||
machineList.currentIndex = i;
|
machineList.currentIndex = i;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -150,7 +139,7 @@ UM.Dialog
|
|||||||
states: State
|
states: State
|
||||||
{
|
{
|
||||||
name: "collapsed";
|
name: "collapsed";
|
||||||
when: base.activeCategory != model.category;
|
when: base.activeCategory != model.section;
|
||||||
|
|
||||||
PropertyChanges { target: machineButton; opacity: 0; height: 0; }
|
PropertyChanges { target: machineButton; opacity: 0; height: 0; }
|
||||||
}
|
}
|
||||||
@ -194,14 +183,18 @@ UM.Dialog
|
|||||||
text: catalog.i18nc("@action:button", "Add Printer")
|
text: catalog.i18nc("@action:button", "Add Printer")
|
||||||
anchors.bottom: parent.bottom
|
anchors.bottom: parent.bottom
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
onClicked:
|
onClicked: addMachine()
|
||||||
|
}
|
||||||
|
|
||||||
|
onAccepted: addMachine()
|
||||||
|
|
||||||
|
function addMachine()
|
||||||
{
|
{
|
||||||
base.visible = false
|
base.visible = false
|
||||||
var item = machineList.model.get(machineList.currentIndex);
|
var item = machineList.model.getItem(machineList.currentIndex);
|
||||||
Cura.MachineManager.addMachine(machineName.text, item.id)
|
Cura.MachineManager.addMachine(machineName.text, item.id)
|
||||||
base.machineAdded(item.id) // Emit signal that the user added a machine.
|
base.machineAdded(item.id) // Emit signal that the user added a machine.
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
Item
|
Item
|
||||||
{
|
{
|
||||||
@ -210,11 +203,6 @@ UM.Dialog
|
|||||||
id: catalog;
|
id: catalog;
|
||||||
name: "cura";
|
name: "cura";
|
||||||
}
|
}
|
||||||
UM.DefinitionContainersModel
|
|
||||||
{
|
|
||||||
id: machineDefinitionsModel
|
|
||||||
filter: { "visible": true }
|
|
||||||
}
|
|
||||||
SystemPalette { id: palette }
|
SystemPalette { id: palette }
|
||||||
ExclusiveGroup { id: printerGroup; }
|
ExclusiveGroup { id: printerGroup; }
|
||||||
}
|
}
|
||||||
|
@ -1,32 +0,0 @@
|
|||||||
// Copyright (c) 2015 Ultimaker B.V.
|
|
||||||
// Cura is released under the terms of the AGPLv3 or higher.
|
|
||||||
|
|
||||||
import QtQuick 2.2
|
|
||||||
import QtQuick.Controls 1.1
|
|
||||||
import QtQuick.Layouts 1.1
|
|
||||||
import QtQuick.Window 2.1
|
|
||||||
|
|
||||||
import UM 1.1 as UM
|
|
||||||
import Cura 1.0 as Cura
|
|
||||||
|
|
||||||
import "WizardPages"
|
|
||||||
|
|
||||||
UM.Wizard
|
|
||||||
{
|
|
||||||
id: base;
|
|
||||||
|
|
||||||
title: catalog.i18nc("@title:window", "Add Printer")
|
|
||||||
|
|
||||||
// This part is optional
|
|
||||||
// This part checks whether there is a printer -> if not: some of the functions (delete for example) are disabled
|
|
||||||
firstRun: false
|
|
||||||
|
|
||||||
Component.onCompleted: {
|
|
||||||
base.appendPage(Qt.resolvedUrl("WizardPages/AddMachine.qml"), catalog.i18nc("@title", "Add Printer"));
|
|
||||||
base.currentPage = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
Item {
|
|
||||||
UM.I18nCatalog { id: catalog; name: "cura"; }
|
|
||||||
}
|
|
||||||
}
|
|
@ -677,6 +677,7 @@ UM.MainWindow
|
|||||||
id: addMachineDialog
|
id: addMachineDialog
|
||||||
onMachineAdded:
|
onMachineAdded:
|
||||||
{
|
{
|
||||||
|
machineActionsWizard.firstRun = addMachineDialog.firstRun
|
||||||
machineActionsWizard.start(id)
|
machineActionsWizard.start(id)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3,6 +3,10 @@ import QtQuick 2.2
|
|||||||
Item
|
Item
|
||||||
{
|
{
|
||||||
id: contentItem
|
id: contentItem
|
||||||
|
|
||||||
|
// Point to the dialog containing the displayItem
|
||||||
|
property var dialog
|
||||||
|
|
||||||
// Connect the finished property change to completed signal.
|
// Connect the finished property change to completed signal.
|
||||||
property var finished: manager.finished
|
property var finished: manager.finished
|
||||||
onFinishedChanged: if(manager.finished) {completed()}
|
onFinishedChanged: if(manager.finished) {completed()}
|
||||||
|
@ -15,25 +15,33 @@ Rectangle
|
|||||||
UM.I18nCatalog { id: catalog; name:"cura"}
|
UM.I18nCatalog { id: catalog; name:"cura"}
|
||||||
|
|
||||||
property bool printerConnected: Cura.MachineManager.printerOutputDevices.length != 0
|
property bool printerConnected: Cura.MachineManager.printerOutputDevices.length != 0
|
||||||
property real progress: printerConnected ? Cura.MachineManager.printerOutputDevices[0].progress : 0;
|
property bool printerAcceptsCommands: printerConnected && Cura.MachineManager.printerOutputDevices[0].acceptsCommands
|
||||||
property int backendState: UM.Backend.state;
|
property real progress: printerConnected ? Cura.MachineManager.printerOutputDevices[0].progress : 0
|
||||||
|
property int backendState: UM.Backend.state
|
||||||
|
|
||||||
property variant statusColor:
|
property variant statusColor:
|
||||||
{
|
{
|
||||||
if(!printerConnected)
|
if(!printerConnected || !printerAcceptsCommands)
|
||||||
return UM.Theme.getColor("status_offline")
|
return UM.Theme.getColor("text");
|
||||||
else if(Cura.MachineManager.printerOutputDevices[0].jobState == "printing" || Cura.MachineManager.printerOutputDevices[0].jobState == "pre_print" || Cura.MachineManager.printerOutputDevices[0].jobState == "wait_cleanup" )
|
|
||||||
return UM.Theme.getColor("status_busy")
|
switch(Cura.MachineManager.printerOutputDevices[0].jobState)
|
||||||
else if(Cura.MachineManager.printerOutputDevices[0].jobState == "ready" || Cura.MachineManager.printerOutputDevices[0].jobState == "")
|
{
|
||||||
return UM.Theme.getColor("status_ready")
|
case "printing":
|
||||||
else if(Cura.MachineManager.printerOutputDevices[0].jobState == "paused")
|
case "pre_print":
|
||||||
return UM.Theme.getColor("status_paused")
|
case "wait_cleanup":
|
||||||
else if (Cura.MachineManager.printerOutputDevices[0].jobState == "error")
|
return UM.Theme.getColor("status_busy");
|
||||||
return UM.Theme.getColor("status_stopped")
|
case "ready":
|
||||||
else if (Cura.MachineManager.printerOutputDevices[0].jobState == "offline")
|
case "":
|
||||||
return UM.Theme.getColor("status_offline")
|
return UM.Theme.getColor("status_ready");
|
||||||
else
|
case "paused":
|
||||||
return UM.Theme.getColor("text")
|
return UM.Theme.getColor("status_paused");
|
||||||
|
case "error":
|
||||||
|
return UM.Theme.getColor("status_stopped");
|
||||||
|
case "offline":
|
||||||
|
return UM.Theme.getColor("status_offline");
|
||||||
|
default:
|
||||||
|
return UM.Theme.getColor("text");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
property bool activity: Printer.getPlatformActivity;
|
property bool activity: Printer.getPlatformActivity;
|
||||||
@ -42,31 +50,28 @@ Rectangle
|
|||||||
property string statusText:
|
property string statusText:
|
||||||
{
|
{
|
||||||
if(!printerConnected)
|
if(!printerConnected)
|
||||||
{
|
return catalog.i18nc("@label:MonitorStatus", "Not connected to a printer");
|
||||||
return catalog.i18nc("@label:", "Not connected to a printer")
|
if(!printerAcceptsCommands)
|
||||||
} else if(Cura.MachineManager.printerOutputDevices[0].jobState == "offline")
|
return catalog.i18nc("@label:MonitorStatus", "Printer does not accept commands");
|
||||||
{
|
|
||||||
return catalog.i18nc("@label:", "Lost connection with the printer")
|
|
||||||
} else if(Cura.MachineManager.printerOutputDevices[0].jobState == "printing")
|
|
||||||
{
|
|
||||||
return catalog.i18nc("@label:", "Printing...")
|
|
||||||
} else if(Cura.MachineManager.printerOutputDevices[0].jobState == "paused")
|
|
||||||
{
|
|
||||||
return catalog.i18nc("@label:", "Paused")
|
|
||||||
}
|
|
||||||
else if(Cura.MachineManager.printerOutputDevices[0].jobState == "pre_print")
|
|
||||||
{
|
|
||||||
return catalog.i18nc("@label:", "Preparing...")
|
|
||||||
}
|
|
||||||
else if(Cura.MachineManager.printerOutputDevices[0].jobState == "wait_cleanup")
|
|
||||||
{
|
|
||||||
return catalog.i18nc("@label:", "Waiting for cleanup...")
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
return " "
|
|
||||||
}
|
|
||||||
|
|
||||||
|
var printerOutputDevice = Cura.MachineManager.printerOutputDevices[0]
|
||||||
|
switch(printerOutputDevice.jobState)
|
||||||
|
{
|
||||||
|
case "offline":
|
||||||
|
return catalog.i18nc("@label:MonitorStatus", "Lost connection with the printer");
|
||||||
|
case "printing":
|
||||||
|
return catalog.i18nc("@label:MonitorStatus", "Printing...");
|
||||||
|
case "paused":
|
||||||
|
return catalog.i18nc("@label:MonitorStatus", "Paused");
|
||||||
|
case "pre_print":
|
||||||
|
return catalog.i18nc("@label:MonitorStatus", "Preparing...");
|
||||||
|
case "wait_cleanup":
|
||||||
|
return catalog.i18nc("@label:MonitorStatus", "Please remove the print");
|
||||||
|
case "error":
|
||||||
|
return printerOutputDevice.errorText;
|
||||||
|
default:
|
||||||
|
return " ";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Label
|
Label
|
||||||
@ -79,7 +84,7 @@ Rectangle
|
|||||||
|
|
||||||
color: base.statusColor
|
color: base.statusColor
|
||||||
font: UM.Theme.getFont("large")
|
font: UM.Theme.getFont("large")
|
||||||
text: statusText;
|
text: statusText
|
||||||
}
|
}
|
||||||
|
|
||||||
Label
|
Label
|
||||||
@ -90,7 +95,7 @@ Rectangle
|
|||||||
|
|
||||||
color: base.statusColor
|
color: base.statusColor
|
||||||
font: UM.Theme.getFont("large")
|
font: UM.Theme.getFont("large")
|
||||||
text: Math.round(progress) + "%";
|
text: Math.round(progress) + "%"
|
||||||
visible: printerConnected
|
visible: printerConnected
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -120,7 +125,8 @@ Rectangle
|
|||||||
id: abortButton
|
id: abortButton
|
||||||
|
|
||||||
visible: printerConnected
|
visible: printerConnected
|
||||||
enabled: printerConnected && (Cura.MachineManager.printerOutputDevices[0].jobState == "paused" || Cura.MachineManager.printerOutputDevices[0].jobState == "printing")
|
enabled: printerConnected && Cura.MachineManager.printerOutputDevices[0].acceptsCommands &&
|
||||||
|
(Cura.MachineManager.printerOutputDevices[0].jobState == "paused" || Cura.MachineManager.printerOutputDevices[0].jobState == "printing")
|
||||||
|
|
||||||
height: UM.Theme.getSize("save_button_save_to_button").height
|
height: UM.Theme.getSize("save_button_save_to_button").height
|
||||||
anchors.top: progressBar.bottom
|
anchors.top: progressBar.bottom
|
||||||
@ -129,7 +135,7 @@ Rectangle
|
|||||||
anchors.rightMargin: UM.Theme.getSize("default_margin").width
|
anchors.rightMargin: UM.Theme.getSize("default_margin").width
|
||||||
|
|
||||||
text: catalog.i18nc("@label:", "Abort Print")
|
text: catalog.i18nc("@label:", "Abort Print")
|
||||||
onClicked: { Cura.MachineManager.printerOutputDevices[0].setJobState("abort") }
|
onClicked: Cura.MachineManager.printerOutputDevices[0].setJobState("abort")
|
||||||
|
|
||||||
|
|
||||||
style: ButtonStyle
|
style: ButtonStyle
|
||||||
@ -137,12 +143,28 @@ Rectangle
|
|||||||
background: Rectangle
|
background: Rectangle
|
||||||
{
|
{
|
||||||
border.width: UM.Theme.getSize("default_lining").width
|
border.width: UM.Theme.getSize("default_lining").width
|
||||||
border.color: !control.enabled ? UM.Theme.getColor("action_button_disabled_border") :
|
border.color:
|
||||||
control.pressed ? UM.Theme.getColor("action_button_active_border") :
|
{
|
||||||
control.hovered ? UM.Theme.getColor("action_button_hovered_border") : UM.Theme.getColor("action_button_border")
|
if(!control.enabled)
|
||||||
color: !control.enabled ? UM.Theme.getColor("action_button_disabled") :
|
return UM.Theme.getColor("action_button_disabled_border");
|
||||||
control.pressed ? UM.Theme.getColor("action_button_active") :
|
else if(control.pressed)
|
||||||
control.hovered ? UM.Theme.getColor("action_button_hovered") : UM.Theme.getColor("action_button")
|
return UM.Theme.getColor("action_button_active_border");
|
||||||
|
else if(control.hovered)
|
||||||
|
return UM.Theme.getColor("action_button_hovered_border");
|
||||||
|
else
|
||||||
|
return UM.Theme.getColor("action_button_border");
|
||||||
|
}
|
||||||
|
color:
|
||||||
|
{
|
||||||
|
if(!control.enabled)
|
||||||
|
return UM.Theme.getColor("action_button_disabled");
|
||||||
|
else if(control.pressed)
|
||||||
|
return UM.Theme.getColor("action_button_active");
|
||||||
|
else if(control.hovered)
|
||||||
|
return UM.Theme.getColor("action_button_hovered");
|
||||||
|
else
|
||||||
|
return UM.Theme.getColor("action_button");
|
||||||
|
}
|
||||||
Behavior on color { ColorAnimation { duration: 50; } }
|
Behavior on color { ColorAnimation { duration: 50; } }
|
||||||
|
|
||||||
implicitWidth: actualLabel.contentWidth + (UM.Theme.getSize("default_margin").width * 2)
|
implicitWidth: actualLabel.contentWidth + (UM.Theme.getSize("default_margin").width * 2)
|
||||||
@ -151,9 +173,17 @@ Rectangle
|
|||||||
{
|
{
|
||||||
id: actualLabel
|
id: actualLabel
|
||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
color: !control.enabled ? UM.Theme.getColor("action_button_disabled_text") :
|
color:
|
||||||
control.pressed ? UM.Theme.getColor("action_button_active_text") :
|
{
|
||||||
control.hovered ? UM.Theme.getColor("action_button_hovered_text") : UM.Theme.getColor("action_button_text")
|
if(!control.enabled)
|
||||||
|
return UM.Theme.getColor("action_button_disabled_text");
|
||||||
|
else if(control.pressed)
|
||||||
|
return UM.Theme.getColor("action_button_active_text");
|
||||||
|
else if(control.hovered)
|
||||||
|
return UM.Theme.getColor("action_button_hovered_text");
|
||||||
|
else
|
||||||
|
return UM.Theme.getColor("action_button_text");
|
||||||
|
}
|
||||||
font: UM.Theme.getFont("action_button")
|
font: UM.Theme.getFont("action_button")
|
||||||
text: control.text;
|
text: control.text;
|
||||||
}
|
}
|
||||||
@ -164,10 +194,7 @@ Rectangle
|
|||||||
|
|
||||||
Button
|
Button
|
||||||
{
|
{
|
||||||
id: pauseButton
|
id: pauseResumeButton
|
||||||
|
|
||||||
visible: printerConnected
|
|
||||||
enabled: printerConnected && (Cura.MachineManager.printerOutputDevices[0].jobState == "paused" || Cura.MachineManager.printerOutputDevices[0].jobState == "printing")
|
|
||||||
|
|
||||||
height: UM.Theme.getSize("save_button_save_to_button").height
|
height: UM.Theme.getSize("save_button_save_to_button").height
|
||||||
anchors.top: progressBar.bottom
|
anchors.top: progressBar.bottom
|
||||||
@ -175,20 +202,40 @@ Rectangle
|
|||||||
anchors.right: abortButton.left
|
anchors.right: abortButton.left
|
||||||
anchors.rightMargin: UM.Theme.getSize("default_margin").width
|
anchors.rightMargin: UM.Theme.getSize("default_margin").width
|
||||||
|
|
||||||
|
visible: printerConnected
|
||||||
|
enabled: printerConnected && Cura.MachineManager.printerOutputDevices[0].acceptsCommands &&
|
||||||
|
(Cura.MachineManager.printerOutputDevices[0].jobState == "paused" || Cura.MachineManager.printerOutputDevices[0].jobState == "printing")
|
||||||
|
|
||||||
text: printerConnected ? Cura.MachineManager.printerOutputDevices[0].jobState == "paused" ? catalog.i18nc("@label:", "Resume") : catalog.i18nc("@label:", "Pause") : ""
|
text: printerConnected ? Cura.MachineManager.printerOutputDevices[0].jobState == "paused" ? catalog.i18nc("@label:", "Resume") : catalog.i18nc("@label:", "Pause") : ""
|
||||||
onClicked: { Cura.MachineManager.printerOutputDevices[0].jobState == "paused" ? Cura.MachineManager.printerOutputDevices[0].setJobState("print") : Cura.MachineManager.printerOutputDevices[0].setJobState("pause") }
|
onClicked: Cura.MachineManager.printerOutputDevices[0].setJobState(Cura.MachineManager.printerOutputDevices[0].jobState == "paused" ? "print" : "pause")
|
||||||
|
|
||||||
style: ButtonStyle
|
style: ButtonStyle
|
||||||
{
|
{
|
||||||
background: Rectangle
|
background: Rectangle
|
||||||
{
|
{
|
||||||
border.width: UM.Theme.getSize("default_lining").width
|
border.width: UM.Theme.getSize("default_lining").width
|
||||||
border.color: !control.enabled ? UM.Theme.getColor("action_button_disabled_border") :
|
border.color:
|
||||||
control.pressed ? UM.Theme.getColor("action_button_active_border") :
|
{
|
||||||
control.hovered ? UM.Theme.getColor("action_button_hovered_border") : UM.Theme.getColor("action_button_border")
|
if(!control.enabled)
|
||||||
color: !control.enabled ? UM.Theme.getColor("action_button_disabled") :
|
return UM.Theme.getColor("action_button_disabled_border");
|
||||||
control.pressed ? UM.Theme.getColor("action_button_active") :
|
else if(control.pressed)
|
||||||
control.hovered ? UM.Theme.getColor("action_button_hovered") : UM.Theme.getColor("action_button")
|
return UM.Theme.getColor("action_button_active_border");
|
||||||
|
else if(control.hovered)
|
||||||
|
return UM.Theme.getColor("action_button_hovered_border");
|
||||||
|
else
|
||||||
|
return UM.Theme.getColor("action_button_border");
|
||||||
|
}
|
||||||
|
color:
|
||||||
|
{
|
||||||
|
if(!control.enabled)
|
||||||
|
return UM.Theme.getColor("action_button_disabled");
|
||||||
|
else if(control.pressed)
|
||||||
|
return UM.Theme.getColor("action_button_active");
|
||||||
|
else if(control.hovered)
|
||||||
|
return UM.Theme.getColor("action_button_hovered");
|
||||||
|
else
|
||||||
|
return UM.Theme.getColor("action_button");
|
||||||
|
}
|
||||||
Behavior on color { ColorAnimation { duration: 50; } }
|
Behavior on color { ColorAnimation { duration: 50; } }
|
||||||
|
|
||||||
implicitWidth: actualLabel.contentWidth + (UM.Theme.getSize("default_margin").width * 2)
|
implicitWidth: actualLabel.contentWidth + (UM.Theme.getSize("default_margin").width * 2)
|
||||||
@ -197,11 +244,19 @@ Rectangle
|
|||||||
{
|
{
|
||||||
id: actualLabel
|
id: actualLabel
|
||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
color: !control.enabled ? UM.Theme.getColor("action_button_disabled_text") :
|
color:
|
||||||
control.pressed ? UM.Theme.getColor("action_button_active_text") :
|
{
|
||||||
control.hovered ? UM.Theme.getColor("action_button_hovered_text") : UM.Theme.getColor("action_button_text")
|
if(!control.enabled)
|
||||||
|
return UM.Theme.getColor("action_button_disabled_text");
|
||||||
|
else if(control.pressed)
|
||||||
|
return UM.Theme.getColor("action_button_active_text");
|
||||||
|
else if(control.hovered)
|
||||||
|
return UM.Theme.getColor("action_button_hovered_text");
|
||||||
|
else
|
||||||
|
return UM.Theme.getColor("action_button_text");
|
||||||
|
}
|
||||||
font: UM.Theme.getFont("action_button")
|
font: UM.Theme.getFont("action_button")
|
||||||
text: control.text;
|
text: control.text
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
label: Item { }
|
label: Item { }
|
||||||
|
@ -69,6 +69,7 @@ UM.PreferencesPage
|
|||||||
|
|
||||||
Row
|
Row
|
||||||
{
|
{
|
||||||
|
spacing: UM.Theme.getSize("default_margin").width
|
||||||
Label
|
Label
|
||||||
{
|
{
|
||||||
id: languageLabel
|
id: languageLabel
|
||||||
|
@ -83,16 +83,17 @@ UM.ManagementPage
|
|||||||
Repeater
|
Repeater
|
||||||
{
|
{
|
||||||
id: machineActionRepeater
|
id: machineActionRepeater
|
||||||
model: Cura.MachineActionManager.getSupportedActions(Cura.MachineManager.getDefinitionByMachineId(base.currentItem.id))
|
model: base.currentItem ? Cura.MachineActionManager.getSupportedActions(Cura.MachineManager.getDefinitionByMachineId(base.currentItem.id)) : null
|
||||||
|
|
||||||
Button
|
Button
|
||||||
{
|
{
|
||||||
text: machineActionRepeater.model[index].label;
|
text: machineActionRepeater.model[index].label
|
||||||
onClicked:
|
onClicked:
|
||||||
{
|
{
|
||||||
actionDialog.content = machineActionRepeater.model[index].displayItem
|
actionDialog.content = machineActionRepeater.model[index].displayItem;
|
||||||
machineActionRepeater.model[index].displayItem.reset()
|
machineActionRepeater.model[index].displayItem.reset();
|
||||||
actionDialog.show()
|
actionDialog.title = machineActionRepeater.model[index].label;
|
||||||
|
actionDialog.show();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -106,12 +107,13 @@ UM.ManagementPage
|
|||||||
{
|
{
|
||||||
contents = content;
|
contents = content;
|
||||||
content.onCompleted.connect(hide)
|
content.onCompleted.connect(hide)
|
||||||
|
content.dialog = actionDialog
|
||||||
}
|
}
|
||||||
rightButtons: Button
|
rightButtons: Button
|
||||||
{
|
{
|
||||||
text: catalog.i18nc("@action:button", "Close")
|
text: catalog.i18nc("@action:button", "Close")
|
||||||
iconName: "dialog-close"
|
iconName: "dialog-close"
|
||||||
onClicked: actionDialog.accept()
|
onClicked: actionDialog.reject()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -124,8 +126,14 @@ UM.ManagementPage
|
|||||||
|
|
||||||
spacing: UM.Theme.getSize("default_margin").height
|
spacing: UM.Theme.getSize("default_margin").height
|
||||||
|
|
||||||
Label { text: catalog.i18nc("@label", "Type") }
|
Label
|
||||||
Label { text: base.currentItem ? base.currentItem.metadata.definition_name : "" }
|
{
|
||||||
|
text: catalog.i18nc("@label", "Type")
|
||||||
|
visible: base.currentItem && "definition_name" in base.currentItem.metadata
|
||||||
|
}
|
||||||
|
Label {
|
||||||
|
text: (base.currentItem && "definition_name" in base.currentItem.metadata) ? base.currentItem.metadata.definition_name : ""
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
UM.I18nCatalog { id: catalog; name: "uranium"; }
|
UM.I18nCatalog { id: catalog; name: "uranium"; }
|
||||||
|
@ -75,7 +75,7 @@ UM.ManagementPage
|
|||||||
onClicked:
|
onClicked:
|
||||||
{
|
{
|
||||||
var selectedContainer;
|
var selectedContainer;
|
||||||
if (objectList.currentItem.id == Cura.MachineManager.activeQualityId) {
|
if (base.currentItem.id == Cura.MachineManager.activeQualityId) {
|
||||||
selectedContainer = Cura.MachineManager.newQualityContainerFromQualityAndUser();
|
selectedContainer = Cura.MachineManager.newQualityContainerFromQualityAndUser();
|
||||||
} else {
|
} else {
|
||||||
selectedContainer = Cura.MachineManager.duplicateContainer(base.currentItem.id);
|
selectedContainer = Cura.MachineManager.duplicateContainer(base.currentItem.id);
|
||||||
|
@ -73,7 +73,7 @@ Column
|
|||||||
Label
|
Label
|
||||||
{
|
{
|
||||||
text: label
|
text: label
|
||||||
color: printerConnected ? UM.Theme.getColor("setting_control_text") : UM.Theme.getColor("setting_control_disabled_text")
|
color: printerConnected && printerAcceptsCommands ? UM.Theme.getColor("setting_control_text") : UM.Theme.getColor("setting_control_disabled_text")
|
||||||
font: UM.Theme.getFont("default")
|
font: UM.Theme.getFont("default")
|
||||||
width: base.width * 0.4
|
width: base.width * 0.4
|
||||||
elide: Text.ElideRight
|
elide: Text.ElideRight
|
||||||
@ -82,7 +82,7 @@ Column
|
|||||||
Label
|
Label
|
||||||
{
|
{
|
||||||
text: value
|
text: value
|
||||||
color: printerConnected ? UM.Theme.getColor("setting_control_text") : UM.Theme.getColor("setting_control_disabled_text")
|
color: printerConnected && printerAcceptsCommands ? UM.Theme.getColor("setting_control_text") : UM.Theme.getColor("setting_control_disabled_text")
|
||||||
font: UM.Theme.getFont("default")
|
font: UM.Theme.getFont("default")
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
}
|
}
|
||||||
|
@ -100,7 +100,7 @@ SettingItem
|
|||||||
|
|
||||||
maximumLength: 10;
|
maximumLength: 10;
|
||||||
|
|
||||||
validator: RegExpValidator { regExp: /[0-9.,-]{0,10}/ }
|
validator: RegExpValidator { regExp: (type == "int") ? /^-?[0-9]{0,10}/ : /^-?[0-9.,]{0,10}/ } //"type" property from parent loader used to disallow fractional number entry
|
||||||
|
|
||||||
Binding
|
Binding
|
||||||
{
|
{
|
||||||
|
@ -125,7 +125,7 @@ ScrollView
|
|||||||
{
|
{
|
||||||
id: provider
|
id: provider
|
||||||
|
|
||||||
containerStackId: delegate.stackId
|
containerStackId: Cura.MachineManager.activeMachineId
|
||||||
key: model.key ? model.key : ""
|
key: model.key ? model.key : ""
|
||||||
watchedProperties: [ "value", "enabled", "state", "validationState", "settable_per_extruder" ]
|
watchedProperties: [ "value", "enabled", "state", "validationState", "settable_per_extruder" ]
|
||||||
storeIndex: 0
|
storeIndex: 0
|
||||||
|
@ -28,6 +28,7 @@ Rectangle
|
|||||||
|
|
||||||
// Is there an output device for this printer?
|
// Is there an output device for this printer?
|
||||||
property bool printerConnected: Cura.MachineManager.printerOutputDevices.length != 0
|
property bool printerConnected: Cura.MachineManager.printerOutputDevices.length != 0
|
||||||
|
property bool printerAcceptsCommands: printerConnected && Cura.MachineManager.printerOutputDevices[0].acceptsCommands
|
||||||
|
|
||||||
color: UM.Theme.getColor("sidebar");
|
color: UM.Theme.getColor("sidebar");
|
||||||
UM.I18nCatalog { id: catalog; name:"cura"}
|
UM.I18nCatalog { id: catalog; name:"cura"}
|
||||||
@ -107,20 +108,29 @@ Rectangle
|
|||||||
onClicked: monitoringPrint = true
|
onClicked: monitoringPrint = true
|
||||||
iconSource: {
|
iconSource: {
|
||||||
if(!printerConnected)
|
if(!printerConnected)
|
||||||
return UM.Theme.getIcon("tab_monitor")
|
return UM.Theme.getIcon("tab_monitor");
|
||||||
else if(Cura.MachineManager.printerOutputDevices[0].jobState == "printing" || Cura.MachineManager.printerOutputDevices[0].jobState == "pre_print" || Cura.MachineManager.printerOutputDevices[0].jobState == "wait_cleanup" )
|
else if(!printerAcceptsCommands)
|
||||||
return UM.Theme.getIcon("tab_monitor_busy")
|
return UM.Theme.getIcon("tab_monitor_unknown");
|
||||||
else if(Cura.MachineManager.printerOutputDevices[0].jobState == "ready" || Cura.MachineManager.printerOutputDevices[0].jobState == "")
|
|
||||||
|
switch(Cura.MachineManager.printerOutputDevices[0].jobState)
|
||||||
|
{
|
||||||
|
case "printing":
|
||||||
|
case "pre_print":
|
||||||
|
case "wait_cleanup":
|
||||||
|
return UM.Theme.getIcon("tab_monitor_busy");
|
||||||
|
case "ready":
|
||||||
|
case "":
|
||||||
return UM.Theme.getIcon("tab_monitor_connected")
|
return UM.Theme.getIcon("tab_monitor_connected")
|
||||||
else if(Cura.MachineManager.printerOutputDevices[0].jobState == "paused")
|
case "paused":
|
||||||
return UM.Theme.getIcon("tab_monitor_paused")
|
return UM.Theme.getIcon("tab_monitor_paused")
|
||||||
else if (Cura.MachineManager.printerOutputDevices[0].jobState == "error")
|
case "error":
|
||||||
return UM.Theme.getIcon("tab_monitor_stopped")
|
return UM.Theme.getIcon("tab_monitor_stopped")
|
||||||
else if (Cura.MachineManager.printerOutputDevices[0].jobState == "offline")
|
case "offline":
|
||||||
return UM.Theme.getIcon("tab_monitor_offline")
|
return UM.Theme.getIcon("tab_monitor_offline")
|
||||||
else
|
default:
|
||||||
return UM.Theme.getIcon("tab_monitor")
|
return UM.Theme.getIcon("tab_monitor")
|
||||||
}
|
}
|
||||||
|
}
|
||||||
checkable: true
|
checkable: true
|
||||||
checked: monitoringPrint
|
checked: monitoringPrint
|
||||||
exclusiveGroup: sidebarHeaderBarGroup
|
exclusiveGroup: sidebarHeaderBarGroup
|
||||||
|
97
resources/themes/cura/icons/tab_monitor_unknown.svg
Normal file
97
resources/themes/cura/icons/tab_monitor_unknown.svg
Normal file
@ -0,0 +1,97 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<svg
|
||||||
|
xmlns:sketch="http://www.bohemiancoding.com/sketch/ns"
|
||||||
|
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||||
|
xmlns:cc="http://creativecommons.org/ns#"
|
||||||
|
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||||
|
xmlns:svg="http://www.w3.org/2000/svg"
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||||
|
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||||
|
width="30"
|
||||||
|
height="30"
|
||||||
|
viewBox="0 0 30 30"
|
||||||
|
version="1.1"
|
||||||
|
id="svg2"
|
||||||
|
inkscape:version="0.91 r13725"
|
||||||
|
sodipodi:docname="tab_monitor_unavailable.svg">
|
||||||
|
<metadata
|
||||||
|
id="metadata15">
|
||||||
|
<rdf:RDF>
|
||||||
|
<cc:Work
|
||||||
|
rdf:about="">
|
||||||
|
<dc:format>image/svg+xml</dc:format>
|
||||||
|
<dc:type
|
||||||
|
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||||
|
<dc:title>Fill 1 Copy 3</dc:title>
|
||||||
|
</cc:Work>
|
||||||
|
</rdf:RDF>
|
||||||
|
</metadata>
|
||||||
|
<sodipodi:namedview
|
||||||
|
pagecolor="#000000"
|
||||||
|
bordercolor="#666666"
|
||||||
|
borderopacity="1"
|
||||||
|
objecttolerance="10"
|
||||||
|
gridtolerance="10"
|
||||||
|
guidetolerance="10"
|
||||||
|
inkscape:pageopacity="0"
|
||||||
|
inkscape:pageshadow="2"
|
||||||
|
inkscape:window-width="1920"
|
||||||
|
inkscape:window-height="1148"
|
||||||
|
id="namedview13"
|
||||||
|
showgrid="false"
|
||||||
|
showborder="true"
|
||||||
|
inkscape:zoom="12.987195"
|
||||||
|
inkscape:cx="14.346643"
|
||||||
|
inkscape:cy="15.151358"
|
||||||
|
inkscape:window-x="-8"
|
||||||
|
inkscape:window-y="-8"
|
||||||
|
inkscape:window-maximized="1"
|
||||||
|
inkscape:current-layer="svg2"
|
||||||
|
inkscape:snap-global="true"
|
||||||
|
inkscape:object-nodes="false"
|
||||||
|
inkscape:snap-smooth-nodes="false"
|
||||||
|
inkscape:snap-midpoints="false"
|
||||||
|
inkscape:snap-intersection-paths="false"
|
||||||
|
inkscape:snap-bbox="true"
|
||||||
|
inkscape:snap-others="false"
|
||||||
|
inkscape:snap-nodes="false" />
|
||||||
|
<!-- Generator: Sketch 3.4.4 (17249) - http://www.bohemiancoding.com/sketch -->
|
||||||
|
<title
|
||||||
|
id="title4">Fill 1 Copy 3</title>
|
||||||
|
<desc
|
||||||
|
id="desc6">Created with Sketch.</desc>
|
||||||
|
<defs
|
||||||
|
id="defs8" />
|
||||||
|
<g
|
||||||
|
id="Page-1"
|
||||||
|
sketch:type="MSPage"
|
||||||
|
style="fill:none;fill-rule:evenodd;stroke:none;stroke-width:1"
|
||||||
|
transform="matrix(1.3157895,0,0,1.3157895,2.5,2.4999995)">
|
||||||
|
<g
|
||||||
|
id="HIG"
|
||||||
|
sketch:type="MSArtboardGroup"
|
||||||
|
transform="translate(-718,-2432)"
|
||||||
|
style="fill:#ffffff">
|
||||||
|
<path
|
||||||
|
d="m 718,2432 19,0 0,0.9048 -19,0 0,-0.9048 0,0 z m 0,18.0952 1.73776,0 1.7267,-0.9047 12.13477,0 1.69775,0.9047 1.70302,0 0,0.9048 -1.70166,0 -1.69911,-0.9048 -12.13593,0 -1.72554,0.8949 L 718,2451 l 0,-0.9048 0,0 z m 18.13636,-17.1904 0.86364,0 0,17.1904 -0.86364,0 0,-17.1904 0,0 z m -18.13636,0 0.86364,0 0,17.1904 -0.86364,0 0,-17.1904 0,0 z m 2.59091,1.8095 13.81818,0 0,12.6667 -13.81818,0 0,-12.6667 0,0 z m 0.86364,0.9047 12.0909,0 0,10.8572 -12.0909,0 0,-10.8572 0,0 z m 4.31818,0 3.45454,0 0,2.7143 -3.45454,0 0,-2.7143 0,0 z m -2.59091,9.9524 8.63636,0 0,0.9048 -8.63636,0 0,-0.9048 0,0 z m 3.45454,-7.2381 1.72728,0 0,0.9048 -1.72728,0 0,-0.9048 0,0 z"
|
||||||
|
id="Fill-1-Copy-3"
|
||||||
|
sketch:type="MSShapeGroup"
|
||||||
|
inkscape:connector-curvature="0" />
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
<circle
|
||||||
|
style="fill:#7f7f7f;fill-opacity:1"
|
||||||
|
id="path3337"
|
||||||
|
cx="22.5"
|
||||||
|
cy="7.5"
|
||||||
|
r="7.5" />
|
||||||
|
<g
|
||||||
|
style="font-style:normal;font-weight:normal;font-size:10.78604317px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||||
|
id="text3339">
|
||||||
|
<path
|
||||||
|
d="m 25.53769,5.6750499 q 0,0.5319289 -0.157999,0.9427255 -0.152732,0.4055299 -0.43713,0.7057274 -0.284397,0.3001975 -0.68466,0.5371955 -0.394997,0.236998 -0.895326,0.4318631 l 0,1.2007899 -1.853851,0 0,-1.7748518 q 0.37393,-0.1000658 0.674127,-0.2053983 0.305464,-0.1053324 0.637262,-0.3423305 0.31073,-0.2106649 0.484529,-0.4897959 0.179065,-0.279131 0.179065,-0.6319947 0,-0.5266622 -0.34233,-0.7478604 -0.337064,-0.2264648 -0.953259,-0.2264648 -0.379197,0 -0.85846,0.1632653 -0.473996,0.1632653 -0.868992,0.4213298 l -0.210665,0 0,-1.6063199 q 0.337064,-0.1421988 1.037524,-0.2949308 0.700461,-0.1579987 1.421988,-0.1579987 1.300856,0 2.064517,0.5740619 0.76366,0.5740618 0.76366,1.5009874 z M 23.51004,11.6 l -2.127715,0 0,-1.390388 2.127715,0 0,1.390388 z"
|
||||||
|
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-family:Verdana;-inkscape-font-specification:'Verdana Bold';fill:#ffffff"
|
||||||
|
id="path4144" />
|
||||||
|
</g>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 4.4 KiB |
Loading…
x
Reference in New Issue
Block a user