Merge branch 'master' into output_device

* master: (22 commits)
  Added grouping action
  LayerData now works by using decorators
  Do not cause "dictionary changed size during iteration" errors when changing view
  Adds an idle-state for the layerview slider
  Adds an idle-state for the safebutton
  Sets the platform activity on true when a model is loaded
  Sets the platform activity on true when a model is loaded
  Create functions that get & set platform activity
  Send M104 to set the temperature to 0
  Do not store files that fail to load in recent files
  feat: infill wipe dist; wireframe restructure & renaming; bugfix: draft_shield_height inherit_function
  Also add the parent class' command line arguments
  Only process the layer data if the layer view is active.
  Write to the correct variable so bed temperature is properly updated
  Correct a copy-paste error in getConnectionList
  Properly close all open USB connections on shut down
  Catch errors when trying to close the connection thread
  Enlarge the zone where you can use scrolling to look trough the layer mode.
  included retraction_extra_prime_amount
  tiniest detail concerning the padding of the layer count label
  ...
This commit is contained in:
Arjen Hiemstra 2015-07-31 12:15:18 +02:00
commit a8c36282fb
16 changed files with 426 additions and 86 deletions

View File

@ -33,6 +33,7 @@ class BuildVolume(SceneNode):
self.setCalculateBoundingBox(False)
def setWidth(self, width):
self._width = width

View File

@ -22,6 +22,7 @@ from UM.Math.Polygon import Polygon
from UM.Scene.BoxRenderer import BoxRenderer
from UM.Scene.Selection import Selection
from UM.Scene.GroupDecorator import GroupDecorator
from UM.Operations.AddSceneNodeOperation import AddSceneNodeOperation
from UM.Operations.RemoveSceneNodeOperation import RemoveSceneNodeOperation
@ -74,6 +75,7 @@ class CuraApplication(QtApplication):
self._print_information = None
self._i18n_catalog = None
self._previous_active_tool = None
self._platform_activity = False
self.activeMachineChanged.connect(self._onActiveMachineChanged)
@ -106,6 +108,7 @@ class CuraApplication(QtApplication):
raise RuntimeError("Could not load the backend plugin!")
def addCommandLineOptions(self, parser):
super().addCommandLineOptions(parser)
parser.add_argument("file", nargs="*", help="Files to load after starting the application.")
def run(self):
@ -199,6 +202,31 @@ class CuraApplication(QtApplication):
self._previous_active_tool = None
requestAddPrinter = pyqtSignal()
activityChanged = pyqtSignal()
@pyqtProperty(bool, notify = activityChanged)
def getPlatformActivity(self):
return self._platform_activity
@pyqtSlot(bool)
def setPlatformActivity(self, activity):
##Sets the _platform_activity variable on true or false depending on whether there is a mesh on the platform
if activity == True:
self._platform_activity = activity
elif activity == False:
nodes = []
for node in DepthFirstIterator(self.getController().getScene().getRoot()):
if type(node) is not SceneNode or not node.getMeshData():
continue
nodes.append(node)
i = 0
for node in nodes:
if not node.getMeshData():
continue
i += 1
if i <= 1: ## i == 0 when the meshes are removed using the deleteAll function; i == 1 when the last remaining mesh is removed using the deleteObject function
self._platform_activity = activity
self.activityChanged.emit()
## Remove an object from the scene
@pyqtSlot("quint64")
@ -211,6 +239,7 @@ class CuraApplication(QtApplication):
if object:
op = RemoveSceneNodeOperation(object)
op.push()
self.setPlatformActivity(False)
## Create a number of copies of existing object.
@pyqtSlot("quint64", int)
@ -251,7 +280,6 @@ class CuraApplication(QtApplication):
if type(node) is not SceneNode or not node.getMeshData():
continue
nodes.append(node)
if nodes:
op = GroupedOperation()
@ -259,6 +287,7 @@ class CuraApplication(QtApplication):
op.addOperation(RemoveSceneNodeOperation(node))
op.push()
self.setPlatformActivity(False)
## Reset all translation on nodes with mesh data.
@pyqtSlot()
@ -363,6 +392,17 @@ class CuraApplication(QtApplication):
self.getActiveMachine().setSettingValueByKey(key, value)
@pyqtSlot()
def groupSelected(self):
group_node = SceneNode()
group_decorator = GroupDecorator()
group_node.addDecorator(group_decorator)
group_node.setParent(self.getController().getScene().getRoot())
for node in Selection.getAllSelectedObjects():
node.setParent(group_node)
def _onActiveMachineChanged(self):
machine = self.getActiveMachine()
if machine:
@ -401,7 +441,7 @@ class CuraApplication(QtApplication):
op.push()
def _onJobFinished(self, job):
if type(job) is not ReadMeshJob:
if type(job) is not ReadMeshJob or not job.getResult():
return
f = QUrl.fromLocalFile(job.getFileName())

