Merge remote-tracking branch 'Ultimaker/master'

This commit is contained in:
simonCor 2015-07-17 23:18:26 +02:00
commit 1a37a0e7fd
31 changed files with 1409 additions and 183065 deletions

View File

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

View File

@ -0,0 +1,28 @@
from UM.Scene.SceneNodeDecorator import SceneNodeDecorator
class ConvexHullDecorator(SceneNodeDecorator):
def __init__(self):
super().__init__()
self._convex_hull = None
self._convex_hull_node = None
self._convex_hull_job = None
def getConvexHull(self):
return self._convex_hull
def setConvexHull(self, hull):
self._convex_hull = hull
def getConvexHullJob(self):
return self._convex_hull_job
def setConvexHullJob(self, job):
self._convex_hull_job = job
def getConvexHullNode(self):
return self._convex_hull_node
def setConvexHullNode(self, node):
self._convex_hull_node = node

View File

@ -16,20 +16,46 @@ class ConvexHullJob(Job):
self._node = node
def run(self):
if not self._node or not self._node.getMeshData():
if not self._node:
return
## If the scene node is a group, use the hull of the children to calculate its hull.
if self._node.callDecoration("isGroup"):
hull = Polygon(numpy.zeros((0, 2), dtype=numpy.int32))
for child in self._node.getChildren():
child_hull = child.callDecoration("getConvexHull")
if child_hull:
hull.setPoints(numpy.append(hull.getPoints(), child_hull.getPoints(), axis = 0))
if hull.getPoints().size < 3:
self._node.callDecoration("setConvexHull", None)
self._node.callDecoration("setConvexHullJob", None)
return
else:
if not self._node.getMeshData():
return
mesh = self._node.getMeshData()
vertex_data = mesh.getTransformed(self._node.getWorldTransformation()).getVertices()
mesh = self._node.getMeshData()
vertexData = mesh.getTransformed(self._node.getWorldTransformation()).getVertices()
hull = Polygon(numpy.rint(vertexData[:, [0, 2]]).astype(int))
hull = Polygon(numpy.rint(vertex_data[:, [0, 2]]).astype(int))
# First, calculate the normal convex hull around the points
hull = hull.getConvexHull()
#print("hull: " , self._node.callDecoration("isGroup"), " " , hull.getPoints())
# Then, do a Minkowski hull with a simple 1x1 quad to outset and round the normal convex hull.
hull = hull.getMinkowskiHull(Polygon(numpy.array([[-1, -1], [-1, 1], [1, 1], [1, -1]], numpy.float32)))
hull_node = ConvexHullNode.ConvexHullNode(self._node, hull, Application.getInstance().getController().getScene().getRoot())
self._node._convex_hull = hull
delattr(self._node, "_convex_hull_job")
self._node.callDecoration("setConvexHullNode", hull_node)
self._node.callDecoration("setConvexHull", hull)
self._node.callDecoration("setConvexHullJob", None)
if self._node.getParent().callDecoration("isGroup"):
job = self._node.getParent().callDecoration("getConvexHullJob")
if job:
job.cancel()
self._node.getParent().callDecoration("setConvexHull", None)
hull_node = self._node.getParent().callDecoration("getConvexHullNode")
if hull_node:
hull_node.setParent(None)

View File

@ -56,18 +56,19 @@ class ConvexHullNode(SceneNode):
self._material = renderer.createMaterial(Resources.getPath(Resources.ShadersLocation, "basic.vert"), Resources.getPath(Resources.ShadersLocation, "color.frag"))
self._material.setUniformValue("u_color", Color(35, 35, 35, 128))
renderer.queueNode(self, material = self._material, transparent = True)
if self.getParent():
renderer.queueNode(self, material = self._material, transparent = True)
return True
def _onNodePositionChanged(self, node):
#self.setPosition(node.getWorldPosition())
if hasattr(node, "_convex_hull"):
delattr(node, "_convex_hull")
if node.callDecoration("getConvexHull"):
node.callDecoration("setConvexHull", None)
node.callDecoration("setConvexHullNode", None)
self.setParent(None)
#self._node.transformationChanged.disconnect(self._onNodePositionChanged)
#self._node.parentChanged.disconnect(self._onNodeParentChanged)

41
cura/CrashHandler.py Normal file
View File