View File

@ -37,6 +37,12 @@ class CuraEngineBackend(Backend):
self._scene = Application.getInstance().getController().getScene()
self._scene.sceneChanged.connect(self._onSceneChanged)
# Workaround to disable layer view processing if layer view is not active.
self._layer_view_active = False
Application.getInstance().getController().activeViewChanged.connect(self._onActiveViewChanged)
self._onActiveViewChanged()
self._stored_layer_data = None
self._settings = None
Application.getInstance().activeMachineChanged.connect(self._onActiveMachineChanged)
self._onActiveMachineChanged()
@ -150,7 +156,7 @@ class CuraEngineBackend(Backend):
obj = msg.objects.add()
obj.id = id(object)
verts = numpy.array(mesh_data.getVertices(), copy=True)
verts = numpy.array(mesh_data.getVertices())
verts[:,[1,2]] = verts[:,[2,1]]
verts[:,1] *= -1
obj.vertices = verts.tostring()
@ -188,8 +194,11 @@ class CuraEngineBackend(Backend):
def _onSlicedObjectListMessage(self, message):
if self._save_polygons:
job = ProcessSlicedObjectListJob.ProcessSlicedObjectListJob(message)
job.start()
if self._layer_view_active:
job = ProcessSlicedObjectListJob.ProcessSlicedObjectListJob(message)
job.start()
else :
self._stored_layer_data = message
def _onProgressMessage(self, message):
if message.amount >= 0.99:
@ -248,3 +257,14 @@ class CuraEngineBackend(Backend):
def _onToolOperationStopped(self, tool):
self._enabled = True
self._onChanged()
def _onActiveViewChanged(self):
if Application.getInstance().getController().getActiveView():
view = Application.getInstance().getController().getActiveView()
if view.getPluginId() == "LayerView":
self._layer_view_active = True
if self._stored_layer_data:
job = ProcessSlicedObjectListJob.ProcessSlicedObjectListJob(self._stored_layer_data)
job.start()
else:
self._layer_view_active = False

View File

@ -0,0 +1,12 @@
from UM.Scene.SceneNodeDecorator import SceneNodeDecorator
class LayerDataDecorator(SceneNodeDecorator):
def __init__(self):
super().__init__()
self._layer_data = None
def getLayerData(self):
return self._layer_data
def setLayerData(self, layer_data):
self._layer_data = layer_data

View File

@ -11,6 +11,7 @@ from UM.Message import Message
from UM.i18n import i18nCatalog
from . import LayerData
from . import LayerDataDecorator
import numpy
import struct
@ -22,21 +23,22 @@ class ProcessSlicedObjectListJob(Job):
super().__init__()
self._message = message
self._scene = Application.getInstance().getController().getScene()
self._progress = None
Application.getInstance().getController().activeViewChanged.connect(self._onActiveViewChanged)
def run(self):
if Application.getInstance().getController().getActiveView().getPluginId() == "LayerView":
self._progress = Message(catalog.i18nc("Layers View mode", "Layers"), 0, False, 0)
self._progress.show()
Application.getInstance().getController().activeViewChanged.connect(self._onActiveViewChanged)
objectIdMap = {}
new_node = SceneNode()
## Put all nodes in a dict identified by ID
for node in DepthFirstIterator(self._scene.getRoot()):
if type(node) is SceneNode and node.getMeshData():
if hasattr(node.getMeshData(), "layerData"):
if node.callDecoration("getLayerData"):
#if hasattr(node.getMeshData(), "layerData"):
self._scene.getRoot().removeChild(node)
else:
objectIdMap[id(node)] = node
@ -83,11 +85,15 @@ class ProcessSlicedObjectListJob(Job):
# We are done processing all the layers we got from the engine, now create a mesh out of the data
layerData.build()
mesh.layerData = layerData
if self._progress:
self._progress.setProgress(100)
#Add layerdata decorator to scene node to indicate that the node has layerdata
decorator = LayerDataDecorator.LayerDataDecorator()
decorator.setLayerData(layerData)
new_node.addDecorator(decorator)
new_node.setMeshData(mesh)
new_node.setParent(self._scene.getRoot())

View File