@ -0,0 +1,41 @@
import sys
import platform
import traceback
import webbrowser
from PyQt5.QtCore import QT_VERSION_STR, PYQT_VERSION_STR
from PyQt5.QtWidgets import QDialog, QDialogButtonBox, QVBoxLayout, QLabel, QTextEdit
def show():
dialog = QDialog()
dialog.setWindowTitle("Oops!")
layout = QVBoxLayout(dialog)
label = QLabel(dialog)
layout.addWidget(label)
label.setText("<p>An uncaught exception has occurred!</p><p>Please use the information below to post a bug report at <a href=\"http://github.com/Ultimaker/Cura/issues\">http://github.com/Ultimaker/Cura/issues</a></p>")
textarea = QTextEdit(dialog)
layout.addWidget(textarea)
try:
from UM.Application import Application
version = Application.getInstance().getVersion()
except:
version = "Unknown"
trace = "".join(traceback.format_exception(sys.exc_info()[0], sys.exc_info()[1], sys.exc_info()[2]))
crash_info = "Version: {0}\nPlatform: {1}\nQt: {2}\nPyQt: {3}\n\nException:\n{4}"
crash_info = crash_info.format(version, platform.platform(), QT_VERSION_STR, PYQT_VERSION_STR, trace)
textarea.setText(crash_info)
buttons = QDialogButtonBox(QDialogButtonBox.Close, dialog)
layout.addWidget(buttons)
buttons.addButton("Open Web Page", QDialogButtonBox.HelpRole)
buttons.rejected.connect(lambda: dialog.close())
buttons.helpRequested.connect(lambda: webbrowser.open("http://github.com/Ultimaker/Cura/issues"))
dialog.exec_()

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)
@ -110,6 +112,7 @@ class CuraApplication(QtApplication):
self._plugin_registry.loadPlugin("CuraEngineBackend")
def addCommandLineOptions(self, parser):
super().addCommandLineOptions(parser)
parser.add_argument("file", nargs="*", help="Files to load after starting the application.")
def run(self):
@ -215,6 +218,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")
@ -223,10 +251,18 @@ class CuraApplication(QtApplication):
if not object and object_id != 0: #Workaround for tool handles overlapping the selected object
object = Selection.getSelectedObject(0)
if object:
op = RemoveSceneNodeOperation(object)
if object.getParent():
group_node = object.getParent()
if not group_node.callDecoration("isGroup"):
op = RemoveSceneNodeOperation(object)
else:
while group_node.getParent().callDecoration("isGroup"):
group_node = group_node.getParent()
op = RemoveSceneNodeOperation(group_node)
op.push()
self.setPlatformActivity(False)
## Create a number of copies of existing object.
@pyqtSlot("quint64", int)
@ -267,7 +303,6 @@ class CuraApplication(QtApplication):
if type(node) is not SceneNode or not node.getMeshData():
continue
nodes.append(node)
if nodes:
op = GroupedOperation()
@ -275,6 +310,7 @@ class CuraApplication(QtApplication):
op.addOperation(RemoveSceneNodeOperation(node))
op.push()
self.setPlatformActivity(False)
## Reset all translation on nodes with mesh data.
@pyqtSlot()
@ -388,6 +424,42 @@ class CuraApplication(QtApplication):
return
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)
for node in group_node.getChildren():
Selection.remove(node)
Selection.add(group_node)
@pyqtSlot()
def ungroupSelected(self):
ungrouped_nodes = []
selected_objects = Selection.getAllSelectedObjects()[:] #clone the list
for node in selected_objects:
if node.callDecoration("isGroup" ):
children_to_move = []
for child in node.getChildren():
if type(child) is SceneNode:
children_to_move.append(child)
for child in children_to_move:
child.setParent(node.getParent())
Selection.add(child)
child.callDecoration("setConvexHull",None)
node.setParent(None)
ungrouped_nodes.append(node)
for node in ungrouped_nodes:
Selection.remove(node)
## Add an output device that can be written to.
#
@ -522,7 +594,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

@ -12,6 +12,7 @@ from UM.Math.Vector import Vector
from UM.Math.AxisAlignedBox import AxisAlignedBox
from UM.Application import Application
from UM.Scene.Selection import Selection
from cura.ConvexHullDecorator import ConvexHullDecorator
from . import PlatformPhysicsOperation
from . import ConvexHullJob
@ -64,22 +65,26 @@ class PlatformPhysics:
move_vector.setY(-bbox.bottom)
# If there is no convex hull for the node, start calculating it and continue.
if not hasattr(node, "_convex_hull"):
if not hasattr(node, "_convex_hull_job"):
if not node.getDecorator(ConvexHullDecorator):
node.addDecorator(ConvexHullDecorator())
if not node.callDecoration("getConvexHull"):
if not node.callDecoration("getConvexHullJob"):
job = ConvexHullJob.ConvexHullJob(node)
job.start()
node._convex_hull_job = job
node.callDecoration("setConvexHullJob", job)
elif Selection.isSelected(node):
pass
else:
# Check for collisions between convex hulls
for other_node in BreadthFirstIterator(root):
# Ignore root, ourselves and anything that is not a normal SceneNode.
if other_node is root or type(other_node) is not SceneNode or other_node is node:
if other_node is root or type(other_node) is not SceneNode or other_node is node or other_node in node.getAllChildren() or node in other_node.getAllChildren():
continue
# Ignore nodes that do not have the right properties set.
if not hasattr(other_node, "_convex_hull") or not other_node.getBoundingBox():
if not other_node.callDecoration("getConvexHull") or not other_node.getBoundingBox():
continue
# Check to see if the bounding boxes intersect. If not, we can ignore the node as there is no way the hull intersects.
@ -87,17 +92,17 @@ class PlatformPhysics:
continue
# Get the overlap distance for both convex hulls. If this returns None, there is no intersection.
overlap = node._convex_hull.intersectsPolygon(other_node._convex_hull)
overlap = node.callDecoration("getConvexHull").intersectsPolygon(other_node.callDecoration("getConvexHull"))
if overlap is None:
continue
move_vector.setX(overlap[0] * 1.1)
move_vector.setZ(overlap[1] * 1.1)
if hasattr(node, "_convex_hull"):
convex_hull = node.callDecoration("getConvexHull")
if convex_hull:
# Check for collisions between disallowed areas and the object
for area in self._build_volume.getDisallowedAreas():
overlap = node._convex_hull.intersectsPolygon(area)
overlap = convex_hull.intersectsPolygon(area)
if overlap is None:
continue

View File

@ -3,7 +3,12 @@
# Copyright (c) 2015 Ultimaker B.V.
# Cura is released under the terms of the AGPLv3 or higher.
import cura.CuraApplication
try:
import cura.CuraApplication
app = cura.CuraApplication.CuraApplication.getInstance()
app.run()
except Exception as e:
import cura.CrashHandler
cura.CrashHandler.show()
app = cura.CuraApplication.CuraApplication.getInstance()
app.run()

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,14 +85,18 @@ 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 = Application.getInstance().getController().getActiveView()
if view.getPluginId() == "LayerView":
view.resetLayerData()

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.
@ -114,13 +116,14 @@ class LayerView(View):
self._current_layer_mesh = None
self.currentLayerNumChanged.emit()
currentLayerNumChanged = Signal()
def calculateMaxLayers(self):
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,7 +11,13 @@ 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):
active_view = self._controller.getActiveView()
@ -30,9 +36,13 @@ class LayerViewProxy(QObject):
active_view = self._controller.getActiveView()
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