@ -27,9 +27,13 @@ class LayerView(View):
self._max_layers = 10
self._current_layer_num = 10
self._current_layer_mesh = None
self._activity = False
self._solid_layers = 5
def getActivity(self):
return self._activity
def getCurrentLayer(self):
return self._current_layer_num
@ -64,10 +68,8 @@ class LayerView(View):
if node.getMeshData() and node.isVisible():
if Selection.isSelected(node):
renderer.queueNode(node, material = self._selection_material, transparent = True)
try:
layer_data = node.getMeshData().layerData
except AttributeError:
layer_data = node.callDecoration("getLayerData")
if not layer_data:
continue
# Render all layers below a certain number as line mesh instead of vertices.
@ -121,6 +123,7 @@ class LayerView(View):
scene = self.getController().getScene()
renderer = self.getRenderer()
if renderer and self._material:
self._activity = True
renderer.setRenderSelection(False)
self._old_max_layers = self._max_layers
## Recalculate num max layers
@ -128,21 +131,25 @@ class LayerView(View):
for node in DepthFirstIterator(scene.getRoot()):
if not node.render(renderer):
if node.getMeshData() and node.isVisible():
try:
layer_data = node.getMeshData().layerData
except AttributeError:
layer_data = node.callDecoration("getLayerData")
if not layer_data:
continue
if new_max_layers < len(layer_data.getLayers()):
new_max_layers = len(layer_data.getLayers()) - 1
if new_max_layers > 0 and new_max_layers != self._old_max_layers:
self._max_layers = new_max_layers
self.maxLayersChanged.emit()
self._current_layer_num = self._max_layers
# This makes sure we update the current layer
self.setLayer(int(self._max_layers * (self._current_layer_num / self._old_max_layers)))
self.setLayer(int(self._max_layers))
self.currentLayerNumChanged.emit()
maxLayersChanged = Signal()
currentLayerNumChanged = Signal()
## Hackish way to ensure the proxy is already created, which ensures that the layerview.qml is already created
# as this caused some issues.

View File

@ -15,9 +15,11 @@ Item
Slider
{
id: slider
width: 10
height: 250
anchors.right : parent.right
anchors.rightMargin: UM.Theme.sizes.slider_layerview_margin.width
orientation: Qt.Vertical
minimumValue: 0;
maximumValue: UM.LayerView.numLayers;
@ -26,6 +28,31 @@ Item
value: UM.LayerView.currentLayer
onValueChanged: UM.LayerView.setCurrentLayer(value)
style: UM.Theme.styles.slider;
style: UM.Theme.styles.layerViewSlider
}
Rectangle {
anchors.right: parent.right
y: -UM.Theme.sizes.slider_layerview_background_extension.height
z: slider.z - 1
width: UM.Theme.sizes.button.width
height: UM.Theme.sizes.slider_layerview_background_extension.height
color: UM.Theme.colors.slider_text_background
}
UM.AngledCornerRectangle {
anchors.right : parent.right
anchors.verticalCenter: parent.verticalCenter
z: slider.z - 1
cornerSize: UM.Theme.sizes.default_margin.width;
width: UM.Theme.sizes.slider_layerview_background.width
height: slider.height + UM.Theme.sizes.default_margin.height * 2
color: UM.Theme.colors.slider_text_background
MouseArea {
id: sliderMouseArea
property double manualStepSize: slider.maximumValue / 11
anchors.fill: parent
onWheel: {
slider.value = wheel.angleDelta.y < 0 ? slider.value - sliderMouseArea.manualStepSize : slider.value + sliderMouseArea.manualStepSize
}
}
}
}

View File

@ -11,6 +11,12 @@ class LayerViewProxy(QObject):
currentLayerChanged = pyqtSignal()
maxLayersChanged = pyqtSignal()
activityChanged = pyqtSignal()
@pyqtProperty(bool, notify = activityChanged)
def getLayerActivity(self):
active_view = self._controller.getActiveView()
return active_view.getActivity()
@pyqtProperty(int, notify = maxLayersChanged)
def numLayers(self):
@ -31,8 +37,12 @@ class LayerViewProxy(QObject):
if type(active_view) == LayerView.LayerView.LayerView:
active_view.setLayer(layer_num)
def _layerActivityChanged(self):
self.activityChanged.emit()
def _onLayerChanged(self):
self.currentLayerChanged.emit()
self._layerActivityChanged()
def _onMaxLayersChanged(self):
self.maxLayersChanged.emit()

View File

@ -469,7 +469,7 @@ class PrinterConnection(SignalEmitter):
# Turn of temperatures
self._sendCommand("M140 S0")
self._sendCommand("M109 S0")
self._sendCommand("M104 S0")
self._is_printing = False
## Check if the process did not encounter an error yet.

View File