@ -201,18 +201,18 @@ class PrinterConnection(SignalEmitter):
continue # Could not set the baud rate, go to the next
time.sleep(1.5) # Ensure that we are not talking to the bootloader. 1.5 sec seems to be the magic number
sucesfull_responses = 0
timeout_time = time.time() + 5
timeout_time = time.time() + 15
self._serial.write(b"\n")
self._sendCommand("M105") # Request temperature, as this should (if baudrate is correct) result in a command with "T:" in it
while timeout_time > time.time():
line = self._readline()
line = self._readline()
if line is None:
self.setIsConnected(False) # Something went wrong with reading, could be that close was called.
return
if b"T:" in line:
self._serial.timeout = 0.5
self._serial.write(b"\n")
self._sendCommand("M105")
sucesfull_responses += 1
if sucesfull_responses >= self._required_responses_auto_baud:
@ -220,6 +220,8 @@ class PrinterConnection(SignalEmitter):
self.setIsConnected(True)
Logger.log("i", "Established printer connection on port %s" % self._serial_port)
return
Logger.log("e", "Baud rate detection for %s failed", self._serial_port)
self.close() # Unable to connect, wrap up.
self.setIsConnected(False)
@ -469,7 +471,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

@ -46,6 +46,8 @@ class USBPrinterManager(QObject, SignalEmitter, Extension):
## Add menu item to top menu of the application.
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"])
@ -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()

File diff suppressed because it is too large Load Diff

Binary file not shown.

View File