@ -47,6 +47,8 @@ class USBPrinterManager(QObject, SignalEmitter, Extension):
self.setMenuName("Firmware")
self.addMenuItem(i18n_catalog.i18n("Update Firmware"), self.updateAllFirmware)
Application.getInstance().applicationShuttingDown.connect(self._onApplicationShuttingDown)
pyqtError = pyqtSignal(str, arguments = ["error"])
processingProgress = pyqtSignal(float, arguments = ["amount"])
pyqtExtruderTemperature = pyqtSignal(float, arguments = ["amount"])
@ -170,7 +172,7 @@ class USBPrinterManager(QObject, SignalEmitter, Extension):
## Callback for bed temperature change
def onBedTemperature(self, serial_port,temperature):
self._bed_temperature = temperature
self._bed_temp = temperature
self.pyqtBedTemperature.emit(temperature)
## Callback for error
@ -280,15 +282,19 @@ class USBPrinterManager(QObject, SignalEmitter, Extension):
i = 0
while True:
values = winreg.EnumValue(key, i)
if not base_list or "USBSER" in values[0]:
if not only_list_usb or "USBSER" in values[0]:
base_list += [values[1]]
i += 1
except Exception as e:
pass
if base_list:
base_list = base_list + glob.glob("/dev/ttyUSB*") + glob.glob("/dev/ttyACM*") + glob.glob("/dev/cu.usb*")
base_list = filter(lambda s: "Bluetooth" not in s, base_list) # Filter because mac sometimes puts them in the list
else:
base_list = base_list + glob.glob("/dev/ttyUSB*") + glob.glob("/dev/ttyACM*") + glob.glob("/dev/cu.*") + glob.glob("/dev/tty.usb*") + glob.glob("/dev/rfcomm*") + glob.glob("/dev/serial/by-id/*")
if only_list_usb:
base_list = base_list + glob.glob("/dev/ttyUSB*") + glob.glob("/dev/ttyACM*") + glob.glob("/dev/cu.usb*")
base_list = filter(lambda s: "Bluetooth" not in s, base_list) # Filter because mac sometimes puts them in the list
else:
base_list = base_list + glob.glob("/dev/ttyUSB*") + glob.glob("/dev/ttyACM*") + glob.glob("/dev/cu.*") + glob.glob("/dev/tty.usb*") + glob.glob("/dev/rfcomm*") + glob.glob("/dev/serial/by-id/*")
return base_list
def _onApplicationShuttingDown(self):
for connection in self._printer_connections:
connection.close()

View File