@ -31,7 +31,7 @@ UM.Dialog {
Label {
id: version
text: "Cura 15.06"
text: "Cura %1".arg(UM.Application.version)
font: UM.Theme.fonts.large
anchors.horizontalCenter : logo.horizontalCenter
anchors.horizontalCenterOffset : (logo.width * 0.25)

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,9 @@ Item {
property alias deleteObject: deleteObjectAction;
property alias centerObject: centerObjectAction;
property alias groupObjects: groupObjectsAction;
property alias unGroupObjects:unGroupObjectsAction;
property alias multiplyObject: multiplyObjectAction;
property alias splitObject: splitObjectAction;
@ -120,7 +124,21 @@ Item {
//: Center object action
text: qsTr("Center Object on Platform");
}
Action
{
id: groupObjectsAction
text: qsTr("Group objects");
enabled: UM.Scene.numObjectsSelected > 1 ? true: false
}
Action
{
id: unGroupObjectsAction
text: qsTr("Ungroup objects");
enabled: UM.Scene.isGroupSelected
}
Action {
id: multiplyObjectAction;
//: Duplicate object action

View File

@ -41,7 +41,10 @@ UM.MainWindow {
var path = modelData.toString()
return (index + 1) + ". " + path.slice(path.lastIndexOf("/") + 1);
}
onTriggered: UM.MeshFileHandler.readLocalFile(modelData);
onTriggered: {
UM.MeshFileHandler.readLocalFile(modelData);
Printer.setPlatformActivity(true)
}
}
onObjectAdded: fileMenu.insertItem(index, object)
onObjectRemoved: fileMenu.removeItem(object)
@ -318,7 +321,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) {
@ -340,6 +347,16 @@ UM.MainWindow {
objectContextMenu.objectId = 0;
}
}
groupObjects.onTriggered:
{
Printer.groupSelected()
}
unGroupObjects.onTriggered:
{
Printer.ungroupSelected()
}
deleteAll.onTriggered: Printer.deleteAll()
resetAllTranslation.onTriggered: Printer.resetAllTranslation()
@ -366,6 +383,8 @@ UM.MainWindow {
MenuItem { action: actions.deleteObject; }
MenuItem { action: actions.multiplyObject; }
MenuItem { action: actions.splitObject; }
MenuItem { action: actions.groupObjects;}
MenuItem { action: actions.unGroupObjects;}
MenuSeparator { }
MenuItem { action: actions.deleteAll; }
MenuItem { action: actions.reloadAll; }
@ -408,6 +427,7 @@ UM.MainWindow {
onAccepted:
{
UM.MeshFileHandler.readLocalFile(fileUrl)
Printer.setPlatformActivity(true)
}
}

View File

@ -14,6 +14,7 @@ Rectangle {
property Action saveAction;
property real progress: UM.Backend.progress;
property bool activity: Printer.getPlatformActivity;
Behavior on progress { NumberAnimation { duration: 250; } }
property string currentDevice: "local_file"
@ -76,7 +77,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) {
@ -97,7 +98,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 {
@ -107,11 +108,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 material").arg(base.printMaterialAmount);
}
@ -125,7 +125,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 {
@ -135,7 +135,7 @@ Rectangle {
anchors.left: parent.left
anchors.leftMargin: UM.Theme.sizes.default_margin.width;
tooltip: ''
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

@ -1,41 +0,0 @@
{
"id": "hephestos",
"icon": "icon_ultimaker2.png",
"name": "Prusa i3 Hephestos",
"platform": "hephestos_platform.stl",
"inherits": "fdmprinter.json",
"machine_settings": {
"machine_width": { "default": 215 },
"machine_height": { "default": 210 },
"machine_depth": { "default": 180 },
"machine_center_is_zero": { "default": false },
"machine_nozzle_size": { "default": 0.4 },
"machine_head_shape_min_x": { "default": 75 },
"machine_head_shape_min_y": { "default": 18 },
"machine_head_shape_max_x": { "default": 18 },
"machine_head_shape_max_y": { "default": 35 },
"machine_nozzle_gantry_distance": { "default": 55 },
"machine_nozzle_offset_x_1": { "default": 0.0 },
"machine_nozzle_offset_y_1": { "default": 0.0 },
"machine_gcode_flavor": { "default": "RepRap (Marlin/Sprinter)" },
"machine_start_gcode": {
"default": "G21\nG90\nM107\nG28 X0 Y0\nG28 Z0\nG1 Z5.0 F1200\n; Purge extruder by drawing 2 lines\nM117\nG92 E0\nG1 X20.0 Y40 Z0.3 F3000.0\nG1 X200.0 Y40 Z0.3 F1500.0 E15\nG1 X200.0 Y41 Z0.3 F3000.0\nG1 X20.0 Y41 Z0.3 F1500.0 E30\nG1 E29.6 F3000\nG92 E0\nM117\nM106\nG1 F{travel_speed}\nM117 Printing..."
},
"machine_end_gcode": {
"default": "M104 S0\nM140 S0\nG91\nG1 E-5 F300\nG1 Z2 F{travel_speed}\nG90\nG28 X5 Y5\nM84\nG90"
}
},
"categories": {
"material": {
"settings": {
"material_bed_temperature": {
"visible": true
}
}
}
}
}

View File

@ -1,15 +0,0 @@
{
"id": "witbox",
"name": "Witbox",
"icon": "icon_ultimaker2.png",
"platform": "Witbox_platform.stl",
"platform_texture": "Ultimaker2backplate.png",
"inherits": "ultimaker2.json",
"machine_settings": {
"machine_width": { "default": 291 },
"machine_depth": { "default": 210 },
"machine_height": { "default": 200 }
}
}

View File

@ -31,7 +31,7 @@
},
"categories": {
"layer_height": {
"label": "Layer Height",
"label": "Line dimensions",
"visible": true,
"icon": "category_layer_height",
"settings": {
@ -46,8 +46,8 @@
"max_value_warning": 0.32
},
"layer_height_0": {
"label": "Initial Layer Thickness",
"description": "The layer thickness of the bottom layer. A thicker bottom layer makes sticking to the bed easier.",
"label": "Initial Layer Height",
"description": "The layer height of the bottom layer. A thicker bottom layer makes sticking to the bed easier.",
"unit": "mm",
"type": "float",
"default": 0.3,
@ -55,6 +55,118 @@
"min_value_warning": 0.04,
"max_value_warning": 0.32,
"visible": false
},
"line_width": {
"label": "Line Width",
"description": "Width of a single line. Each line will be printed with this width in mind. Generally the width of each line should correspond to the width of your nozzle, but for the outer wall and top/bottom surface smaller line widths may be chosen, for higher quality.",
"unit": "mm",
"min_value": 0.0001,
"min_value_warning": 0.2,
"max_value_warning": 5.0,
"default": 0.4,
"type": "float",
"visible": false,
"inherit_function": "machine_nozzle_size",
"children": {
"wall_line_width": {
"label": "Wall Line Width",
"description": "Width of a single shell line. Each line of the shell will be printed with this width in mind.",
"unit": "mm",
"min_value": 0.0001,
"min_value_warning": 0.2,
"max_value_warning": 5.0,
"default": 0.4,
"type": "float",
"visible": false,
"inherit_function": "max(machine_nozzle_size, (wall_thickness / (int(wall_thickness / (machine_nozzle_size - 0.0001) + 1))) if (wall_thickness / (int(wall_thickness / (machine_nozzle_size - 0.0001))) > machine_nozzle_size * 1.5) else (wall_thickness / int(wall_thickness / (machine_nozzle_size - 0.0001))))",
"children": {
"wall_line_width_0": {
"label": "Outer Wall Line Width",
"description": "Width of the outermost shell line. By printing a thinner outermost wall line you can print higher details with a larger nozzle.",
"unit": "mm",
"min_value": 0.0001,
"min_value_warning": 0.2,
"max_value_warning": 5.0,
"default": 0.4,
"type": "float",
"visible": false
},
"wall_line_width_x": {
"label": "Other Walls Line Width",
"description": "Width of a single shell line for all shell lines except the outermost one.",
"unit": "mm",
"min_value": 0.0001,
"min_value_warning": 0.2,
"max_value_warning": 5.0,
"default": 0.4,
"type": "float",
"visible": false
}
}
},
"skirt_line_width": {
"label": "Skirt line width",
"description": "Width of a single skirt line.",
"unit": "mm",
"min_value": 0.0001,
"min_value_warning": 0.2,
"max_value_warning": 5.0,
"default": 0.4,
"type": "float",
"visible": false
},
"skin_line_width": {
"label": "Top/bottom line width",
"description": "Width of a single top/bottom printed line, used to fill up the top/bottom areas of a print.",
"unit": "mm",
"min_value": 0.0001,
"min_value_warning": 0.2,
"max_value_warning": 5.0,
"default": 0.4,
"type": "float",
"visible": false
},
"infill_line_width": {
"label": "Infill line width",
"description": "Width of the inner infill printed lines.",
"unit": "mm",
"min_value": 0.0001,
"min_value_warning": 0.2,
"max_value_warning": 5.0,
"default": 0.4,
"type": "float",
"visible": false
},
"support_line_width": {
"label": "Support line width",
"description": "Width of the printed support structures lines.",
"unit": "mm",
"min_value": 0.0001,
"min_value_warning": 0.2,
"max_value_warning": 5.0,
"default": 0.4,
"type": "float",
"visible": false,
"active_if" : {
"setting": "support_enable",
"value": true
}
},
"support_roof_line_width": {
"label": "Support Hammock line width",
"description": "Width of a single hammock line, used to fill the roof of the support.",
"unit": "mm",
"default": 0.4,
"type": "float",
"visible": false,
"active_if" : {
"setting": "support_roof_enable",
"value": true
}
}
}
}
}
},
@ -93,104 +205,7 @@
"type": "int",
"visible": false,
"inherit_function": "max(1, (int(parent_value / (machine_nozzle_size - 0.0001) + 1) if (parent_value / max(1, int(parent_value / (machine_nozzle_size - 0.0001))) > machine_nozzle_size) * 1.5 else int(parent_value / (machine_nozzle_size - 0.0001))))"
},
"wall_line_width": {
"label": "Wall Line Width",
"description": "Width of a single shell line. Each line of the shell will be printed with this width in mind.",
"unit": "mm",
"min_value": 0.0,
"min_value_warning": 0.2,
"max_value_warning": 5.0,
"default": 0.4,
"type": "float",
"visible": false,
"inherit_function": "max(machine_nozzle_size, (parent_value / (int(parent_value / (machine_nozzle_size - 0.0001) + 1))) if (parent_value / (int(parent_value / (machine_nozzle_size - 0.0001))) > machine_nozzle_size * 1.5) else (parent_value / int(parent_value / (machine_nozzle_size - 0.0001))))",
"children": {
"wall_line_width_0": {
"label": "Outer Wall Line Width",
"description": "Width of the outermost shell line. By printing a thinner outermost wall line you can print higher details with a larger nozzle.",
"unit": "mm",
"min_value": 0.0,
"min_value_warning": 0.2,
"max_value_warning": 5.0,
"default": 0.4,
"type": "float",
"visible": false
},
"wall_line_width_x": {
"label": "Other Walls Line Width",
"description": "Width of a single shell line for all shell lines except the outermost one.",
"unit": "mm",
"min_value": 0.0,
"min_value_warning": 0.2,
"max_value_warning": 5.0,
"default": 0.4,
"type": "float",
"visible": false
},
"skirt_line_width": {
"label": "Skirt line width",
"description": "Width of a single skirt line.",
"unit": "mm",
"min_value": 0.0,
"min_value_warning": 0.2,
"max_value_warning": 5.0,
"default": 0.4,
"type": "float",
"visible": false
},
"skin_line_width": {
"label": "Top/bottom line width",
"description": "Width of a single top/bottom printed line, used to fill up the top/bottom areas of a print.",
"unit": "mm",
"min_value": 0.0,
"min_value_warning": 0.2,
"max_value_warning": 5.0,
"default": 0.4,
"type": "float",
"visible": false
},
"infill_line_width": {
"label": "Infill line width",
"description": "Width of the inner infill printed lines.",
"unit": "mm",
"min_value": 0.0,
"min_value_warning": 0.2,
"max_value_warning": 5.0,
"default": 0.4,
"type": "float",
"visible": false
},
"support_line_width": {
"label": "Support line width",
"description": "Width of the printed support structures lines.",
"unit": "mm",
"min_value": 0.0,
"min_value_warning": 0.2,
"max_value_warning": 5.0,
"default": 0.4,
"type": "float",
"visible": false,
"active_if" : {
"setting": "support_enable",
"value": true
}
},
"support_roof_line_width": {
"label": "Support Hammock line width",
"description": "Width of a single hammock line, used to fill the roof of the support.",
"unit": "mm",
"default": 0.4,
"type": "float",
"visible": false,
"active_if" : {
"setting": "support_roof_enable",
"value": true
}
}
}
}
}
}
},
"alternate_extra_perimeter": {
@ -389,7 +404,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 +696,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.",
@ -1363,7 +1399,7 @@
"min_value": 0.0,
"max_value_warning": 30.0,
"default": 0.0,
"inherit_function": "9999 if draft_shield_height_limitation == 'Full' && draft_shield_enabled else 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",
@ -1675,8 +1711,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",
@ -1688,7 +1749,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",
@ -1701,7 +1762,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",
@ -1714,7 +1775,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",
@ -1727,7 +1788,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",
@ -1742,7 +1803,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,
@ -1754,7 +1815,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,
@ -1766,7 +1827,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,
@ -1780,7 +1841,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",
@ -1792,7 +1853,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",
@ -1804,7 +1865,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",
@ -1816,7 +1877,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",
@ -1828,7 +1889,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",
@ -1840,7 +1901,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",
@ -1852,7 +1913,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",
@ -1864,7 +1925,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": [
@ -1880,7 +1941,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": "%",
@ -1892,7 +1953,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",
@ -1904,7 +1965,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",
@ -1916,7 +1977,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",
@ -1928,33 +1989,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

@ -0,0 +1,255 @@
{
"id": "hephestos",
"name": "BQ Prusa i3 Hephestos",
"platform": "hephestos_platform.stl",
"inherits": "fdmprinter.json",
"machine_settings": {
"machine_start_gcode": {
"default": "; -- START GCODE --\n;Sliced at: {day} {date} {time}\n;Basic settings: Layer height: {layer_height} Walls: {wall_thickness} Fill: {fill_density}\n;Print time: {print_time}\n;Filament used: {filament_amount}m {filament_weight}g\n;Filament cost: {filament_cost}\n;Uncomment to add your own temperature line\n;M109 S{print_temperature}\n;Uncomment to add your own bed temperature line\n;M190 S{print_bed_temperature}\nG21 ;metric values\nG90 ;absolute positioning\nM107 ;start with the fan off\nG28 X0 Y0 ;move X/Y to min endstops\nG28 Z0 ;move Z to min endstops\nG1 Z15.0 F1200 ;move the platform down 15mm\nG92 E0 ;zero the extruded length\nG1 F200 E20 ;extrude 20mm of feed stock\nG92 E0 ;zero the extruded length again\nG1 F7200 \n;Uncomment to put a printing message on LCD screen\n;M117 Printing...\n; -- end of START GCODE --"
},
"machine_end_gcode": {
"default": "; -- END GCODE --\nM104 S0 ;extruder heater off\nG91 ;relative positioning\nG1 E-20 F300 ;retract the filament a bit before lifting the nozzle, to release some of the pressure\nG1 Z10 F1200 ;move Z up\nG90 ;absolute positioning\nG1 X0 Y180 F1200 ;move Z up a bit and retract filament even more the way\nM84 ;steppers off\n; -- end of END GCODE --"
},
"machine_width": {
"default": 215
},
"machine_depth": {
"default": 210
},
"machine_height": {
"default": 180
},
"machine_heated_bed": {
"default": false
},
"machine_center_is_zero": {
"default": false
},
"machine_nozzle_offset_x_1": {
"default": 18.0
},
"machine_nozzle_offset_y_1": {
"default": 0.0
},
"machine_gcode_flavor": {
"default": "RepRap (Marlin/Sprinter)"
},
"machine_disallowed_areas": {
"default": [
[[-115.0, 112.5], [ -82.0, 112.5], [ -84.0, 104.5], [-115.0, 104.5]],
[[ 115.0, 112.5], [ 115.0, 104.5], [ 110.0, 104.5], [ 108.0, 112.5]],
[[-115.0, -112.5], [-115.0, -104.5], [ -84.0, -104.5], [ -82.0, -112.5]],
[[ 115.0, -112.5], [ 108.0, -112.5], [ 110.0, -104.5], [ 115.0, -104.5]]
]},
"machine_platform_offset": {
"default": [0.0, 100.0, 0.0]
},
"machine_nozzle_tip_outer_diameter": {
"default": 0.4
}
},
"categories": {
"resolution": {
"settings": {
"layer_height": {
"default": 0.2
},
"layer_height_0": {
"default": 0.2,
"visible": true
},
"shell_thickness": {
"default": 1.2,
"children": {
"wall_thickness": {
"default": 1.2,
"visible": false
},
"alternate_extra_perimeter": {
"default": false,
"visible": false
},
"top_bottom_thickness": {
"default": 0.8,
"visible": false,
"children": {
"top_thickness": {
"default": 0.8,
"visible": false,
"children": {
"top_layers": {
"default": 8,
"visible": false
}
}
},
"bottom_thickness": {
"default": 0.4,
"visible": false,
"children": {
"bottom_layers": {
"default": 8,
"visible": false
}
}
}
}
}
}
}
}
},
"material": {
"settings": {
"material_print_temperature": {
"default": 220,
"visible": true
},
"material_bed_temperature": {
"default": 0,
"visible": false
},
"material_diameter": {
"default": 1.75,
"visible": true
},
"material_flow": {
"default": 100.0,
"visible": true
},
"retraction_enable": {
"default": true,
"children": {
"retraction_speed": {
"default": 10.0,
"visible": true,
"children": {
"retraction_retract_speed": {
"default": 10.0,
"visible": true
},
"retraction_prime_speed": {
"default": 10.0,
"visible": true
}
}
},
"retraction_amount": {
"default": 1.0,
"visible": true
},
"retraction_minimal_extrusion": {
"default": 0.01,
"visible": false
},
"retraction_hop": {
"default": 0.75,
"visible": false
}
}
}
}
},
"speed": {
"settings": {
"speed_print": {
"default": 50.0,
"children": {
"speed_infill": {
"default": 50.0,
"visible": false
},
"speed_wall": {
"default":45.0,
"visible": false,
"children": {
"speed_wall_0": {
"default": 45.0,
"visible": false
},
"speed_wall_x": {
"default": 45.0,
"visible": false
}
}
},
"speed_topbottom": {
"default": 45.0,
"visible": false
},
"speed_support": {
"default": 45.0,
"visible": false
}
}
},
"speed_travel": {
"default": 120.0
},
"speed_layer_0": {
"default": 20.0,
"visible": false
}
}
},
"cooling": {
"settings": {
"cool_fan_full_at_height": {
"default": 1,
"visible": false
}
}
},
"support": {
"settings": {
"support_enable": {
"default": false
},
"support_type": {
"default": "Everywhere",
"visible": true
},
"support_z_distance": {
"default": 0.2,
"visible": false
},
"support_bottom_stair_step_height": {
"default": 1.0,
"visible": false
},
"support_join_distance": {
"default": 2.0,
"visible": false
},
"support_pattern": {
"default": "ZigZag",
"visible": true
},
"support_fill_rate": {
"default": 10,
"visible": false
}
}
},
"platform_adhesion": {
"settings": {
"skirt_minimal_length": {
"default": 150
},
"raft_line_spacing": {
"default": 1.0
},
"raft_base_linewidth": {
"default": 0.7
},
"raft_interface_thickness": {
"default": 0.2
},
"raft_interface_linewidth": {
"default": 0.2
}
}
}
}
}

View File

@ -0,0 +1,255 @@
{
"id": "hephestos_XL",
"name": "BQ Prusa i3 Hephestos XL",
"platform": "hephestos_platform.stl",
"inherits": "fdmprinter.json",
"machine_settings": {
"machine_start_gcode": {
"default": "; -- START GCODE --\n;Sliced at: {day} {date} {time}\n;Basic settings: Layer height: {layer_height} Walls: {wall_thickness} Fill: {fill_density}\n;Print time: {print_time}\n;Filament used: {filament_amount}m {filament_weight}g\n;Filament cost: {filament_cost}\n;Uncomment to add your own temperature line\n;M109 S{print_temperature}\n;Uncomment to add your own bed temperature line\n;M190 S{print_bed_temperature}\nG21 ;metric values\nG90 ;absolute positioning\nM107 ;start with the fan off\nG28 X0 Y0 ;move X/Y to min endstops\nG28 Z0 ;move Z to min endstops\nG1 Z15.0 F1200 ;move the platform down 15mm\nG92 E0 ;zero the extruded length\nG1 F200 E20 ;extrude 20mm of feed stock\nG92 E0 ;zero the extruded length again\nG1 F7200 \n;Uncomment to put a printing message on LCD screen\n;M117 Printing...\n; -- end of START GCODE --"
},
"machine_end_gcode": {
"default": "; -- END GCODE --\nM104 S0 ;extruder heater off\nG91 ;relative positioning\nG1 E-20 F300 ;retract the filament a bit before lifting the nozzle, to release some of the pressure\nG1 Z10 F1200 ;move Z up\nG91 ;absolute positioning\nG1 X0 Y180 F1200 ;move Z up a bit and retract filament even more the way\nM84 ;steppers off\n; -- end of END GCODE --"
},
"machine_width": {
"default": 200
},
"machine_depth": {
"default": 300
},
"machine_height": {
"default": 180
},
"machine_heated_bed": {
"default": false
},
"machine_center_is_zero": {
"default": false
},
"machine_nozzle_offset_x_1": {
"default": 18.0
},
"machine_nozzle_offset_y_1": {
"default": 0.0
},
"machine_gcode_flavor": {
"default": "RepRap (Marlin/Sprinter)"
},
"machine_disallowed_areas": {
"default": [
[[-115.0, 112.5], [ -82.0, 112.5], [ -84.0, 104.5], [-115.0, 104.5]],
[[ 115.0, 112.5], [ 115.0, 104.5], [ 110.0, 104.5], [ 108.0, 112.5]],
[[-115.0, -112.5], [-115.0, -104.5], [ -84.0, -104.5], [ -82.0, -112.5]],
[[ 115.0, -112.5], [ 108.0, -112.5], [ 110.0, -104.5], [ 115.0, -104.5]]
]},
"machine_platform_offset": {
"default": [0.0, 100.0, 0.0]
},
"machine_nozzle_tip_outer_diameter": {
"default": 0.4
}
},
"categories": {
"resolution": {
"settings": {
"layer_height": {
"default": 0.2
},
"layer_height_0": {
"default": 0.2,
"visible": true
},
"shell_thickness": {
"default": 1.2,
"children": {
"wall_thickness": {
"default": 1.2,
"visible": false
},
"alternate_extra_perimeter": {
"default": false,
"visible": false
},
"top_bottom_thickness": {
"default": 0.8,
"visible": false,
"children": {
"top_thickness": {
"default": 0.8,
"visible": false,
"children": {
"top_layers": {
"default": 8,
"visible": false
}
}
},
"bottom_thickness": {
"default": 0.4,
"visible": false,
"children": {
"bottom_layers": {
"default": 8,
"visible": false
}
}
}
}
}
}
}
}
},
"material": {
"settings": {
"material_print_temperature": {
"default": 220,
"visible": true
},
"material_bed_temperature": {
"default": 0,
"visible": false
},
"material_diameter": {
"default": 1.75,
"visible": true
},
"material_flow": {
"default": 100.0,
"visible": true
},
"retraction_enable": {
"default": true,
"children": {
"retraction_speed": {
"default": 10.0,
"visible": true,
"children": {
"retraction_retract_speed": {
"default": 10.0,
"visible": true
},
"retraction_prime_speed": {
"default": 10.0,
"visible": true
}
}
},
"retraction_amount": {
"default": 1.0,
"visible": true
},
"retraction_minimal_extrusion": {
"default": 0.01,
"visible": false
},
"retraction_hop": {
"default": 0.75,
"visible": false
}
}
}
}
},
"speed": {
"settings": {
"speed_print": {
"default": 50.0,
"children": {
"speed_infill": {
"default": 50.0,
"visible": false
},
"speed_wall": {
"default":45.0,
"visible": false,
"children": {
"speed_wall_0": {
"default": 45.0,
"visible": false
},
"speed_wall_x": {
"default": 45.0,
"visible": false
}
}
},
"speed_topbottom": {
"default": 45.0,
"visible": false
},
"speed_support": {
"default": 45.0,
"visible": false
}
}
},
"speed_travel": {
"default": 120.0
},
"speed_layer_0": {
"default": 20.0,
"visible": false
}
}
},
"cooling": {
"settings": {
"cool_fan_full_at_height": {
"default": 1,
"visible": false
}
}
},
"support": {
"settings": {
"support_enable": {
"default": false
},
"support_type": {
"default": "Everywhere",
"visible": true
},
"support_z_distance": {
"default": 0.2,
"visible": false
},
"support_bottom_stair_step_height": {
"default": 1.0,
"visible": false
},
"support_join_distance": {
"default": 2.0,
"visible": false
},
"support_pattern": {
"default": "ZigZag",
"visible": true
},
"support_fill_rate": {
"default": 10,
"visible": false
}
}
},
"platform_adhesion": {
"settings": {
"skirt_minimal_length": {
"default": 150
},
"raft_line_spacing": {
"default": 1.0
},
"raft_base_linewidth": {
"default": 0.7
},
"raft_interface_thickness": {
"default": 0.2
},
"raft_interface_linewidth": {
"default": 0.2
}
}
}
}
}

View File

@ -0,0 +1,255 @@
{
"id": "witbox",
"name": "BQ Witbox",
"platform": "witbox_platform.stl",
"inherits": "fdmprinter.json",
"machine_settings": {
"machine_start_gcode": {
"default": "; -- START GCODE --\n;Sliced at: {day} {date} {time}\n;Basic settings: Layer height: {layer_height} Walls: {wall_thickness} Fill: {fill_density}\n;Print time: {print_time}\n;Filament used: {filament_amount}m {filament_weight}g\n;Filament cost: {filament_cost}\n;Uncomment to add your own temperature line\n;M109 S{print_temperature}\n;Uncomment to add your own bed temperature line\n;M190 S{print_bed_temperature}\nG21 ;metric values\nG90 ;absolute positioning\nM107 ;start with the fan off\nG28 X0 Y0 ;move X/Y to min endstops\nG28 Z0 ;move Z to min endstops\nG1 Z15.0 F1200 ;move the platform down 15mm\nG92 E0 ;zero the extruded length\nG1 F200 E20 ;extrude 20mm of feed stock\nG92 E0 ;zero the extruded length again\nG1 F7800 \n;Uncomment to put a printing message on LCD screen\n;M117 Printing...\n; -- end of START GCODE --"
},
"machine_end_gcode": {
"default": "; -- END GCODE --\nM104 S0 ;extruder heater off\nG91 ;relative positioning\nG1 E-20 F300 ;retract the filament a bit before lifting the nozzle, to release some of the pressure\nG91 ;relative positioning\nG1 Z10 F1200 ;move Z up a bit and retract filament even more\nG28 X0 Y0 ;move X/Y to min endstops, so the head is out of the way\nM84 ;steppers off\n; -- end of END GCODE --"
},
"machine_width": {
"default": 297
},
"machine_depth": {
"default": 210
},
"machine_height": {
"default": 200
},
"machine_heated_bed": {
"default": false
},
"machine_center_is_zero": {
"default": false
},
"machine_nozzle_offset_x_1": {
"default": 18.0
},
"machine_nozzle_offset_y_1": {
"default": 0.0
},
"machine_gcode_flavor": {
"default": "RepRap (Marlin/Sprinter)"
},
"machine_disallowed_areas": {
"default": [
[[-115.0, 112.5], [ -82.0, 112.5], [ -84.0, 104.5], [-115.0, 104.5]],
[[ 115.0, 112.5], [ 115.0, 104.5], [ 110.0, 104.5], [ 108.0, 112.5]],
[[-115.0, -112.5], [-115.0, -104.5], [ -84.0, -104.5], [ -82.0, -112.5]],
[[ 115.0, -112.5], [ 108.0, -112.5], [ 110.0, -104.5], [ 115.0, -104.5]]
]},
"machine_platform_offset": {
"default": [0.0, -145.0, -38.0]
},
"machine_nozzle_tip_outer_diameter": {
"default": 0.4
}
},
"categories": {
"resolution": {
"settings": {
"layer_height": {
"default": 0.2
},
"layer_height_0": {
"default": 0.2,
"visible": true
},
"shell_thickness": {
"default": 1.2,
"children": {
"wall_thickness": {
"default": 1.2,
"visible": false
},
"alternate_extra_perimeter": {
"default": false,
"visible": false
},
"top_bottom_thickness": {
"default": 0.8,
"visible": false,
"children": {
"top_thickness": {
"default": 0.8,
"visible": false,
"children": {
"top_layers": {
"default": 8,
"visible": false
}
}
},
"bottom_thickness": {
"default": 0.4,
"visible": false,
"children": {
"bottom_layers": {
"default": 8,
"visible": false
}
}
}
}
}
}
}
}
},
"material": {
"settings": {
"material_print_temperature": {
"default": 220,
"visible": true
},
"material_bed_temperature": {
"default": 0,
"visible": false
},
"material_diameter": {
"default": 1.75,
"visible": true
},
"material_flow": {
"default": 100.0,
"visible": true
},
"retraction_enable": {
"default": true,
"children": {
"retraction_speed": {
"default": 10.0,
"visible": true,
"children": {
"retraction_retract_speed": {
"default": 10.0,
"visible": true
},
"retraction_prime_speed": {
"default": 10.0,
"visible": true
}
}
},
"retraction_amount": {
"default": 1.0,
"visible": true
},
"retraction_minimal_extrusion": {
"default": 0.01,
"visible": false
},
"retraction_hop": {
"default": 0.75,
"visible": false
}
}
}
}
},
"speed": {
"settings": {
"speed_print": {
"default": 50.0,
"children": {
"speed_infill": {
"default": 50.0,
"visible": false
},
"speed_wall": {
"default":45.0,
"visible": false,
"children": {
"speed_wall_0": {
"default": 45.0,
"visible": false
},
"speed_wall_x": {
"default": 45.0,
"visible": false
}
}
},
"speed_topbottom": {
"default": 45.0,
"visible": false
},
"speed_support": {
"default": 45.0,
"visible": false
}
}
},
"speed_travel": {
"default": 130.0
},
"speed_layer_0": {
"default": 20.0,
"visible": false
}
}
},
"cooling": {
"settings": {
"cool_fan_full_at_height": {
"default": 1,
"visible": false
}
}
},
"support": {
"settings": {
"support_enable": {
"default": false
},
"support_type": {
"default": "Everywhere",
"visible": true
},
"support_z_distance": {
"default": 0.2,
"visible": false
},
"support_bottom_stair_step_height": {
"default": 1.0,
"visible": false
},
"support_join_distance": {
"default": 2.0,
"visible": false
},
"support_pattern": {
"default": "ZigZag",
"visible": true
},
"support_fill_rate": {
"default": 10,
"visible": false
}
}
},
"platform_adhesion": {
"settings": {
"skirt_minimal_length": {
"default": 150
},
"raft_line_spacing": {
"default": 1.0
},
"raft_base_linewidth": {
"default": 0.7
},
"raft_interface_thickness": {
"default": 0.2
},
"raft_interface_linewidth": {
"default": 0.2
}
}
}
}
}

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],