@ -3,6 +3,7 @@
import QtQuick 2.2
import QtQuick.Controls 1.1
import UM 1.0 as UM
Item {
property alias open: openAction;
@ -16,6 +17,7 @@ Item {
property alias deleteObject: deleteObjectAction;
property alias centerObject: centerObjectAction;
property alias groupObjects: groupObjectsAction;
property alias multiplyObject: multiplyObjectAction;
property alias splitObject: splitObjectAction;
@ -121,6 +123,13 @@ Item {
text: qsTr("Center Object on Platform");
}
Action
{
id: groupObjectsAction
text: qsTr("Group objects");
enabled: UM.Scene.numObjectsSelected > 1 ? true: false
}
Action {
id: multiplyObjectAction;
//: Duplicate object action

View File

@ -348,7 +348,11 @@ UM.MainWindow {
redo.onTriggered: UM.OperationStack.redo();
redo.enabled: UM.OperationStack.canRedo;
deleteSelection.onTriggered: UM.Controller.removeSelection();
deleteSelection.onTriggered: {
if(objectContextMenu.objectId != 0) {
Printer.deleteObject(objectContextMenu.objectId);
}
}
deleteObject.onTriggered: {
if(objectContextMenu.objectId != 0) {
@ -371,6 +375,11 @@ UM.MainWindow {
}
}
groupObjects.onTriggered:
{
Printer.groupSelected()
}
deleteAll.onTriggered: Printer.deleteAll()
resetAllTranslation.onTriggered: Printer.resetAllTranslation()
resetAll.onTriggered: Printer.resetAll()
@ -396,6 +405,7 @@ UM.MainWindow {
MenuItem { action: actions.deleteObject; }
MenuItem { action: actions.multiplyObject; }
MenuItem { action: actions.splitObject; }
MenuItem { action: actions.groupObjects;}
MenuSeparator { }
MenuItem { action: actions.deleteAll; }
MenuItem { action: actions.reloadAll; }
@ -438,6 +448,7 @@ UM.MainWindow {
onAccepted:
{
UM.MeshFileHandler.readLocalFile(fileUrl)
Printer.setPlatformActivity(true)
}
}

View File

@ -12,6 +12,7 @@ Rectangle {
id: base;
property real progress: UM.Backend.progress;
property bool activity: Printer.getPlatformActivity;
Behavior on progress { NumberAnimation { duration: 250; } }
property variant printDuration: PrintInformation.currentPrintTime;
@ -47,7 +48,7 @@ Rectangle {
color: UM.Theme.colors.save_button_estimated_text;
font: UM.Theme.fonts.small;
text: {
if(base.progress < 0) {
if(base.activity == false) {
//: Save button label
return qsTr("Please load a 3D model");
} else if (base.progress < 0.99) {
@ -70,7 +71,7 @@ Rectangle {
anchors.leftMargin: UM.Theme.sizes.save_button_text_margin.width;
color: UM.Theme.colors.save_button_printtime_text;
font: UM.Theme.fonts.small;
visible: base.progress < 0.99 ? false : true
visible: base.activity == false || base.progress < 0.99 ? false : true
text: (!base.printDuration || !base.printDuration.valid) ? "" : base.printDuration.getDisplayString(UM.DurationFormat.Long);
}
Label {
@ -80,11 +81,10 @@ Rectangle {
anchors.leftMargin: UM.Theme.sizes.save_button_text_margin.width;
color: base.printDuration.days > 0 ? UM.Theme.colors.save_button_estimated_text : UM.Theme.colors.save_button_printtime_text;
font: UM.Theme.fonts.small;
property bool mediumLengthDuration: base.printDuration.hours > 9 && base.printMaterialAmount > 9.99 && base.printDuration.days == 0
width: mediumLengthDuration ? 50 : undefined
elide: mediumLengthDuration ? Text.ElideRight : Text.ElideNone
visible: base.progress < 0.99 ? false : true
visible: base.activity == false || base.progress < 0.99 ? false : true
//: Print material amount save button label
text: base.printMaterialAmount < 0 ? "" : qsTr("%1m of Material").arg(base.printMaterialAmount);
}
@ -98,7 +98,7 @@ Rectangle {
}
width: Math.max(infoBox.width * base.progress);
color: UM.Theme.colors.save_button_active
visible: base.progress > 0.99 ? false : true
visible: progress > 0.99 ? false : true
}
Button {
@ -108,7 +108,7 @@ Rectangle {
anchors.left: parent.left
anchors.leftMargin: UM.Theme.sizes.default_margin.width;
tooltip: devicesModel.activeDevice.description;
enabled: progress >= 0.99;
enabled: progress > 0.99 && base.activity == true
width: infoBox.width/6*4.5
height: UM.Theme.sizes.save_button_save_to_button.height

View File

@ -389,7 +389,15 @@
"description": "The amount of overlap between the infill and the walls. A slight overlap allows the walls to connect firmly to the infill.",
"unit": "%",
"type": "float",
"default": 15.0,
"default": 10.0,
"visible": false
},
"infill_wipe_dist": {
"label": "Infill Wipe Distance",
"description": "Distance of a travel move inserted after every infill line, to make the infill stick to the walls better. This option is imilar to infill overlap, but without extrusion and only on one end of the infill line.",
"unit": "mm",
"type": "float",
"default": 0.04,
"visible": false
},
"fill_sparse_thickness": {
@ -673,6 +681,19 @@
"value": true
}
},
"retraction_extra_prime_amount": {
"label": "Retraction Extra Prime Amount",
"description": "The amount of material extruded after unretracting. During a retracted travel material might get lost and so we need to compensate for this.",
"unit": "mm",
"type": "float",
"default": 0.0,
"visible": false,
"inherit": false,
"active_if": {
"setting": "retraction_enable",
"value": true
}
},
"retraction_min_travel": {
"label": "Retraction Minimum Travel",
"description": "The minimum distance of travel needed for a retraction to happen at all. This helps ensure you do not get a lot of retractions in a small area.",
@ -1280,6 +1301,98 @@
}
}
},
"shield": {
"label": "Shielding",
"visible": true,
"icon": "category_shield",
"settings": {
"ooze_shield_enabled": {
"label": "Enable Ooze Shield",
"description": "Enable exterior ooze shield. This will create a shell around the object which is likely to wipe a second nozzle if it's at the same height as the first nozzle.",
"type": "boolean",
"default": false
},
"ooze_shield_angle": {
"label": "Ooze Shield Angle",
"description": "The maximum angle a part in the ooze shield will have. With 0 degrees being vertical, and 90 degrees being horizontal. A smaller angle leads to less failed ooze shields, but more material.",
"unit": "°",
"type": "float",
"min_value": 0.0,
"max_value": 90.0,
"default": 60.0,
"visible": false,
"active_if": {
"setting": "ooze_shield_enabled",
"value": true
}
},
"ooze_shield_dist": {
"label": "Ooze Shields Distance",
"description": "Distance of the ooze shield from the print, in the X/Y directions.",
"unit": "mm",
"type": "float",
"min_value": 0.0,
"max_value_warning": 30.0,
"default": 2.0,
"visible": false,
"active_if": {
"setting": "ooze_shield_enabled",
"value": true
}
},
"draft_shield_enabled": {
"label": "Enable Draft Shield",
"description": "Enable exterior draft shield. This will create a wall around the object which traps (hot) air and shields against gusts of wind. Especially useful for materials which warp easily.",
"type": "boolean",
"default": false
},
"draft_shield_dist": {
"label": "Draft Shield X/Y Distance",
"description": "Distance of the draft shield from the print, in the X/Y directions.",
"unit": "mm",
"type": "float",
"min_value": 0.0,
"max_value_warning": 100.0,
"default": 10.0,
"visible": false,
"active_if": {
"setting": "draft_shield_enabled",
"value": true
}
},
"draft_shield_height_limitation": {
"label": "Draft Shield Limitation",
"description": "Whether to limit the height of the draft shield",
"type": "enum",
"options": [
"Full",
"Limited"
],
"default": "Full",
"visible": false,
"inherit_function": "Full",
"active_if": {
"setting": "draft_shield_enabled",
"value": true
}
},
"draft_shield_height": {
"label": "Draft Shield Height",
"description": "Height limitation on the draft shield. Above this height no draft shield will be printed.",
"unit": "mm",
"type": "float",
"min_value": 0.0,
"max_value_warning": 30.0,
"default": 0.0,
"inherit_function": "9999 if draft_shield_height_limitation == 'Full' and draft_shield_enabled else 0.0",
"visible": false,
"active_if": {
"setting": "draft_shield_height_limitation",
"value": "Limited"
}
}
}
},
"support": {
"label": "Support",
"visible": true,
@ -1583,8 +1696,33 @@
"default": false,
"visible": false
},
"wireframe_height": {
"label": "WP Connection Height",
"description": "The height of the upward and diagonally downward lines between two horizontal parts. This determines the overall density of the net structure. Only applies to Wire Printing.",
"type": "float",
"unit": "mm",
"default": 3.0,
"visible": false,
"active_if": {
"setting": "wireframe_enabled",
"value": true
}
},
"wireframe_roof_inset": {
"label": "WP Roof Inset Distance",
"description": "The distance covered when making a connection from a roof outline inward. Only applies to Wire Printing.",
"type": "float",
"unit": "mm",
"default": 3.0,
"visible": false,
"active_if": {
"setting": "wireframe_enabled",
"value": true
},
"inherit_function": "wireframe_height"
},
"wireframe_printspeed": {
"label": "Wire Printing speed",
"label": "WP speed",
"description": "Speed at which the nozzle moves when extruding material. Only applies to Wire Printing.",
"unit": "mm/s",
"type": "float",
@ -1596,7 +1734,7 @@
},
"children": {
"wireframe_printspeed_bottom": {
"label": "Wire Bottom Printing Speed",
"label": "WP Bottom Printing Speed",
"description": "Speed of printing the first layer, which is the only layer touching the build platform. Only applies to Wire Printing.",
"unit": "mm/s",
"type": "float",
@ -1609,7 +1747,7 @@
}
},
"wireframe_printspeed_up": {
"label": "Wire Upward Printing Speed",
"label": "WP Upward Printing Speed",
"description": "Speed of printing a line upward 'in thin air'. Only applies to Wire Printing.",
"unit": "mm/s",
"type": "float",
@ -1622,7 +1760,7 @@
}
},
"wireframe_printspeed_down": {
"label": "Wire Downward Printing Speed",
"label": "WP Downward Printing Speed",
"description": "Speed of printing a line diagonally downward. Only applies to Wire Printing.",
"unit": "mm/s",
"type": "float",
@ -1635,7 +1773,7 @@
}
},
"wireframe_printspeed_flat": {
"label": "Wire Horizontal Printing Speed",
"label": "WP Horizontal Printing Speed",
"description": "Speed of printing the horizontal contours of the object. Only applies to Wire Printing.",
"unit": "mm/s",
"type": "float",
@ -1650,7 +1788,7 @@
}
},
"wireframe_flow": {
"label": "Wire Printing Flow",
"label": "WP Flow",
"description": "Flow compensation: the amount of material extruded is multiplied by this value. Only applies to Wire Printing.",
"unit": "%",
"default": 100.0,
@ -1662,7 +1800,7 @@
},
"children": {
"wireframe_flow_connection": {
"label": "Wire Connection Flow",
"label": "WP Connection Flow",
"description": "Flow compensation when going up or down. Only applies to Wire Printing.",
"unit": "%",
"default": 100.0,
@ -1674,7 +1812,7 @@
}
},
"wireframe_flow_flat": {
"label": "Wire Flat Flow",
"label": "WP Flat Flow",
"description": "Flow compensation when printing flat lines. Only applies to Wire Printing.",
"unit": "%",
"default": 100.0,
@ -1688,7 +1826,7 @@
}
},
"wireframe_top_delay": {
"label": "Wire Printing Top Delay",
"label": "WP Top Delay",
"description": "Delay time after an upward move, so that the upward line can harden. Only applies to Wire Printing.",
"unit": "sec",
"type": "float",
@ -1700,7 +1838,7 @@
}
},
"wireframe_bottom_delay": {
"label": "Wire Printing Bottom Delay",
"label": "WP Bottom Delay",
"description": "Delay time after a downward move. Only applies to Wire Printing. Only applies to Wire Printing.",
"unit": "sec",
"type": "float",
@ -1712,7 +1850,7 @@
}
},
"wireframe_flat_delay": {
"label": "Wire Printing Flat Delay",
"label": "WP Flat Delay",
"description": "Delay time between two horizontal segments. Introducing such a delay can cause better adhesion to previous layers at the connection points, while too large delay times cause sagging. Only applies to Wire Printing.",
"unit": "sec",
"type": "float",
@ -1724,7 +1862,7 @@
}
},
"wireframe_up_half_speed": {
"label": "Wire Printing Ease Upward",
"label": "WP Ease Upward",
"description": "Distance of an upward move which is extruded with half speed.\nThis can cause better adhesion to previous layers, while not heating the material in those layers too much. Only applies to Wire Printing.",
"type": "float",
"unit": "mm",
@ -1736,7 +1874,7 @@
}
},
"wireframe_top_jump": {
"label": "Wire Printing Knot Size",
"label": "WP Knot Size",
"description": "Creates a small knot at the top of an upward line, so that the consecutive horizontal layer has a better chance to connect to it. Only applies to Wire Printing.",
"type": "float",
"unit": "mm",
@ -1748,7 +1886,7 @@
}
},
"wireframe_fall_down": {
"label": "Wire Printing Fall Down",
"label": "WP Fall Down",
"description": "Distance with which the material falls down after an upward extrusion. This distance is compensated for. Only applies to Wire Printing.",
"type": "float",
"unit": "mm",
@ -1760,7 +1898,7 @@
}
},
"wireframe_drag_along": {
"label": "Wire Printing Drag along",
"label": "WP Drag along",
"description": "Distance with which the material of an upward extrusion is dragged along with the diagonally downward extrusion. This distance is compensated for. Only applies to Wire Printing.",
"type": "float",
"unit": "mm",
@ -1772,7 +1910,7 @@
}
},
"wireframe_strategy": {
"label": "Wire Printing Strategy",
"label": "WP Strategy",
"description": "Strategy for making sure two consecutive layers connect at each connection point. Retraction lets the upward lines harden in the right position, but may cause filament grinding. A knot can be made at the end of an upward line to heighten the chance of connecting to it and to let the line cool; however it may require slow printing speeds. Another strategy is to compensate for the sagging of the top of an upward line; however, the lines won't always fall down as predicted.",
"type": "enum",
"options": [
@ -1788,7 +1926,7 @@
}
},
"wireframe_straight_before_down": {
"label": "Wire Printing Straighten Downward Lines",
"label": "WP Straighten Downward Lines",
"description": "Percentage of a diagonally downward line which is covered by a horizontal line piece. This can prevent sagging of the top most point of upward lines. Only applies to Wire Printing.",
"type": "float",
"unit": "%",
@ -1800,7 +1938,7 @@
}
},
"wireframe_roof_fall_down": {
"label": "Wire Printing Roof Fall Down",
"label": "WP Roof Fall Down",
"description": "The distance which horizontal roof lines printed 'in thin air' fall down when being printed. This distance is compensated for. Only applies to Wire Printing.",
"type": "float",
"unit": "mm",
@ -1812,7 +1950,7 @@
}
},
"wireframe_roof_drag_along": {
"label": "Wire Printing Roof Drag Along",
"label": "WP Roof Drag Along",
"description": "The distance of the end piece of an inward line which gets dragged along when going back to the outer outline of the roof. This distance is compensated for. Only applies to Wire Printing.",
"type": "float",
"unit": "mm",
@ -1824,7 +1962,7 @@
}
},
"wireframe_roof_outer_delay": {
"label": "Wire Printing Roof Outer Delay",
"label": "WP Roof Outer Delay",
"description": "Time spent at the outer perimeters of hole which is to become a roof. Larger times can ensure a better connection. Only applies to Wire Printing.",
"type": "boolean",
"unit": "sec",
@ -1836,33 +1974,8 @@
"value": true
}
},
"wireframe_height": {
"label": "Wire Printing Connection Height",
"description": "The height of the upward and diagonally downward lines between two horizontal parts. Only applies to Wire Printing.",
"type": "float",
"unit": "mm",
"default": 3.0,
"visible": false,
"active_if": {
"setting": "wireframe_enabled",
"value": true
}
},
"wireframe_roof_inset": {
"label": "Wire Printing Roof Inset Distance",
"description": "The distance covered when making a connection from a roof outline inward. Only applies to Wire Printing.",
"type": "float",
"unit": "mm",
"default": 3.0,
"visible": false,
"active_if": {
"setting": "wireframe_enabled",
"value": true
},
"inherit_function": "wireframe_height"
},
"wireframe_nozzle_clearance": {
"label": "Wire Printing Nozzle Clearance",
"label": "WP Nozzle Clearance",
"description": "Distance between the nozzle and horizontally downward lines. Larger clearance results in diagonally downward lines with a less steep angle, which in turn results in less upward connections with the next layer. Only applies to Wire Printing.",
"type": "float",
"unit": "mm",

View File

@ -272,6 +272,7 @@ QtObject {
}
handle: UM.AngledCornerRectangle {
id: scrollViewHandle
implicitWidth: UM.Theme.sizes.scrollbar.width;
cornerSize: UM.Theme.sizes.scrollbar.width;
@ -367,6 +368,78 @@ QtObject {
}
}
property Component layerViewSlider: Component {
SliderStyle {
groove: Rectangle {
id: layerSliderGroove
implicitWidth: control.width;
implicitHeight: UM.Theme.sizes.slider_groove.height;
color: UM.Theme.colors.slider_groove;
border.width: 1;
border.color: UM.Theme.colors.slider_groove_border;
Rectangle {
anchors {
left: parent.left;
top: parent.top;
bottom: parent.bottom;
}
color: UM.Theme.colors.slider_groove_fill;
width: (control.value / (control.maximumValue - control.minimumValue)) * parent.width;
}
Label {
id: maxValueLabel
visible: UM.LayerView.getLayerActivity && Printer.getPlatformActivity ? true : false
text: control.maximumValue + 1
font: control.maximumValue > 998 ? UM.Theme.fonts.small : UM.Theme.fonts.default
transformOrigin: Item.BottomLeft
rotation: 90
x: parent.x + parent.width - maxValueLabel.height
y: control.maximumValue > 998 ? parent.y + UM.Theme.sizes.slider_layerview_smalltext_margin.width : parent.y
}
Label {
id: minValueLabel
visible: UM.LayerView.getLayerActivity && Printer.getPlatformActivity ? true : false
text: '1'
font: control.maximumValue > 998 ? UM.Theme.fonts.small : UM.Theme.fonts.default
transformOrigin: Item.BottomLeft
rotation: 90
x: parent.x
y: control.maximumValue > 998 ? parent.y + UM.Theme.sizes.slider_layerview_smalltext_margin.width : parent.y
}
}
handle: Rectangle {
id: layerSliderControl
width: UM.Theme.sizes.slider_handle.width;
height: UM.Theme.sizes.slider_handle.height;
color: control.hovered ? UM.Theme.colors.slider_handle_hover : UM.Theme.colors.slider_handle;
Behavior on color { ColorAnimation { duration: 50; } }
Label {
id: valueLabel
visible: UM.LayerView.getLayerActivity && Printer.getPlatformActivity ? true : false
text: control.value + 1
anchors.bottom: layerSliderControl.bottom
anchors.right: layerSliderControl.left
anchors.bottomMargin: parent.width + UM.Theme.sizes.default_margin.width
font: UM.Theme.fonts.default
transformOrigin: Item.BottomRight
rotation: 90
Rectangle {
width: (parent.width + UM.Theme.sizes.tooltip_margins.width) < 35 ? 35 : parent.width + UM.Theme.sizes.tooltip_margins.width
height: parent.height + (UM.Theme.sizes.tooltip_margins.height / 2)
anchors.verticalCenter: parent.verticalCenter
anchors.horizontalCenter: parent.horizontalCenter
z: parent.z - 1
color: UM.Theme.colors.slider_text_background
border.width: 1
border.color: UM.Theme.colors.slider_groove_fill;
}
}
}
}
}
property Component text_field: Component {
TextFieldStyle {
textColor: UM.Theme.colors.setting_control_text;

View File

@ -100,6 +100,7 @@
"slider_groove_fill": [160, 163, 171, 255],
"slider_handle": [12, 169, 227, 255],
"slider_handle_hover": [34, 150, 190, 255],
"slider_text_background": [255, 255, 255, 255],
"checkbox": [255, 255, 255, 255],
"checkbox_hover": [245, 245, 245, 255],
@ -154,6 +155,10 @@
"slider_groove": [0.5, 0.5],
"slider_handle": [1.5, 1.5],
"slider_layerview_background": [6.0, 0.0],
"slider_layerview_smalltext_margin": [0.3, 0.00],
"slider_layerview_background_extension": [0.0, 2.2],
"slider_layerview_margin": [3.0, 3.0],
"checkbox": [1.5, 1.5],