Merge branch 'master' of github.com:ultimaker/Cura into per_object_settings

* 'master' of github.com:ultimaker/Cura: (98 commits)
  15.10 Restyling of the message stack
  Fixed machine head polygons
  Removed unused settings from fdmprinter
  Added action for togling fullscreen
  Fixed usage of wrong checkbox in viewpage
  Added preference to disable automatic push free
  Added preference to disable auto center when selecting object
  Cleanup
  15.10 Restyling toolbar, viewmode button
  Update README.md
  Update README.md
  Added rudementary 3 point bed leveling
  15.10 New font for Cura
  15.10 Changes the styling for the open file button
  15.10 Changes the label names for the different action buttons
  Fixed typo
  Endstop now stops listening upon destruction
  15.10 Re-alignment of the messagestack
  Cleaned up code a bit
  Added heated bed check
  ...
This commit is contained in:
Arjen Hiemstra 2015-08-21 13:29:30 +02:00
commit f099c30dfd
66 changed files with 2608 additions and 1842 deletions

View file

@ -2,6 +2,8 @@
project(cura)
cmake_minimum_required(VERSION 2.8.12)
include(GNUInstallDirs)
set(URANIUM_SCRIPTS_DIR "${CMAKE_SOURCE_DIR}/../uranium/scripts" CACHE DIRECTORY "The location of the scripts directory of the Uranium repository")
if(NOT ${URANIUM_SCRIPTS_DIR} STREQUAL "")
@ -10,13 +12,14 @@ if(NOT ${URANIUM_SCRIPTS_DIR} STREQUAL "")
# Build Translations
find_package(Gettext)
find_package(Qt5LinguistTools QUIET CONFIG)
if(GETTEXT_FOUND AND Qt5LinguistTools_FOUND)
include(${URANIUM_SCRIPTS_DIR}/ECMPoQmTools.cmake)
if(GETTEXT_FOUND)
# translations target will convert .po files into .mo and .qm as needed.
# The files are checked for a _qt suffix and if it is found, converted to
# qm, otherwise they are converted to .po.
add_custom_target(translations)
add_custom_target(translations ALL)
# copy-translations can be used to copy the built translation files from the
# build directory to the source resources directory. This is mostly a convenience
# during development, normally you want to simply use the install target to install
@ -51,11 +54,12 @@ if(NOT ${URANIUM_SCRIPTS_DIR} STREQUAL "")
foreach(file ${qm_files} ${mo_files})
add_custom_command(TARGET copy-translations POST_BUILD COMMAND mkdir ARGS -p ${CMAKE_SOURCE_DIR}/resources/i18n/${lang}/LC_MESSAGES/ COMMAND cp ARGS ${file} ${CMAKE_SOURCE_DIR}/resources/i18n/${lang}/LC_MESSAGES/ COMMENT "Copying ${file}...")
endforeach()
install(FILES ${qm_files} ${mo_files} DESTINATION ${CMAKE_INSTALL_DATADIR}/uranium/resources/i18n/${lang}/LC_MESSAGES/)
endforeach()
endif()
endif()
include(GNUInstallDirs)
find_package(PythonInterp 3.4.0 REQUIRED)
install(DIRECTORY resources DESTINATION ${CMAKE_INSTALL_DATADIR}/cura)

View file

@ -39,7 +39,8 @@ Please checkout [cura-build](https://github.com/Ultimaker/cura-build)
Third party plugins
-------------
[Print time calculator](https://github.com/nallath/PrintCostCalculator)
* [Print time calculator](https://github.com/nallath/PrintCostCalculator)
* [Post processing plugin](https://github.com/nallath/PostProcessingPlugin)
Making profiles for other printers
----------------------------------

View file

@ -5,7 +5,7 @@ GenericName=3D Printing Software
Comment=
Exec=/usr/bin/cura_app.py
TryExec=/usr/bin/cura_app.py
Icon=/usr/share/cura/resources/images/cura_icon.png
Icon=/usr/share/cura/resources/images/cura-icon.png
Terminal=false
Type=Application
Categories=Graphics;

View file

@ -36,7 +36,8 @@ class ConvexHullJob(Job):
return
mesh = self._node.getMeshData()
vertex_data = mesh.getTransformed(self._node.getWorldTransformation()).getVertices()
# Don't use data below 0. TODO; We need a better check for this as this gives poor results for meshes with long edges.
vertex_data = vertex_data[vertex_data[:,1]>0]
hull = Polygon(numpy.rint(vertex_data[:, [0, 2]]).astype(int))
# First, calculate the normal convex hull around the points

View file

@ -33,14 +33,14 @@ class ConvexHullNode(SceneNode):
self._hull = hull
hull_points = self._hull.getPoints()
center = (hull_points.min(0) + hull_points.max(0)) / 2.0
mesh = MeshData()
if len(hull_points) > 3:
center = (hull_points.min(0) + hull_points.max(0)) / 2.0
mesh.addVertex(center[0], 0.1, center[1])
else: #Hull has not enough points
return
for point in hull_points:
mesh.addVertex(point[0], 0.1, point[1])
indices = []
for i in range(len(hull_points) - 1):
indices.append([0, i + 1, i + 2])

View file

@ -38,7 +38,11 @@ from . import PrintInformation
from . import CuraActions
from . import MultiMaterialDecorator
<<<<<<< HEAD
from PyQt5.QtCore import pyqtSlot, QUrl, Qt, pyqtSignal, pyqtProperty, Q_ENUMS
=======
from PyQt5.QtCore import pyqtSlot, QUrl, Qt, pyqtSignal, pyqtProperty, QEvent
>>>>>>> 3cb3cce31c821a56d2395607a90b51030fdf0916
from PyQt5.QtGui import QColor, QIcon
import platform
@ -84,6 +88,7 @@ class CuraApplication(QtApplication):
self._platform_activity = False
self.getMachineManager().activeMachineInstanceChanged.connect(self._onActiveMachineChanged)
self.getController().getScene().sceneChanged.connect(self.updatePlatformActivity)
Resources.addType(self.ResourceTypes.QmlFiles, "qml")
Resources.addType(self.ResourceTypes.Firmware, "firmware")
@ -92,6 +97,7 @@ class CuraApplication(QtApplication):
Preferences.getInstance().addPreference("cura/active_mode", "simple")
Preferences.getInstance().addPreference("cura/recent_files", "")
Preferences.getInstance().addPreference("cura/categories_expanded", "")
Preferences.getInstance().addPreference("view/center_on_select", True)
JobQueue.getInstance().jobFinished.connect(self._onJobFinished)
@ -123,6 +129,11 @@ class CuraApplication(QtApplication):
def run(self):
self._i18n_catalog = i18nCatalog("cura");
i18nCatalog.setTagReplacements({
"filename": "font color=\"black\"",
"message": "font color=UM.Theme.colors.message_text;",
})
self.showSplashMessage(self._i18n_catalog.i18nc("Splash screen message", "Setting up scene..."))
controller = self.getController()
@ -133,7 +144,7 @@ class CuraApplication(QtApplication):
t = controller.getTool("TranslateTool")
if t:
t.setEnabledAxis([ToolHandle.XAxis, ToolHandle.ZAxis])
t.setEnabledAxis([ToolHandle.XAxis, ToolHandle.YAxis,ToolHandle.ZAxis])
Selection.selectionChanged.connect(self.onSelectionChanged)
@ -181,12 +192,17 @@ class CuraApplication(QtApplication):
self.closeSplash()
for file in self.getCommandLineOption("file", []):
job = ReadMeshJob(os.path.abspath(file))
job.finished.connect(self._onFileLoaded)
job.start()
self._openFile(file)
self.exec_()
# Handle Qt events
def event(self, event):
if event.type() == QEvent.FileOpen:
self._openFile(event.file())
return super().event(event)
def registerObjects(self, engine):
engine.rootContext().setContextProperty("Printer", self)
self._print_information = PrintInformation.PrintInformation()
@ -202,7 +218,7 @@ class CuraApplication(QtApplication):
self._previous_active_tool = None
else:
self.getController().setActiveTool("TranslateTool")
if Preferences.getInstance().getValue("view/center_on_select"):
self._camera_animation.setStart(self.getController().getTool("CameraTool").getOrigin())
self._camera_animation.setTarget(Selection.getSelectedObject(0).getWorldPosition())
self._camera_animation.start()
@ -220,24 +236,15 @@ class CuraApplication(QtApplication):
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 = []
def updatePlatformActivity(self, node = None):
count = 0
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
count += 1
self._platform_activity = True if count > 0 else False
self.activityChanged.emit()
## Remove an object from the scene
@ -258,7 +265,6 @@ class CuraApplication(QtApplication):
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)
@ -306,7 +312,6 @@ class CuraApplication(QtApplication):
op.addOperation(RemoveSceneNodeOperation(node))
op.push()
self.setPlatformActivity(False)
## Reset all translation on nodes with mesh data.
@pyqtSlot()
@ -490,12 +495,9 @@ class CuraApplication(QtApplication):
self._platform.setPosition(Vector(0.0, 0.0, 0.0))
def _onFileLoaded(self, job):
mesh = job.getResult()
if mesh != None:
node = SceneNode()
node = job.getResult()
if node != None:
node.setSelectable(True)
node.setMeshData(mesh)
node.setName(os.path.basename(job.getFileName()))
op = AddSceneNodeOperation(node, self.getController().getScene().getRoot())
@ -521,4 +523,10 @@ class CuraApplication(QtApplication):
self.recentFilesChanged.emit()
def _reloadMeshFinished(self, job):
job._node.setMeshData(job.getResult())
job._node = job.getResult()
def _openFile(self, file):
job = ReadMeshJob(os.path.abspath(file))
job.finished.connect(self._onFileLoaded)
job.start()

View file

@ -12,6 +12,8 @@ from UM.Math.Vector import Vector
from UM.Math.AxisAlignedBox import AxisAlignedBox
from UM.Application import Application
from UM.Scene.Selection import Selection
from UM.Preferences import Preferences
from cura.ConvexHullDecorator import ConvexHullDecorator
from . import PlatformPhysicsOperation
@ -19,6 +21,7 @@ from . import ConvexHullJob
import time
import threading
import copy
class PlatformPhysics:
def __init__(self, controller, volume):
@ -36,6 +39,8 @@ class PlatformPhysics:
self._change_timer.setSingleShot(True)
self._change_timer.timeout.connect(self._onChangeTimerFinished)
Preferences.getInstance().addPreference("physics/automatic_push_free", True)
def _onSceneChanged(self, source):
self._change_timer.start()
@ -53,16 +58,21 @@ class PlatformPhysics:
self._change_timer.start()
continue
build_volume_bounding_box = copy.deepcopy(self._build_volume.getBoundingBox())
build_volume_bounding_box.setBottom(-9001) # Ignore intersections with the bottom
# Mark the node as outside the build volume if the bounding box test fails.
if self._build_volume.getBoundingBox().intersectsBox(bbox) != AxisAlignedBox.IntersectionResult.FullIntersection:
if build_volume_bounding_box.intersectsBox(bbox) != AxisAlignedBox.IntersectionResult.FullIntersection:
node._outside_buildarea = True
else:
node._outside_buildarea = False
# Move the node upwards if the bottom is below the build platform.
# Move it downwards if bottom is above platform
move_vector = Vector()
if not Float.fuzzyCompare(bbox.bottom, 0.0):
if bbox.bottom > 0:
move_vector.setY(-bbox.bottom)
#if not Float.fuzzyCompare(bbox.bottom, 0.0):
# pass#move_vector.setY(-bbox.bottom)
# If there is no convex hull for the node, start calculating it and continue.
if not node.getDecorator(ConvexHullDecorator):
@ -76,7 +86,7 @@ class PlatformPhysics:
elif Selection.isSelected(node):
pass
else:
elif Preferences.getInstance().getValue("physics/automatic_push_free"):
# Check for collisions between convex hulls
for other_node in BreadthFirstIterator(root):
# Ignore root, ourselves and anything that is not a normal SceneNode.
@ -109,6 +119,8 @@ class PlatformPhysics:
move_vector.setZ(overlap[1] * 1.1)
convex_hull = node.callDecoration("getConvexHull")
if convex_hull:
if not convex_hull.isValid():
return
# Check for collisions between disallowed areas and the object
for area in self._build_volume.getDisallowedAreas():
overlap = convex_hull.intersectsPolygon(area)

View file

@ -0,0 +1,124 @@
# Copyright (c) 2015 Ultimaker B.V.
# Cura is released under the terms of the AGPLv3 or higher.
from UM.Mesh.MeshReader import MeshReader
from UM.Mesh.MeshData import MeshData
from UM.Logger import Logger
from UM.Math.Matrix import Matrix
from UM.Math.Vector import Vector
from UM.Scene.SceneNode import SceneNode
from UM.Scene.GroupDecorator import GroupDecorator
from UM.Math.Quaternion import Quaternion
import os
import struct
import math
from os import listdir
import zipfile
import xml.etree.ElementTree as ET
## Base implementation for reading 3MF files. Has no support for textures. Only loads meshes!
class ThreeMFReader(MeshReader):
def __init__(self):
super(ThreeMFReader, self).__init__()
self._supported_extension = ".3mf"
self._namespaces = {
"3mf": "http://schemas.microsoft.com/3dmanufacturing/core/2015/02",
"cura": "http://software.ultimaker.com/xml/cura/3mf/2015/10"
}
def read(self, file_name):
result = None
extension = os.path.splitext(file_name)[1]
if extension.lower() == self._supported_extension:
result = SceneNode()
# The base object of 3mf is a zipped archive.
archive = zipfile.ZipFile(file_name, 'r')
try:
root = ET.parse(archive.open("3D/3dmodel.model"))
# There can be multiple objects, try to load all of them.
objects = root.findall("./3mf:resources/3mf:object", self._namespaces)
for object in objects:
mesh = MeshData()
node = SceneNode()
vertex_list = []
#for vertex in object.mesh.vertices.vertex:
for vertex in object.findall(".//3mf:vertex", self._namespaces):
vertex_list.append([vertex.get("x"), vertex.get("y"), vertex.get("z")])
triangles = object.findall(".//3mf:triangle", self._namespaces)
mesh.reserveFaceCount(len(triangles))
#for triangle in object.mesh.triangles.triangle:
for triangle in triangles:
v1 = int(triangle.get("v1"))
v2 = int(triangle.get("v2"))
v3 = int(triangle.get("v3"))
mesh.addFace(vertex_list[v1][0],vertex_list[v1][1],vertex_list[v1][2],vertex_list[v2][0],vertex_list[v2][1],vertex_list[v2][2],vertex_list[v3][0],vertex_list[v3][1],vertex_list[v3][2])
#TODO: We currently do not check for normals and simply recalculate them.
mesh.calculateNormals()
node.setMeshData(mesh)
node.setSelectable(True)
transformation = root.findall("./3mf:build/3mf:item[@objectid='{0}']".format(object.get("id")), self._namespaces)
if transformation:
transformation = transformation[0]
if transformation.get("transform"):
splitted_transformation = transformation.get("transform").split()
## Transformation is saved as:
## M00 M01 M02 0.0
## M10 M11 M12 0.0
## M20 M21 M22 0.0
## M30 M31 M32 1.0
## We switch the row & cols as that is how everyone else uses matrices!
temp_mat = Matrix()
# Rotation & Scale
temp_mat._data[0,0] = splitted_transformation[0]
temp_mat._data[1,0] = splitted_transformation[1]
temp_mat._data[2,0] = splitted_transformation[2]
temp_mat._data[0,1] = splitted_transformation[3]
temp_mat._data[1,1] = splitted_transformation[4]
temp_mat._data[2,1] = splitted_transformation[5]
temp_mat._data[0,2] = splitted_transformation[6]
temp_mat._data[1,2] = splitted_transformation[7]
temp_mat._data[2,2] = splitted_transformation[8]
# Translation
temp_mat._data[0,3] = splitted_transformation[9]
temp_mat._data[1,3] = splitted_transformation[10]
temp_mat._data[2,3] = splitted_transformation[11]
node.setPosition(Vector(temp_mat.at(0,3), temp_mat.at(1,3), temp_mat.at(2,3)))
temp_quaternion = Quaternion()
temp_quaternion.setByMatrix(temp_mat)
node.setOrientation(temp_quaternion)
# Magical scale extraction
S2 = temp_mat.getTransposed().multiply(temp_mat)
scale_x = math.sqrt(S2.at(0,0))
scale_y = math.sqrt(S2.at(1,1))
scale_z = math.sqrt(S2.at(2,2))
node.setScale(Vector(scale_x,scale_y,scale_z))
# We use a different coordinate frame, so rotate.
rotation = Quaternion.fromAngleAxis(-0.5 * math.pi, Vector(1,0,0))
node.rotate(rotation)
result.addChild(node)
#If there is more then one object, group them.
try:
if len(objects) > 1:
group_decorator = GroupDecorator()
result.addDecorator(group_decorator)
except:
pass
except Exception as e:
Logger.log("e" ,"exception occured in 3mf reader: %s" , e)
return result

View file

@ -0,0 +1,25 @@
# Copyright (c) 2015 Ultimaker B.V.
# Cura is released under the terms of the AGPLv3 or higher.
from UM.i18n import i18nCatalog
catalog = i18nCatalog("cura")
from . import ThreeMFReader
def getMetaData():
return {
"plugin": {
"name": "3MF Reader",
"author": "Ultimaker",
"version": "1.0",
"description": catalog.i18nc("3MF Reader plugin description", "Provides support for reading 3MF files."),
"api": 2
},
"mesh_reader": {
"extension": "3mf",
"description": catalog.i18nc("3MF Reader plugin file type", "3MF File")
}
}
def register(app):
return { "mesh_reader": ThreeMFReader.ThreeMFReader() }

View file

@ -17,8 +17,8 @@ class RemovableDriveOutputDevice(OutputDevice):
super().__init__(device_id)
self.setName(device_name)
self.setShortDescription(catalog.i18nc("", "Save to Removable Drive"))
self.setDescription(catalog.i18nc("", "Save to Removable Drive {0}").format(device_name))
self.setShortDescription(catalog.i18nc("@action:button", "Save to Removable Drive"))
self.setDescription(catalog.i18nc("@info:tooltip", "Save to Removable Drive {0}").format(device_name))
self.setIconName("save_sd")
self.setPriority(1)
@ -49,7 +49,7 @@ class RemovableDriveOutputDevice(OutputDevice):
job.progress.connect(self._onProgress)
job.finished.connect(self._onFinished)
message = Message(catalog.i18nc("", "Saving to Removable Drive {0}").format(self.getName()), 0, False, -1)
message = Message(catalog.i18nc("@info:status", "Saving to Removable Drive <filename>{0}</filename>").format(self.getName()), 0, False, -1)
message.show()
job._message = message

View file

@ -8,15 +8,34 @@ import time
import queue
import re
import functools
import os
import os.path
from UM.Application import Application
from UM.Signal import Signal, SignalEmitter
from UM.Resources import Resources
from UM.Logger import Logger
from UM.OutputDevice.OutputDevice import OutputDevice
from UM.OutputDevice import OutputDeviceError
from UM.PluginRegistry import PluginRegistry
class PrinterConnection(SignalEmitter):
def __init__(self, serial_port):
super().__init__()
from PyQt5.QtQuick import QQuickView
from PyQt5.QtQml import QQmlComponent, QQmlContext
from PyQt5.QtCore import QUrl, QObject, pyqtSlot, pyqtProperty, pyqtSignal, Qt
from UM.i18n import i18nCatalog
catalog = i18nCatalog("cura")
class PrinterConnection(OutputDevice, QObject, SignalEmitter):
def __init__(self, serial_port, parent = None):
QObject.__init__(self, parent)
OutputDevice.__init__(self, serial_port)
SignalEmitter.__init__(self)
#super().__init__(serial_port)
self.setName(catalog.i18nc("@item:inmenu", "USB printing"))
self.setShortDescription(catalog.i18nc("@action:button", "Print with USB"))
self.setDescription(catalog.i18nc("@info:tooltip", "Print with USB"))
self.setIconName("print")
self._serial = None
self._serial_port = serial_port
@ -25,6 +44,9 @@ class PrinterConnection(SignalEmitter):
self._connect_thread = threading.Thread(target = self._connect)
self._connect_thread.daemon = True
self._end_stop_thread = threading.Thread(target = self._pollEndStop)
self._end_stop_thread.deamon = True
# Printer is connected
self._is_connected = False
@ -33,7 +55,7 @@ class PrinterConnection(SignalEmitter):
# The baud checking is done by sending a number of m105 commands to the printer and waiting for a readable
# response. If the baudrate is correct, this should make sense, else we get giberish.
self._required_responses_auto_baud = 10
self._required_responses_auto_baud = 3
self._progress = 0
@ -41,7 +63,7 @@ class PrinterConnection(SignalEmitter):
self._listen_thread.daemon = True
self._update_firmware_thread = threading.Thread(target= self._updateFirmware)
self._update_firmware_thread.demon = True
self._update_firmware_thread.deamon = True
self._heatup_wait_start_time = time.time()
@ -78,6 +100,14 @@ class PrinterConnection(SignalEmitter):
# Current Z stage location
self._current_z = 0
self._x_min_endstop_pressed = False
self._y_min_endstop_pressed = False
self._z_min_endstop_pressed = False
self._x_max_endstop_pressed = False
self._y_max_endstop_pressed = False
self._z_max_endstop_pressed = False
# In order to keep the connection alive we request the temperature every so often from a different extruder.
# This index is the extruder we requested data from the last time.
self._temperature_requested_extruder_index = 0
@ -86,6 +116,31 @@ class PrinterConnection(SignalEmitter):
self._firmware_file_name = None
self._control_view = None
onError = pyqtSignal()
progressChanged = pyqtSignal()
extruderTemperatureChanged = pyqtSignal()
bedTemperatureChanged = pyqtSignal()
endstopStateChanged = pyqtSignal(str ,bool, arguments = ["key","state"])
@pyqtProperty(float, notify = progressChanged)
def progress(self):
return self._progress
@pyqtProperty(float, notify = extruderTemperatureChanged)
def extruderTemperature(self):
return self._extruder_temperatures[0]
@pyqtProperty(float, notify = bedTemperatureChanged)
def bedTemperature(self):
return self._bed_temperature
@pyqtProperty(str, notify = onError)
def error(self):
return self._error_state
# TODO: Might need to add check that extruders can not be changed when it started printing or loading these settings from settings object
def setNumExtuders(self, num):
self._extruder_count = num
@ -98,6 +153,11 @@ class PrinterConnection(SignalEmitter):
return False
return self._is_printing
@pyqtSlot()
def startPrint(self):
gcode_list = getattr( Application.getInstance().getController().getScene(), "gcode_list")
self.printGCode(gcode_list)
## Start a print based on a g-code.
# \param gcode_list List with gcode (strings).
def printGCode(self, gcode_list):
@ -162,6 +222,8 @@ class PrinterConnection(SignalEmitter):
self.setProgress(100, 100)
self.firmwareUpdateComplete.emit()
## Upload new firmware to machine
# \param filename full path of firmware file to be uploaded
def updateFirmware(self, file_name):
@ -169,6 +231,20 @@ class PrinterConnection(SignalEmitter):
self._firmware_file_name = file_name
self._update_firmware_thread.start()
@pyqtSlot()
def startPollEndstop(self):
self._poll_endstop = True
self._end_stop_thread.start()
@pyqtSlot()
def stopPollEndstop(self):
self._poll_endstop = False
def _pollEndStop(self):
while self._is_connected and self._poll_endstop:
self.sendCommand("M119")
time.sleep(0.5)
## Private connect function run by thread. Can be started by calling connect.
def _connect(self):
Logger.log("d", "Attempting to connect to %s", self._serial_port)
@ -189,7 +265,6 @@ class PrinterConnection(SignalEmitter):
# If the programmer connected, we know its an atmega based version. Not all that usefull, but it does give some debugging information.
for baud_rate in self._getBaudrateList(): # Cycle all baud rates (auto detect)
if self._serial is None:
try:
self._serial = serial.Serial(str(self._serial_port), baud_rate, timeout = 3, writeTimeout = 10000)
@ -201,10 +276,9 @@ 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() + 15
timeout_time = time.time() + 5
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()
if line is None:
@ -213,7 +287,6 @@ class PrinterConnection(SignalEmitter):
if b"T:" in line:
self._serial.timeout = 0.5
self._sendCommand("M105")
sucesfull_responses += 1
if sucesfull_responses >= self._required_responses_auto_baud:
self._serial.timeout = 2 #Reset serial timeout
@ -221,6 +294,8 @@ class PrinterConnection(SignalEmitter):
Logger.log("i", "Established printer connection on port %s" % self._serial_port)
return
self._sendCommand("M105") # Send M105 as long as we are listening, otherwise we end up in an undefined state
Logger.log("e", "Baud rate detection for %s failed", self._serial_port)
self.close() # Unable to connect, wrap up.
self.setIsConnected(False)
@ -240,15 +315,6 @@ class PrinterConnection(SignalEmitter):
self.connectionStateChanged.emit(self._serial_port)
if self._is_connected:
self._listen_thread.start() #Start listening
#Application.getInstance().addOutputDevice(self._serial_port, {
#"id": self._serial_port,
#"function": self.printGCode,
#"shortDescription": "Print with USB",
#"description": "Print with USB {0}".format(self._serial_port),
#"icon": "save",
#"priority": 1
#})
else:
Logger.log("w", "Printer connection state was not changed")
@ -262,6 +328,9 @@ class PrinterConnection(SignalEmitter):
except Exception as e:
pass # This should work, but it does fail sometimes for some reason
self._connect_thread = threading.Thread(target=self._connect)
self._connect_thread.daemon = True
if self._serial is not None:
self.setIsConnected(False)
try:
@ -270,11 +339,30 @@ class PrinterConnection(SignalEmitter):
pass
self._serial.close()
self._listen_thread = threading.Thread(target=self._listen)
self._listen_thread.daemon = True
self._serial = None
def isConnected(self):
return self._is_connected
@pyqtSlot(int)
def heatupNozzle(self, temperature):
self._sendCommand("M104 S%s" % temperature)
@pyqtSlot(int)
def heatupBed(self, temperature):
self._sendCommand("M140 S%s" % temperature)
@pyqtSlot("long", "long","long")
def moveHead(self, x, y, z):
print("Moving head" , x , " ", y , " " , z)
self._sendCommand("G0 X%s Y%s Z%s"%(x,y,z))
@pyqtSlot()
def homeHead(self):
self._sendCommand("G28")
## Directly send the command, withouth checking connection state (eg; printing).
# \param cmd string with g-code
def _sendCommand(self, cmd):
@ -296,10 +384,9 @@ class PrinterConnection(SignalEmitter):
self._target_bed_temperature = float(re.search("S([0-9]+)", cmd).group(1))
except:
pass
#Logger.log("i","Sending: %s" % (cmd))
try:
command = (cmd + "\n").encode()
#self._serial.write(b"\n")
self._serial.write(b"\n")
self._serial.write(command)
except serial.SerialTimeoutException:
Logger.log("w","Serial timeout while writing to serial port, trying again.")
@ -319,6 +406,21 @@ class PrinterConnection(SignalEmitter):
def __del__(self):
self.close()
def createControlInterface(self):
if self._control_view is None:
path = QUrl.fromLocalFile(os.path.join(PluginRegistry.getInstance().getPluginPath("USBPrinting"), "ControlWindow.qml"))
component = QQmlComponent(Application.getInstance()._engine, path)
self._control_context = QQmlContext(Application.getInstance()._engine.rootContext())
self._control_context.setContextProperty("manager", self)
self._control_view = component.create(self._control_context)
## Show control interface.
# This will create the view if its not already created.
def showControlInterface(self):
if self._control_view is None:
self.createControlInterface()
self._control_view.show()
## Send a command to printer.
# \param cmd string with g-code
def sendCommand(self, cmd):
@ -331,9 +433,7 @@ class PrinterConnection(SignalEmitter):
# \param error String with the error message.
def _setErrorState(self, error):
self._error_state = error
self.onError.emit(error)
onError = Signal()
self.onError.emit()
## Private function to set the temperature of an extruder
# \param index index of the extruder
@ -341,21 +441,33 @@ class PrinterConnection(SignalEmitter):
def _setExtruderTemperature(self, index, temperature):
try:
self._extruder_temperatures[index] = temperature
self.onExtruderTemperatureChange.emit(self._serial_port, index, temperature)
self.extruderTemperatureChanged.emit()
except Exception as e:
pass
onExtruderTemperatureChange = Signal()
## Private function to set the temperature of the bed.
# As all printers (as of time of writing) only support a single heated bed,
# these are not indexed as with extruders.
def _setBedTemperature(self, temperature):
self._bed_temperature = temperature
self.onBedTemperatureChange.emit(self._serial_port,temperature)
self.bedTemperatureChanged.emit()
onBedTemperatureChange = Signal()
def requestWrite(self, node):
self.showControlInterface()
def _setEndstopState(self, endstop_key, value):
if endstop_key == b'x_min':
if self._x_min_endstop_pressed != value:
self.endstopStateChanged.emit('x_min', value)
self._x_min_endstop_pressed = value
elif endstop_key == b'y_min':
if self._y_min_endstop_pressed != value:
self.endstopStateChanged.emit('y_min', value)
self._y_min_endstop_pressed = value
elif endstop_key == b'z_min':
if self._z_min_endstop_pressed != value:
self.endstopStateChanged.emit('z_min', value)
self._z_min_endstop_pressed = value
## Listen thread function.
def _listen(self):
@ -368,6 +480,14 @@ class PrinterConnection(SignalEmitter):
if line is None:
break # None is only returned when something went wrong. Stop listening
if time.time() > temperature_request_timeout:
if self._extruder_count > 0:
self._temperature_requested_extruder_index = (self._temperature_requested_extruder_index + 1) % self._extruder_count
self.sendCommand("M105 T%d" % (self._temperature_requested_extruder_index))
else:
self.sendCommand("M105")
temperature_request_timeout = time.time() + 5
if line.startswith(b"Error:"):
# Oh YEAH, consistency.
# Marlin reports an MIN/MAX temp error as "Error:x\n: Extruder switched off. MAXTEMP triggered !\n"
@ -392,16 +512,11 @@ class PrinterConnection(SignalEmitter):
except Exception as e:
pass
#TODO: temperature changed callback
elif b"_min" in line or b"_max" in line:
tag, value = line.split(b':', 1)
self._setEndstopState(tag,(b'H' in value or b'TRIGGERED' in value))
if self._is_printing:
if time.time() > temperature_request_timeout: # When printing, request temperature every 5 seconds.
if self._extruder_count > 0:
self._temperature_requested_extruder_index = (self._temperature_requested_extruder_index + 1) % self._extruder_count
self.sendCommand("M105 T%d" % (self._temperature_requested_extruder_index))
else:
self.sendCommand("M105")
temperature_request_timeout = time.time() + 5
if line == b"" and time.time() > ok_timeout:
line = b"ok" # Force a timeout (basicly, send next command)
@ -453,17 +568,16 @@ class PrinterConnection(SignalEmitter):
self._sendCommand("N%d%s*%d" % (self._gcode_position, line, checksum))
self._gcode_position += 1
self.setProgress(( self._gcode_position / len(self._gcode)) * 100)
self.progressChanged.emit(self._progress, self._serial_port)
progressChanged = Signal()
self.progressChanged.emit()
## Set the progress of the print.
# It will be normalized (based on max_progress) to range 0 - 100
def setProgress(self, progress, max_progress = 100):
self._progress = (progress / max_progress) * 100 #Convert to scale of 0-100
self.progressChanged.emit(self._progress, self._serial_port)
self.progressChanged.emit()
## Cancel the current print. Printer connection wil continue to listen.
@pyqtSlot()
def cancelPrint(self):
self._gcode_position = 0
self.setProgress(0)
@ -496,3 +610,10 @@ class PrinterConnection(SignalEmitter):
def _getBaudrateList(self):
ret = [250000, 230400, 115200, 57600, 38400, 19200, 9600]
return ret
def _onFirmwareUpdateComplete(self):
self._update_firmware_thread.join()
self._update_firmware_thread = threading.Thread(target= self._updateFirmware)
self._update_firmware_thread.deamon = True
self.connect()

View file

@ -9,6 +9,8 @@ from UM.Scene.SceneNode import SceneNode
from UM.Resources import Resources
from UM.Logger import Logger
from UM.PluginRegistry import PluginRegistry
from UM.OutputDevice.OutputDevicePlugin import OutputDevicePlugin
from UM.Qt.ListModel import ListModel
import threading
import platform
@ -26,33 +28,47 @@ from PyQt5.QtCore import QUrl, QObject, pyqtSlot, pyqtProperty, pyqtSignal, Qt
from UM.i18n import i18nCatalog
i18n_catalog = i18nCatalog("cura")
class USBPrinterManager(QObject, SignalEmitter, Extension):
class USBPrinterManager(QObject, SignalEmitter, OutputDevicePlugin, Extension):
def __init__(self, parent = None):
super().__init__(parent)
QObject.__init__(self, parent)
SignalEmitter.__init__(self)
OutputDevicePlugin.__init__(self)
Extension.__init__(self)
self._serial_port_list = []
self._printer_connections = []
self._check_ports_thread = threading.Thread(target = self._updateConnectionList)
self._check_ports_thread.daemon = True
self._check_ports_thread.start()
self._printer_connections = {}
self._printer_connections_model = None
self._update_thread = threading.Thread(target = self._updateThread)
self._update_thread.setDaemon(True)
self._progress = 0
self._control_view = None
self._check_updates = True
self._firmware_view = None
self._extruder_temp = 0
self._bed_temp = 0
self._error_message = ""
## 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)
Application.getInstance().applicationShuttingDown.connect(self.stop)
self.addConnectionSignal.connect(self.addConnection) #Because the model needs to be created in the same thread as the QMLEngine, we use a signal.
pyqtError = pyqtSignal(str, arguments = ["error"])
processingProgress = pyqtSignal(float, arguments = ["amount"])
pyqtExtruderTemperature = pyqtSignal(float, arguments = ["amount"])
pyqtBedTemperature = pyqtSignal(float, arguments = ["amount"])
addConnectionSignal = Signal()
printerConnectionStateChanged = pyqtSignal()
def start(self):
self._check_updates = True
self._update_thread.start()
def stop(self):
self._check_updates = False
try:
self._update_thread.join()
except RuntimeError:
pass
def _updateThread(self):
while self._check_updates:
result = self.getSerialPortList(only_list_usb = True)
self._addRemovePorts(result)
time.sleep(5)
## Show firmware interface.
# This will create the view if its not already created.
@ -67,77 +83,35 @@ class USBPrinterManager(QObject, SignalEmitter, Extension):
self._firmware_view.show()
## Show control interface.
# This will create the view if its not already created.
def spawnControlInterface(self,serial_port):
if self._control_view is None:
path = QUrl.fromLocalFile(os.path.join(PluginRegistry.getInstance().getPluginPath("USBPrinting"), "ControlWindow.qml"))
component = QQmlComponent(Application.getInstance()._engine, path)
self._control_context = QQmlContext(Application.getInstance()._engine.rootContext())
self._control_context.setContextProperty("manager", self)
self._control_view = component.create(self._control_context)
self._control_view.show()
@pyqtProperty(float,notify = processingProgress)
def progress(self):
return self._progress
@pyqtProperty(float,notify = pyqtExtruderTemperature)
def extruderTemperature(self):
return self._extruder_temp
@pyqtProperty(float,notify = pyqtBedTemperature)
def bedTemperature(self):
return self._bed_temp
@pyqtProperty(str,notify = pyqtError)
def error(self):
return self._error_message
## Check all serial ports and create a PrinterConnection object for them.
# Note that this does not validate if the serial ports are actually usable!
# This (the validation) is only done when the connect function is called.
def _updateConnectionList(self):
while True:
temp_serial_port_list = self.getSerialPortList(only_list_usb = True)
if temp_serial_port_list != self._serial_port_list: # Something changed about the list since we last changed something.
disconnected_ports = [port for port in self._serial_port_list if port not in temp_serial_port_list ]
self._serial_port_list = temp_serial_port_list
for serial_port in self._serial_port_list:
if self.getConnectionByPort(serial_port) is None: # If it doesn't already exist, add it
if not os.path.islink(serial_port): # Only add the connection if it's a non symbolic link
connection = PrinterConnection.PrinterConnection(serial_port)
connection.connect()
connection.connectionStateChanged.connect(self.serialConectionStateCallback)
connection.progressChanged.connect(self.onProgress)
connection.onExtruderTemperatureChange.connect(self.onExtruderTemperature)
connection.onBedTemperatureChange.connect(self.onBedTemperature)
connection.onError.connect(self.onError)
self._printer_connections.append(connection)
for serial_port in disconnected_ports: # Close connections and remove them from list.
connection = self.getConnectionByPort(serial_port)
if connection != None:
self._printer_connections.remove(connection)
connection.close()
time.sleep(5) # Throttle, as we don"t need this information to be updated every single second.
def updateAllFirmware(self):
self.spawnFirmwareInterface("")
for printer_connection in self._printer_connections:
try:
printer_connection.updateFirmware(Resources.getPath(Resources.FirmwareLocation, self._getDefaultFirmwareName()))
self._printer_connections[printer_connection].updateFirmware(Resources.getPath(Resources.FirmwareLocation, self._getDefaultFirmwareName()))
except FileNotFoundError:
continue
@pyqtSlot(str, result = bool)
def updateFirmwareBySerial(self, serial_port):
printer_connection = self.getConnectionByPort(serial_port)
if printer_connection is not None:
self.spawnFirmwareInterface(printer_connection.getSerialPort())
printer_connection.updateFirmware(Resources.getPath(Resources.FirmwareLocation, self._getDefaultFirmwareName()))
if serial_port in self._printer_connections:
self.spawnFirmwareInterface(self._printer_connections[serial_port].getSerialPort())
try:
self._printer_connections[serial_port].updateFirmware(Resources.getPath(Resources.FirmwareLocation, self._getDefaultFirmwareName()))
except FileNotFoundError:
self._firmware_view.close()
Logger.log("e", "Could not find firmware required for this machine")
return False
return True
return False
## Return the singleton instance of the USBPrinterManager
@classmethod
def getInstance(cls, engine = None, script_engine = None):
# Note: Explicit use of class name to prevent issues with inheritance.
if USBPrinterManager._instance is None:
USBPrinterManager._instance = cls()
return USBPrinterManager._instance
def _getDefaultFirmwareName(self):
machine_type = Application.getInstance().getActiveMachine().getTypeID()
@ -165,111 +139,37 @@ class USBPrinterManager(QObject, SignalEmitter, Extension):
firmware_name += ".hex"
return firmware_name
## Callback for extruder temperature change
def onExtruderTemperature(self, serial_port, index, temperature):
self._extruder_temp = temperature
self.pyqtExtruderTemperature.emit(temperature)
def _addRemovePorts(self, serial_ports):
# First, find and add all new or changed keys
for serial_port in list(serial_ports):
if serial_port not in self._serial_port_list:
self.addConnectionSignal.emit(serial_port) #Hack to ensure its created in main thread
continue
self._serial_port_list = list(serial_ports)
## Callback for bed temperature change
def onBedTemperature(self, serial_port,temperature):
self._bed_temp = temperature
self.pyqtBedTemperature.emit(temperature)
## Callback for error
def onError(self, error):
self._error_message = error if type(error) is str else error.decode("utf-8")
self.pyqtError.emit(self._error_message)
## Callback for progress change
def onProgress(self, progress, serial_port):
self._progress = progress
self.processingProgress.emit(progress)
## Attempt to connect with all possible connections.
def connectAllConnections(self):
for connection in self._printer_connections:
## Because the model needs to be created in the same thread as the QMLEngine, we use a signal.
def addConnection(self, serial_port):
connection = PrinterConnection.PrinterConnection(serial_port)
connection.connect()
connection.connectionStateChanged.connect(self._onPrinterConnectionStateChanged)
self._printer_connections[serial_port] = connection
## Send gcode to printer and start printing
def sendGCodeByPort(self, serial_port, gcode_list):
printer_connection = self.getConnectionByPort(serial_port)
if printer_connection is not None:
printer_connection.printGCode(gcode_list)
return True
return False
@pyqtSlot()
def cancelPrint(self):
for printer_connection in self.getActiveConnections():
printer_connection.cancelPrint()
## Send gcode to all active printers.
# \return True if there was at least one active connection.
def sendGCodeToAllActive(self, gcode_list):
for printer_connection in self.getActiveConnections():
printer_connection.printGCode(gcode_list)
if len(self.getActiveConnections()):
return True
def _onPrinterConnectionStateChanged(self, serial_port):
if self._printer_connections[serial_port].isConnected():
self.getOutputDeviceManager().addOutputDevice(self._printer_connections[serial_port])
else:
return False
self.getOutputDeviceManager().removeOutputDevice(serial_port)
self.printerConnectionStateChanged.emit()
## Send a command to a printer indentified by port
# \param serial port String indentifieing the port
# \param command String with the g-code command to send.
# \return True if connection was found, false otherwise
def sendCommandByPort(self, serial_port, command):
printer_connection = self.getConnectionByPort(serial_port)
if printer_connection is not None:
printer_connection.sendCommand(command)
return True
return False
## Send a command to all active (eg; connected) printers
# \param command String with the g-code command to send.
# \return True if at least one connection was found, false otherwise
def sendCommandToAllActive(self, command):
for printer_connection in self.getActiveConnections():
printer_connection.sendCommand(command)
if len(self.getActiveConnections()):
return True
else:
return False
## Callback if the connection state of a connection is changed.
# This adds or removes the connection as a possible output device.
def serialConectionStateCallback(self, serial_port):
connection = self.getConnectionByPort(serial_port)
if connection.isConnected():
Application.getInstance().addOutputDevice(serial_port, {
"id": serial_port,
"function": self.spawnControlInterface,
"description": "Print with USB {0}".format(serial_port),
"shortDescription": "Print with USB",
"icon": "save",
"priority": 1
})
else:
Application.getInstance().removeOutputDevice(serial_port)
@pyqtSlot()
def startPrint(self):
gcode_list = getattr(Application.getInstance().getController().getScene(), "gcode_list", None)
if gcode_list:
final_list = []
for gcode in gcode_list:
final_list += gcode.split("\n")
self.sendGCodeToAllActive(gcode_list)
## Get a list of printer connection objects that are connected.
def getActiveConnections(self):
return [connection for connection in self._printer_connections if connection.isConnected()]
## Get a printer connection object by serial port
def getConnectionByPort(self, serial_port):
for printer_connection in self._printer_connections:
if serial_port == printer_connection.getSerialPort():
return printer_connection
return None
@pyqtProperty(QObject , notify = printerConnectionStateChanged)
def connectedPrinterList(self):
self._printer_connections_model = ListModel()
self._printer_connections_model.addRoleName(Qt.UserRole + 1,"name")
self._printer_connections_model.addRoleName(Qt.UserRole + 2, "printer")
for connection in self._printer_connections:
if self._printer_connections[connection].isConnected():
self._printer_connections_model.appendItem({"name":connection, "printer": self._printer_connections[connection]})
return self._printer_connections_model
## Create a list of serial ports on the system.
# \param only_list_usb If true, only usb ports are listed
@ -293,8 +193,6 @@ class USBPrinterManager(QObject, SignalEmitter, Extension):
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
return list(base_list)
def _onApplicationShuttingDown(self):
for connection in self._printer_connections:
connection.close()
_instance = None

View file

@ -2,7 +2,7 @@
# Cura is released under the terms of the AGPLv3 or higher.
from . import USBPrinterManager
from PyQt5.QtQml import qmlRegisterType, qmlRegisterSingletonType
from UM.i18n import i18nCatalog
i18n_catalog = i18nCatalog("cura")
@ -13,9 +13,11 @@ def getMetaData():
"name": "USB printing",
"author": "Ultimaker",
"version": "1.0",
"api": 2,
"description": i18n_catalog.i18nc("USB Printing plugin description","Accepts G-Code and sends them to a printer. Plugin can also update firmware")
}
}
def register(app):
return {"extension":USBPrinterManager.USBPrinterManager()}
qmlRegisterSingletonType(USBPrinterManager.USBPrinterManager, "UM", 1, 0, "USBPrinterManager", USBPrinterManager.USBPrinterManager.getInstance)
return {"extension":USBPrinterManager.USBPrinterManager.getInstance(),"output_device": USBPrinterManager.USBPrinterManager.getInstance() }

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

File diff suppressed because it is too large Load diff

View file

@ -2,7 +2,7 @@
"id": "grr_neo",
"version": 1,
"name": "German RepRap Neo",
"manufacturer": "German RepRap",
"manufacturer": "Other",
"author": "other",
"icon": "icon_ultimaker.png",
"platform": "grr_neo_platform.stl",
@ -21,8 +21,6 @@
"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": 18.0 },
"machine_nozzle_offset_y_1": { "default": 0.0 },
"machine_gcode_flavor": { "default": "RepRap (Marlin/Sprinter)" },
"machine_start_gcode": {
@ -33,13 +31,7 @@
}
},
"categories": {
"material": {
"settings": {
"material_bed_temperature": {
"visible": false
}
}
}
"overrides": {
"material_bed_temperature": { "visible": false }
}
}

View file

@ -9,7 +9,7 @@
"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}\nG21 ;set units to millimetres\nG90 ;set to absolute positioning\nM106 S0 ;set fan speed to zero (turned off)\nG28 X0 Y0 ;move to the X/Y origin (Home)\nG28 Z0 ;move to the Z origin (Home)\nG1 Z15.0 F1200 ;move Z to position 15.0 mm\nG92 E0 ;zero the extruded length\nG1 E20 F200 ;extrude 20mm of feed stock\nG92 E0 ;zero the extruded length again\nG1 F7200 ;set feedrate to 120 mm/sec\n; -- end of START GCODE --"
"default": "; -- START GCODE --\n;Sliced at: {day} {date} {time}\n;Basic settings: Layer height: {layer_height} Walls: {wall_thickness} Fill: {infill_density}\n;Print time: {print_time}\n;Filament used: {filament_amount}m {filament_weight}g\n;Filament cost: {filament_cost}\nG21 ;set units to millimetres\nG90 ;set to absolute positioning\nM106 S0 ;set fan speed to zero (turned off)\nG28 X0 Y0 ;move to the X/Y origin (Home)\nG28 Z0 ;move to the Z origin (Home)\nG1 Z15.0 F1200 ;move Z to position 15.0 mm\nG92 E0 ;zero the extruded length\nG1 E20 F200 ;extrude 20mm of feed stock\nG92 E0 ;zero the extruded length again\nG1 F7200 ;set feedrate to 120 mm/sec\n; -- end of START GCODE --"
},
"machine_end_gcode": {
"default": "; -- END GCODE --\nM104 S0 ;set extruder temperature to zero (turned off)\nG91 ;set to relative positioning\nG1 E-20 F300 ;retract the filament a bit to release some of the pressure\nG1 Z10 ;move extruder up 10 mm\nG90 ;set to absolute positioning\nG1 X0 Y180 F1200 ;expose the platform\nM84 ;turn off steppers\n; -- end of END GCODE --"
@ -36,152 +36,36 @@
"default": [0.0, 100.0, 0.0]
}
},
"categories": {
"layer_height": {
"settings": {
"layer_height": {
"default": 0.2
},
"layer_height_0": {
"default": 0.2,
"visible": true
}
}
},
"shell": {
"settings": {
"shell_thickness": {
"default": 1.2,
"children": {
"wall_thickness": {
"default": 1.2,
"visible": false
},
"top_bottom_thickness": {
"default": 0.8,
"visible": false,
"children": {
"bottom_thickness": {
"default": 0.4,
"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
}
}
},
"speed": {
"settings": {
"speed_print": {
"default": 40.0,
"children": {
"speed_infill": {
"default": 40.0,
"visible": false
},
"speed_wall": {
"default":35.0,
"visible": false,
"children": {
"speed_wall_0": {
"default": 35.0,
"visible": false
},
"speed_wall_x": {
"default": 35.0,
"visible": false
}
}
},
"speed_topbottom": {
"default": 35.0,
"visible": false
},
"speed_support": {
"default": 35.0,
"visible": false
}
}
},
"speed_travel": {
"default": 110.0
},
"speed_layer_0": {
"default": 20.0,
"visible": false
}
}
},
"travel": {
"settings": {
"retraction_speed": {
"default": 30.0,
"visible": true,
"children": {
"retraction_retract_speed": {
"default": 30.0,
"visible": true
},
"retraction_prime_speed": {
"default": 30.0,
"visible": true
}
}
},
"retraction_amount": {
"default": 2.0,
"visible": true
},
"retraction_hop": {
"default": 0.75,
"visible": false
}
}
},
"platform_adhesion": {
"settings": {
"skirt_minimal_length": {
"default": 150
},
"raft_base_line_width": {
"default": 0.7
},
"raft_interface_thickness": {
"default": 0.2
}
}
},
"support": {
"settings": {
"support_enable": {
"default": true
},
"support_z_distance": {
"default": 0.2,
"visible": false
},
"support_fill_rate": {
"default": 10,
"visible": false
}
}
}
"overrides": {
"layer_height": { "default": 0.2 },
"layer_height_0": { "default": 0.2, "visible": true },
"shell_thickness": { "default": 1.2 },
"wall_thickness": { "default": 1.2, "visible": false },
"top_bottom_thickness": { "default": 0.8, "visible": false },
"bottom_thickness": { "default": 0.4, "visible": false },
"material_print_temperature": { "default": 220, "visible": true },
"material_bed_temperature": { "default": 0, "visible": false },
"material_diameter": { "default": 1.75, "visible": true },
"speed_print": { "default": 40.0 },
"speed_infill": { "default": 40.0, "visible": false },
"speed_wall": { "default":35.0, "visible": false },
"speed_wall_0": { "default": 35.0, "visible": false },
"speed_wall_x": { "default": 35.0, "visible": false },
"speed_topbottom": { "default": 35.0, "visible": false },
"speed_support": { "default": 35.0, "visible": false },
"speed_travel": { "default": 110.0 },
"speed_layer_0": { "default": 20.0, "visible": false },
"retraction_speed": { "default": 30.0, "visible": true },
"retraction_retract_speed": { "default": 30.0, "visible": true },
"retraction_prime_speed": { "default": 30.0, "visible": true },
"retraction_amount": { "default": 2.0, "visible": true },
"retraction_hop": { "default": 0.75, "visible": false },
"skirt_minimal_length": { "default": 150 },
"raft_base_line_width": { "default": 0.7 },
"raft_interface_thickness": { "default": 0.2 },
"support_enable": { "default": true },
"support_z_distance": { "default": 0.2, "visible": false },
"support_infill_rate": { "default": 10, "visible": false }
}
}

View file

@ -9,7 +9,7 @@
"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}\nG21 ;set units to millimetres\nG90 ;set to absolute positioning\nM106 S0 ;set fan speed to zero (turned off)\nG28 X0 Y0 ;move to the X/Y origin (Home)\nG28 Z0 ;move to the Z origin (Home)\nG1 Z15.0 F1200 ;move Z to position 15.0 mm\nG92 E0 ;zero the extruded length\nG1 E20 F200 ;extrude 20mm of feed stock\nG92 E0 ;zero the extruded length again\nG1 F7200 ;set feedrate to 120 mm/sec\n; -- end of START GCODE --"
"default": "; -- START GCODE --\n;Sliced at: {day} {date} {time}\n;Basic settings: Layer height: {layer_height} Walls: {wall_thickness} Fill: {infill_density}\n;Print time: {print_time}\n;Filament used: {filament_amount}m {filament_weight}g\n;Filament cost: {filament_cost}\nG21 ;set units to millimetres\nG90 ;set to absolute positioning\nM106 S0 ;set fan speed to zero (turned off)\nG28 X0 Y0 ;move to the X/Y origin (Home)\nG28 Z0 ;move to the Z origin (Home)\nG1 Z15.0 F1200 ;move Z to position 15.0 mm\nG92 E0 ;zero the extruded length\nG1 E20 F200 ;extrude 20mm of feed stock\nG92 E0 ;zero the extruded length again\nG1 F7200 ;set feedrate to 120 mm/sec\n; -- end of START GCODE --"
},
"machine_end_gcode": {
"default": "; -- END GCODE --\nM104 S0 ;set extruder temperature to zero (turned off)\nG91 ;set to relative positioning\nG1 E-20 F300 ;retract the filament a bit to release some of the pressure\nG1 Z10 ;move extruder up 10 mm\nG90 ;set to absolute positioning\nG1 X0 Y180 F1200 ;expose the platform\nM84 ;turn off steppers\n; -- end of END GCODE --"
@ -36,152 +36,36 @@
"default": [0.0, 100.0, 0.0]
}
},
"categories": {
"layer_height": {
"settings": {
"layer_height": {
"default": 0.2
},
"layer_height_0": {
"default": 0.2,
"visible": true
}
}
},
"shell": {
"settings": {
"shell_thickness": {
"default": 1.2,
"children": {
"wall_thickness": {
"default": 1.2,
"visible": false
},
"top_bottom_thickness": {
"default": 0.8,
"visible": false,
"children": {
"bottom_thickness": {
"default": 0.4,
"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
}
}
},
"speed": {
"settings": {
"speed_print": {
"default": 40.0,
"children": {
"speed_infill": {
"default": 40.0,
"visible": false
},
"speed_wall": {
"default":35.0,
"visible": false,
"children": {
"speed_wall_0": {
"default": 35.0,
"visible": false
},
"speed_wall_x": {
"default": 35.0,
"visible": false
}
}
},
"speed_topbottom": {
"default": 35.0,
"visible": false
},
"speed_support": {
"default": 35.0,
"visible": false
}
}
},
"speed_travel": {
"default": 110.0
},
"speed_layer_0": {
"default": 20.0,
"visible": false
}
}
},
"travel": {
"settings": {
"retraction_speed": {
"default": 30.0,
"visible": true,
"children": {
"retraction_retract_speed": {
"default": 30.0,
"visible": true
},
"retraction_prime_speed": {
"default": 30.0,
"visible": true
}
}
},
"retraction_amount": {
"default": 2.0,
"visible": true
},
"retraction_hop": {
"default": 0.75,
"visible": false
}
}
},
"platform_adhesion": {
"settings": {
"skirt_minimal_length": {
"default": 150
},
"raft_base_line_width": {
"default": 0.7
},
"raft_interface_thickness": {
"default": 0.2
}
}
},
"support": {
"settings": {
"support_enable": {
"default": true
},
"support_z_distance": {
"default": 0.2,
"visible": false
},
"support_fill_rate": {
"default": 10,
"visible": false
}
}
}
"overrides": {
"layer_height": { "default": 0.2 },
"layer_height_0": { "default": 0.2, "visible": true },
"shell_thickness": { "default": 1.2 },
"wall_thickness": { "default": 1.2, "visible": false },
"top_bottom_thickness": { "default": 0.8, "visible": false },
"bottom_thickness": { "default": 0.4, "visible": false },
"material_print_temperature": { "default": 220, "visible": true },
"material_bed_temperature": { "default": 0, "visible": false },
"material_diameter": { "default": 1.75, "visible": true },
"speed_print": { "default": 40.0 },
"speed_infill": { "default": 40.0, "visible": false },
"speed_wall": { "default":35.0, "visible": false },
"speed_wall_0": { "default": 35.0, "visible": false },
"speed_wall_x": { "default": 35.0, "visible": false },
"speed_topbottom": { "default": 35.0, "visible": false },
"speed_support": { "default": 35.0, "visible": false },
"speed_travel": { "default": 110.0 },
"speed_layer_0": { "default": 20.0, "visible": false },
"retraction_speed": { "default": 30.0, "visible": true },
"retraction_retract_speed": { "default": 30.0, "visible": true },
"retraction_prime_speed": { "default": 30.0, "visible": true },
"retraction_amount": { "default": 2.0, "visible": true },
"retraction_hop": { "default": 0.75, "visible": false },
"skirt_minimal_length": { "default": 150 },
"raft_base_line_width": { "default": 0.7 },
"raft_interface_thickness": { "default": 0.2 },
"support_enable": { "default": true },
"support_z_distance": { "default": 0.2, "visible": false },
"support_infill_rate": { "default": 10, "visible": false }
}
}

View file

@ -20,8 +20,6 @@
"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": {
@ -32,13 +30,7 @@
}
},
"categories": {
"material": {
"settings": {
"material_bed_temperature": {
"visible": true
}
}
}
"overrides": {
"material_bed_temperature": { "visible": true }
}
}

View file

@ -10,6 +10,35 @@
"inherits": "fdmprinter.json",
"machine_extruder_trains": [
{
"extruder_nr": {
"label": "Extruder",
"description": "The extruder train used for printing. This is used in multi-extrusion.",
"type": "int",
"default": 0,
"min_value": 0,
"max_value": 16,
"inherit_function": "extruder_nr"
},
"machine_nozzle_size": {
"default": 0.4
},
"machine_nozzle_tip_outer_diameter": {
"default": 1
},
"machine_nozzle_head_distance": {
"default": 3
},
"machine_nozzle_expansion_angle": {
"default": 45
},
"machine_heat_zone_length": {
"default": 16
}
}
],
"machine_settings": {
"machine_start_gcode" : { "default": "" },
"machine_end_gcode" : { "default": "" },
@ -18,15 +47,31 @@
"machine_height": { "default": 205 },
"machine_heated_bed": { "default": true },
"machine_head_with_fans_polygon":
{
"default": [
[
-40,
30
],
[
-40,
-10
],
[
60,
-10
],
[
60,
30
]
]
},
"machine_center_is_zero": { "default": false },
"machine_nozzle_size": { "default": 0.4 },
"machine_head_shape_min_x": { "default": 40 },
"machine_head_shape_min_y": { "default": 10 },
"machine_head_shape_max_x": { "default": 60 },
"machine_head_shape_max_y": { "default": 30 },
"machine_nozzle_gantry_distance": { "default": 55 },
"machine_nozzle_offset_x_1": { "default": 18.0 },
"machine_nozzle_offset_y_1": { "default": 0.0 },
"gantry_height": { "default": 55 },
"machine_use_extruder_offset_to_offset_coords": { "default": true },
"machine_gcode_flavor": { "default": "UltiGCode" },
"machine_disallowed_areas": { "default": [
[[-115.0, 112.5], [ -82.0, 112.5], [ -84.0, 104.5], [-115.0, 104.5]],
@ -41,22 +86,10 @@
"machine_nozzle_expansion_angle": { "default": 45 }
},
"categories": {
"material": {
"settings": {
"material_print_temperature": {
"visible": false
},
"material_bed_temperature": {
"visible": false
},
"material_diameter": {
"visible": false
},
"material_flow": {
"visible": false
}
}
}
"overrides": {
"material_print_temperature": { "visible": false },
"material_bed_temperature": { "visible": false },
"material_diameter": { "visible": false },
"material_flow": { "visible": false }
}
}

View file

@ -16,36 +16,74 @@
{"page": "Bedleveling", "title": "Bedleveling Wizard"}
],
"machine_extruder_trains": [
{
"extruder_nr": {
"label": "Extruder",
"description": "The extruder train used for printing. This is used in multi-extrusion.",
"type": "int",
"default": 0,
"min_value": 0,
"max_value": 16,
"inherit_function": "extruder_nr"
},
"machine_nozzle_size": {
"default": 0.4
},
"machine_nozzle_tip_outer_diameter": {
"default": 1
},
"machine_nozzle_head_distance": {
"default": 3
},
"machine_nozzle_expansion_angle": {
"default": 45
},
"machine_heat_zone_length": {
"default": 16
}
}
],
"machine_settings": {
"machine_width": { "default": 205 },
"machine_height": { "default": 200 },
"machine_depth": { "default": 205 },
"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": 18.0 },
"machine_nozzle_offset_y_1": { "default": 0.0 },
"machine_head_with_fans_polygon":
{
"default": [
[
-75,
35
],
[
-75,
-18
],
[
18,
35
],
[
18,
-18
]
]
},
"gantry_height": { "default": 55 },
"machine_use_extruder_offset_to_offset_coords": { "default": true },
"machine_gcode_flavor": { "default": "RepRap (Marlin/Sprinter)" },
"machine_start_gcode": {
"default": "G21 ;metric values\nG90 ;absolute positioning\nM82 ;set extruder to absolute mode\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 F9000 ;move the platform down 15mm\nG92 E0 ;zero the extruded length\nG1 F200 E3 ;extrude 3mm of feed stock\nG92 E0 ;zero the extruded length again\nG1 F9000\n;Put printing message on LCD screen\nM117 Printing..."
"default": "G21 ;metric values\nG90 ;absolute positioning\nM82 ;set extruder to absolute mode\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 F9000 ;move the platform down 15mm\nG92 E0 ;zero the extruded length\nG1 F200 E6 ;extrude 3mm of feed stock\nG92 E0 ;zero the extruded length again\nG1 F9000\n;Put printing message on LCD screen\nM117 Printing..."
},
"machine_end_gcode": {
"default": "M104 S0 ;extruder heater off\nM140 S0 ;heated bed heater off (if you have it)\nG91 ;relative positioning\nG1 E-1 F300 ;retract the filament a bit before lifting the nozzle, to release some of the pressure\nG1 Z+0.5 E-5 X-20 Y-20 F9000 ;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\nG90 ;absolute positioning"
}
},
"categories": {
"material": {
"settings": {
"material_bed_temperature": {
"visible": false
}
}
}
"overrides": {
"material_bed_temperature": { "visible": false }
}
}

View file

@ -9,7 +9,7 @@
"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}\nG21 ;set units to millimetres\nG90 ;set to absolute positioning\nM106 S0 ;set fan speed to zero (turned off)\nG28 X0 Y0 ;move to the X/Y origin (Home)\nG28 Z0 ;move to the Z origin (Home)\nG1 Z15.0 F1200 ;move Z to position 15.0 mm\nG92 E0 ;zero the extruded length\nG1 E20 F200 ;extrude 20mm of feed stock\nG92 E0 ;zero the extruded length again\nG1 F7200 ;set feedrate to 120 mm/sec\n; -- end of START GCODE --"
"default": "; -- START GCODE --\n;Sliced at: {day} {date} {time}\n;Basic settings: Layer height: {layer_height} Walls: {wall_thickness} Fill: {infill_density}\n;Print time: {print_time}\n;Filament used: {filament_amount}m {filament_weight}g\n;Filament cost: {filament_cost}\nG21 ;set units to millimetres\nG90 ;set to absolute positioning\nM106 S0 ;set fan speed to zero (turned off)\nG28 X0 Y0 ;move to the X/Y origin (Home)\nG28 Z0 ;move to the Z origin (Home)\nG1 Z15.0 F1200 ;move Z to position 15.0 mm\nG92 E0 ;zero the extruded length\nG1 E20 F200 ;extrude 20mm of feed stock\nG92 E0 ;zero the extruded length again\nG1 F7200 ;set feedrate to 120 mm/sec\n; -- end of START GCODE --"
},
"machine_end_gcode": {
"default": "; -- END GCODE --\nM104 S0 ;set extruder temperature to zero (turned off)\nG91 ;set to relative positioning\nG1 E-20 F300 ;retract the filament a bit to release some of the pressure\nG90 ;set to absolute positioning\nG1 Z200 ;move the platform to the bottom\nG28 X0 Y0 ;move to the X/Y origin (Home)\nM84 ;turn off steppers\n; -- end of END GCODE --"
@ -36,152 +36,35 @@
"default": [0, -145, -38]
}
},
"categories": {
"layer_height": {
"settings": {
"layer_height": {
"default": 0.2
},
"layer_height_0": {
"default": 0.2,
"visible": true
}
}
},
"shell": {
"settings": {
"shell_thickness": {
"default": 1.2,
"children": {
"wall_thickness": {
"default": 1.2,
"visible": false
},
"top_bottom_thickness": {
"default": 0.8,
"visible": false,
"children": {
"bottom_thickness": {
"default": 0.4,
"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
}
}
},
"speed": {
"settings": {
"speed_print": {
"default": 40.0,
"children": {
"speed_infill": {
"default": 40.0,
"visible": false
},
"speed_wall": {
"default":35.0,
"visible": false,
"children": {
"speed_wall_0": {
"default": 35.0,
"visible": false
},
"speed_wall_x": {
"default": 35.0,
"visible": false
}
}
},
"speed_topbottom": {
"default": 35.0,
"visible": false
},
"speed_support": {
"default": 35.0,
"visible": false
}
}
},
"speed_travel": {
"default": 120.0
},
"speed_layer_0": {
"default": 20.0,
"visible": false
}
}
},
"travel": {
"settings": {
"retraction_speed": {
"default": 30.0,
"visible": true,
"children": {
"retraction_retract_speed": {
"default": 30.0,
"visible": true
},
"retraction_prime_speed": {
"default": 30.0,
"visible": true
}
}
},
"retraction_amount": {
"default": 2.0,
"visible": true
},
"retraction_hop": {
"default": 0.75,
"visible": false
}
}
},
"platform_adhesion": {
"settings": {
"skirt_minimal_length": {
"default": 150
},
"raft_base_line_width": {
"default": 0.7
},
"raft_interface_thickness": {
"default": 0.2
}
}
},
"support": {
"settings": {
"support_enable": {
"default": true
},
"support_z_distance": {
"default": 0.2,
"visible": false
},
"support_fill_rate": {
"default": 10,
"visible": false
}
}
}
"overrides": {
"layer_height": { "default": 0.2 },
"layer_height_0": { "default": 0.2, "visible": true },
"shell_thickness": { "default": 1.2},
"wall_thickness": { "default": 1.2, "visible": false },
"top_bottom_thickness": { "default": 0.8, "visible": false},
"bottom_thickness": { "default": 0.4, "visible": false },
"material_print_temperature": { "default": 220, "visible": true },
"material_bed_temperature": { "default": 0, "visible": false },
"material_diameter": { "default": 1.75, "visible": true },
"speed_print": { "default": 40.0},
"speed_infill": { "default": 40.0, "visible": false },
"speed_wall": { "default":35.0, "visible": false},
"speed_wall_0": { "default": 35.0, "visible": false },
"speed_wall_x": { "default": 35.0, "visible": false },
"speed_topbottom": { "default": 35.0, "visible": false },
"speed_support": { "default": 35.0, "visible": false },
"speed_travel": { "default": 120.0 },
"speed_layer_0": { "default": 20.0, "visible": false },
"retraction_speed": { "default": 30.0, "visible": true},
"retraction_retract_speed": { "default": 30.0, "visible": true },
"retraction_prime_speed": { "default": 30.0, "visible": true },
"retraction_amount": { "default": 2.0, "visible": true },
"retraction_hop": { "default": 0.75, "visible": false },
"skirt_minimal_length": { "default": 150 },
"raft_base_line_width": { "default": 0.7 },
"raft_interface_thickness": { "default": 0.2 },
"support_enable": { "default": true },
"support_z_distance": { "default": 0.2, "visible": false },
"support_infill_rate": { "default": 10, "visible": false }
}
}

Binary file not shown.

Binary file not shown.

Binary file not shown.

View file

@ -40,10 +40,18 @@ Item {
property alias reportBug: reportBugAction;
property alias about: aboutAction;
property alias toggleFullScreen: toggleFullScreenAction;
Action
{
id:toggleFullScreenAction
shortcut: StandardKey.FullScreen;
}
Action {
id: undoAction;
//: Undo action
text: qsTr("&Undo");
text: qsTr("Undo");
iconName: "edit-undo";
shortcut: StandardKey.Undo;
}
@ -51,7 +59,7 @@ Item {
Action {
id: redoAction;
//: Redo action
text: qsTr("&Redo");
text: qsTr("Redo");
iconName: "edit-redo";
shortcut: StandardKey.Redo;
}
@ -59,7 +67,7 @@ Item {
Action {
id: quitAction;
//: Quit action
text: qsTr("&Quit");
text: qsTr("Quit");
iconName: "application-exit";
shortcut: StandardKey.Quit;
}
@ -67,20 +75,20 @@ Item {
Action {
id: preferencesAction;
//: Preferences action
text: qsTr("&Preferences...");
text: qsTr("Preferences...");
iconName: "configure";
}
Action {
id: addMachineAction;
//: Add Printer action
text: qsTr("&Add Printer...");
text: qsTr("Add Printer...");
}
Action {
id: settingsAction;
//: Configure Printers action
text: qsTr("&Configure Printers");
text: qsTr("Configure Printers");
iconName: "configure";
}
@ -102,7 +110,7 @@ Item {
Action {
id: aboutAction;
//: About action
text: qsTr("&About...");
text: qsTr("About...");
iconName: "help-about";
}
@ -119,6 +127,7 @@ Item {
//: Delete object action
text: qsTr("Delete Object");
iconName: "edit-delete";
shortcut: StandardKey.Backspace;
}
Action {
@ -189,7 +198,7 @@ Item {
Action {
id: openAction;
//: Open file action
text: qsTr("&Open...");
text: qsTr("Load file");
iconName: "document-open";
shortcut: StandardKey.Open;
}
@ -197,7 +206,7 @@ Item {
Action {
id: saveAction;
//: Save file action
text: qsTr("&Save...");
text: qsTr("Save...");
iconName: "document-save";
shortcut: StandardKey.Save;
}

View file

@ -8,9 +8,19 @@ import QtQuick.Window 2.1
import UM 1.0 as UM
UM.Wizard{
id: base
UM.Wizard
{
//: Add Printer dialog title
wizardTitle: qsTr("Add Printer")
wizardPages: [
{
title: "Add Printer",
page: "AddMachine.qml"
}
]
// This part is optional
// This part checks whether there is a printer -> if not: some of the functions (delete for example) are disabled
property bool printer: true
file: "ultimaker2.json"
firstRun: printer ? false : true
}

View file

@ -12,7 +12,6 @@ import UM 1.1 as UM
UM.MainWindow {
id: base
visible: true
//: Cura application window title
title: qsTr("Cura");
@ -229,10 +228,8 @@ UM.MainWindow {
UM.MessageStack {
anchors {
left: toolbar.right;
leftMargin: UM.Theme.sizes.window_margin.width;
right: sidebar.left;
rightMargin: UM.Theme.sizes.window_margin.width;
horizontalCenter: parent.horizontalCenter
horizontalCenterOffset: -(UM.Theme.sizes.logo.width/ 2)
top: parent.verticalCenter;
bottom: parent.bottom;
}
@ -259,25 +256,25 @@ UM.MainWindow {
Button {
id: openFileButton;
iconSource: UM.Theme.icons.open;
style: UM.Backend.progress < 0 ? UM.Theme.styles.open_file_button : UM.Theme.styles.tool_button;
//style: UM.Backend.progress < 0 ? UM.Theme.styles.open_file_button : UM.Theme.styles.tool_button;
style: UM.Theme.styles.open_file_button
tooltip: '';
anchors {
top: parent.top;
topMargin: UM.Theme.sizes.window_margin.height;
topMargin: UM.Theme.sizes.loadfile_margin.height
left: parent.left;
leftMargin: UM.Theme.sizes.window_margin.width;
leftMargin: UM.Theme.sizes.loadfile_margin.width
}
action: actions.open;
}
Image {
id: logo
anchors {
verticalCenter: openFileButton.verticalCenter;
left: openFileButton.right;
leftMargin: UM.Theme.sizes.window_margin.width;
left: parent.left
leftMargin: UM.Theme.sizes.default_margin.width;
bottom: parent.bottom
bottomMargin: UM.Theme.sizes.default_margin.height;
}
source: UM.Theme.images.logo;
@ -289,13 +286,12 @@ UM.MainWindow {
}
Button {
id: viewModeButton
anchors {
top: parent.top;
topMargin: UM.Theme.sizes.window_margin.height;
right: sidebar.left;
rightMargin: UM.Theme.sizes.window_margin.width;
}
id: viewModeButton
//: View Mode toolbar button
text: qsTr("View Mode");
iconSource: UM.Theme.icons.viewmode;
@ -325,10 +321,9 @@ UM.MainWindow {
id: toolbar;
anchors {
left: parent.left;
leftMargin: UM.Theme.sizes.window_margin.width;
bottom: parent.bottom;
bottomMargin: UM.Theme.sizes.window_margin.height;
horizontalCenter: parent.horizontalCenter
horizontalCenterOffset: -(UM.Theme.sizes.panel.width / 2)
top: parent.top;
}
}
@ -366,8 +361,15 @@ UM.MainWindow {
id: preferences
Component.onCompleted: {
//; Remove & re-add the general page as we want to use our own instead of uranium standard.
removePage(0);
insertPage(0, qsTr("General") , "" , Qt.resolvedUrl("./GeneralPage.qml"));
//: View preferences page title
insertPage(1, qsTr("View"), "view-preview", Qt.resolvedUrl("./ViewPage.qml"));
//Force refresh
setPage(0)
}
}
@ -440,6 +442,8 @@ UM.MainWindow {
reportBug.onTriggered: CuraActions.openBugReportPage();
showEngineLog.onTriggered: engineLog.visible = true;
about.onTriggered: aboutDialog.visible = true;
toggleFullScreen.onTriggered: base.toggleFullscreen()
}
Menu {
@ -498,7 +502,6 @@ UM.MainWindow {
onAccepted:
{
UM.MeshFileHandler.readLocalFile(fileUrl)
Printer.setPlatformActivity(true)
}
}

View file

@ -0,0 +1,130 @@
// Copyright (c) 2015 Ultimaker B.V.
// Uranium is released under the terms of the AGPLv3 or higher.
import QtQuick 2.1
import QtQuick.Controls 1.1
import QtQuick.Layouts 1.1
import QtQuick.Controls.Styles 1.1
import UM 1.0 as UM
UM.PreferencesPage
{
//: General configuration page title
title: qsTr("General");
function reset()
{
UM.Preferences.resetPreference("general/language")
UM.Preferences.resetPreference("physics/automatic_push_free")
}
GridLayout
{
columns: 2;
//: Language selection label
Label
{
id: languageLabel
text: qsTr("Language")
}
ComboBox
{
id: languageComboBox
model: ListModel
{
id: languageList
//: English language combo box option
ListElement { text: QT_TR_NOOP("English"); code: "en" }
//: German language combo box option
ListElement { text: QT_TR_NOOP("German"); code: "de" }
//: French language combo box option
// ListElement { text: QT_TR_NOOP("French"); code: "fr" }
//: Spanish language combo box option
ListElement { text: QT_TR_NOOP("Spanish"); code: "es" }
//: Italian language combo box option
// ListElement { text: QT_TR_NOOP("Italian"); code: "it" }
//: Finnish language combo box option
ListElement { text: QT_TR_NOOP("Finnish"); code: "fi" }
//: Russian language combo box option
ListElement { text: QT_TR_NOOP("Russian"); code: "ru" }
}
currentIndex:
{
var code = UM.Preferences.getValue("general/language");
for(var i = 0; i < languageList.count; ++i)
{
if(model.get(i).code == code)
{
return i
}
}
}
onActivated: UM.Preferences.setValue("general/language", model.get(index).code)
anchors.left: languageLabel.right
anchors.top: languageLabel.top
anchors.leftMargin: 20
Component.onCompleted:
{
// Because ListModel is stupid and does not allow using qsTr() for values.
for(var i = 0; i < languageList.count; ++i)
{
languageList.setProperty(i, "text", qsTr(languageList.get(i).text));
}
// Glorious hack time. ComboBox does not update the text properly after changing the
// model. So change the indices around to force it to update.
currentIndex += 1;
currentIndex -= 1;
}
}
Label
{
id: languageCaption;
Layout.columnSpan: 2
//: Language change warning
text: qsTr("You will need to restart the application for language changes to have effect.")
wrapMode: Text.WordWrap
font.italic: true
}
CheckBox
{
id: pushFreeCheckbox
checked: UM.Preferences.getValue("physics/automatic_push_free")
onCheckedChanged: UM.Preferences.setValue("physics/automatic_push_free", checked)
}
Button
{
id: pushFreeText //is a button so the user doesn't have te click inconvenientley precise to enable or disable the checkbox
//: Display Overhang preference checkbox
text: qsTr("Automatic push free");
onClicked: pushFreeCheckbox.checked = !pushFreeCheckbox.checked
//: Display Overhang preference tooltip
tooltip: "Are objects on the platform automatically moved so they no longer intersect"
style: ButtonStyle
{
background: Rectangle
{
border.width: 0
color: "transparent"
}
label: Text
{
renderType: Text.NativeRendering
horizontalAlignment: Text.AlignLeft
text: control.text
}
}
}
Item { Layout.fillHeight: true; Layout.columnSpan: 2 }
}
}

View file

@ -12,33 +12,14 @@ Item {
id: base;
width: buttons.width;
height: buttons.height + panel.height;
Rectangle {
id: activeItemBackground;
anchors.bottom: parent.bottom;
anchors.bottomMargin: UM.Theme.sizes.default_margin.height;
width: UM.Theme.sizes.button.width;
height: UM.Theme.sizes.button.height * 2;
opacity: panelBackground.opacity;
color: UM.Theme.colors.tool_panel_background
function setActive(new_x) {
x = new_x;
}
}
height: buttons.height
RowLayout {
id: buttons;
anchors.bottom: parent.bottom;
anchors.left: parent.left;
spacing: UM.Theme.sizes.default_margin.width * 2;
spacing: UM.Theme.sizes.default_lining.width
Repeater {
id: repeat
@ -51,7 +32,6 @@ Item {
checkable: true;
checked: model.active;
onCheckedChanged: if (checked) activeItemBackground.setActive(x);
style: UM.Theme.styles.tool_button;
@ -65,21 +45,30 @@ Item {
}
}
UM.AngledCornerRectangle {
Rectangle {
width: base.width - 10
height: base.height
z: parent.z - 1
anchors.verticalCenter: parent.verticalCenter
anchors.horizontalCenter: parent.horizontalCenter
color: UM.Theme.colors.button_lining
}
Rectangle {
id: panelBackground;
anchors.left: parent.left;
anchors.bottom: buttons.top;
anchors.bottomMargin: UM.Theme.sizes.default_margin.height;
anchors.top: buttons.bottom;
width: panel.item ? Math.max(panel.width + 2 * UM.Theme.sizes.default_margin.width, activeItemBackground.x + activeItemBackground.width) : 0;
width: panel.item ? Math.max(panel.width + 2 * UM.Theme.sizes.default_margin.width) : 0;
height: panel.item ? panel.height + 2 * UM.Theme.sizes.default_margin.height : 0;
opacity: panel.item ? 1 : 0
Behavior on opacity { NumberAnimation { duration: 100 } }
color: UM.Theme.colors.tool_panel_background;
cornerSize: width > 0 ? UM.Theme.sizes.default_margin.width : 0;
border.width: UM.Theme.sizes.default_lining.width
border.color: UM.Theme.colors.button_lining
Loader {
id: panel

View file

@ -8,7 +8,8 @@ import QtQuick.Controls.Styles 1.1
import UM 1.0 as UM
UM.PreferencesPage {
UM.PreferencesPage
{
id: preferencesPage
//: View configuration page title
@ -17,22 +18,26 @@ UM.PreferencesPage {
function reset()
{
UM.Preferences.resetPreference("view/show_overhang");
UM.Preferences.resetPreferences("view/center_on_select");
}
GridLayout {
GridLayout
{
columns: 2;
CheckBox {
id: viewCheckbox
CheckBox
{
id: overhangCheckbox
checked: UM.Preferences.getValue("view/show_overhang")
onCheckedChanged: UM.Preferences.setValue("view/show_overhang", checked)
}
Button {
Button
{
id: viewText //is a button so the user doesn't have te click inconvenientley precise to enable or disable the checkbox
//: Display Overhang preference checkbox
text: qsTr("Display Overhang");
onClicked: viewCheckbox.checked = !viewCheckbox.checked
onClicked: overhangCheckbox.checked = !overhangCheckbox.checked
//: Display Overhang preference tooltip
tooltip: "Highlight unsupported areas of the model in red. Without support these areas will nog print properly."
@ -49,6 +54,39 @@ UM.PreferencesPage {
}
}
}
CheckBox
{
id: centerCheckbox
checked: UM.Preferences.getValue("view/center_on_select")
onCheckedChanged: UM.Preferences.setValue("view/center_on_select", checked)
}
Button
{
id: centerText //is a button so the user doesn't have te click inconvenientley precise to enable or disable the checkbox
//: Display Overhang preference checkbox
text: qsTr("Center camera when item is selected");
onClicked: centerCheckbox.checked = !centerCheckbox.checked
//: Display Overhang preference tooltip
tooltip: "Moves the camera so the object is in the center of the view when an object is selected"
style: ButtonStyle
{
background: Rectangle
{
border.width: 0
color: "transparent"
}
label: Text
{
renderType: Text.NativeRendering
horizontalAlignment: Text.AlignLeft
text: control.text
}
}
}
Item { Layout.fillHeight: true; Layout.columnSpan: 2 }
}
}

View file

@ -5,103 +5,274 @@ import QtQuick 2.2
import QtQuick.Controls 1.1
import QtQuick.Layouts 1.1
import QtQuick.Window 2.1
import QtQuick.Controls.Styles 1.1
import UM 1.0 as UM
import ".."
ColumnLayout {
ColumnLayout
{
id: wizardPage
property string title
signal openFile(string fileName)
signal closeWizard()
property int pageWidth
property int pageHeight
property var manufacturers: wizardPage.lineManufacturers()
property int manufacturerIndex: 0
Connections {
target: rootElement
onFinalClicked: {//You can add functions here that get triggered when the final button is clicked in the wizard-element
SystemPalette{id: palette}
signal reloadModel(var newModel)
width: wizardPage.pageWidth
height: wizardPage.pageHeight
Connections
{
target: elementRoot
onNextClicked: //You can add functions here that get triggered when the final button is clicked in the wizard-element
{
saveMachine()
}
}
Label {
function lineManufacturers(manufacturer)
{
var manufacturers = []
for (var i = 0; i < UM.Models.availableMachinesModel.rowCount(); i++)
{
if (UM.Models.availableMachinesModel.getItem(i).manufacturer != manufacturers[manufacturers.length - 1])
{
manufacturers.push(UM.Models.availableMachinesModel.getItem(i).manufacturer)
}
}
return manufacturers
}
Label
{
id: title
anchors.left: parent.left
anchors.top: parent.top
text: parent.title
font.pointSize: 18;
}
Label {
Label
{
id: subTitle
anchors.left: parent.left
anchors.top: title.bottom
//: Add Printer wizard page description
text: qsTr("Please select the type of printer:");
}
ScrollView {
ListView {
id: machineList;
model: UM.Models.availableMachinesModel
delegate: RadioButton {
id:machine_button
ScrollView
{
id: machinesHolder
anchors.left: parent.left
anchors.top: subTitle.bottom
implicitWidth: wizardPage.width- UM.Theme.sizes.default_margin.width
implicitHeight: wizardPage.height - subTitle.height - title.height - (machineNameHolder.height * 2)
Component
{
id: machineDelegate
ColumnLayout
{
id: machineLayout
spacing: 0
anchors.left: parent.left
anchors.leftMargin: UM.Theme.sizes.standard_list_lineheight.width
function showManufacturer()
{
if (model.manufacturer == UM.Models.availableMachinesModel.getItem(index - 1).manufacturer){
return false
}
else{
return true
}
}
height:
{
if (machineLayout.showManufacturer() & wizardPage.manufacturers[wizardPage.manufacturerIndex] == model.manufacturer)
return UM.Theme.sizes.standard_list_lineheight.height * 2
if (wizardPage.manufacturers[wizardPage.manufacturerIndex] == model.manufacturer | machineLayout.showManufacturer())
return UM.Theme.sizes.standard_list_lineheight.height * 1
else
return 0
}
Behavior on height
{
NumberAnimation { target: machineLayout; property: "height"; duration: 200}
}
Button
{
id: manufacturer
property color backgroundColor: "transparent"
height: UM.Theme.sizes.standard_list_lineheight.height
visible: machineLayout.showManufacturer()
anchors.top: machineLayout.top
anchors.topMargin: 0
text:
{
if (wizardPage.manufacturers[wizardPage.manufacturerIndex] == model.manufacturer)
return model.manufacturer + " ▼"
else
return model.manufacturer + " ►"
}
style: ButtonStyle
{
background: Rectangle
{
id: manufacturerBackground
opacity: 0.3
border.width: 0
color: manufacturer.backgroundColor
height: UM.Theme.sizes.standard_list_lineheight.height
}
label: Text
{
renderType: Text.NativeRendering
horizontalAlignment: Text.AlignLeft
text: control.text
color: palette.windowText
font.bold: true
}
}
MouseArea
{
id: mousearea
hoverEnabled: true
anchors.fill: parent
onEntered: manufacturer.backgroundColor = palette.light
onExited: manufacturer.backgroundColor = "transparent"
onClicked:
{
wizardPage.manufacturerIndex = wizardPage.manufacturers.indexOf(model.manufacturer)
machineList.currentIndex = index
}
}
}
RadioButton
{
id: machineButton
opacity: wizardPage.manufacturers[wizardPage.manufacturerIndex] == model.manufacturer ? 1 : 0
height: wizardPage.manufacturers[wizardPage.manufacturerIndex] == model.manufacturer ? UM.Theme.sizes.standard_list_lineheight.height : 0
anchors.top: parent.top
anchors.topMargin: machineLayout.showManufacturer() ? manufacturer.height - 5 : 0
anchors.left: parent.left
anchors.leftMargin: UM.Theme.sizes.standard_list_lineheight.width
checked: machineList.currentIndex == index ? true : false
exclusiveGroup: printerGroup;
checked: ListView.view.currentIndex == index ? true : false
text: model.name;
onClicked: {
ListView.view.currentIndex = index;
text: model.name
onClicked: machineList.currentIndex = index;
function getAnimationTime(time)
{
if (machineButton.opacity == 0)
return time
else
return 0
}
Label
{
id: author
visible: model.author != "Ultimaker" ? true : false
height: wizardPage.manufacturers[wizardPage.manufacturerIndex] == model.manufacturer ? UM.Theme.sizes.standard_list_lineheight.height : 0
//: Printer profile caption meaning: this profile is supported by the community
text: qsTr("community supported profile");
opacity: wizardPage.manufacturers[wizardPage.manufacturerIndex] == model.manufacturer ? 1 : 0
anchors.left: machineButton.right
anchors.leftMargin: UM.Theme.sizes.standard_list_lineheight.height/2
anchors.verticalCenter: machineButton.verticalCenter
anchors.verticalCenterOffset: UM.Theme.sizes.standard_list_lineheight.height / 4
font: UM.Theme.fonts.caption;
color: palette.mid
}
}
}
Label {
text: qsTr("Variation:");
}
ScrollView {
ListView {
id: variations_list
model: machineList.model.getItem(machineList.currentIndex).variations
delegate: RadioButton {
id: variation_radio_button
checked: ListView.view.currentIndex == index ? true : false
exclusiveGroup: variationGroup;
text: model.name;
onClicked: ListView.view.currentIndex = index;
Behavior on opacity
{
SequentialAnimation
{
PauseAnimation { duration: machineButton.getAnimationTime(100) }
NumberAnimation { properties:"opacity"; duration: machineButton.getAnimationTime(200) }
}
}
}
Label {
}
}
ListView
{
id: machineList
property int currentIndex: 0
property int otherMachinesIndex:
{
for (var i = 0; i < UM.Models.availableMachinesModel.rowCount(); i++)
{
if (UM.Models.availableMachinesModel.getItem(i).manufacturer != "Ultimaker")
{
return i
}
}
}
anchors.fill: parent
model: UM.Models.availableMachinesModel
delegate: machineDelegate
focus: true
}
}
Item
{
id: machineNameHolder
height: childrenRect.height
anchors.top: machinesHolder.bottom
Label
{
id: insertNameLabel
//: Add Printer wizard field label
text: qsTr("Printer Name:");
}
TextField
{
id: machineName;
anchors.top: insertNameLabel.bottom
text: machineList.model.getItem(machineList.currentIndex).name
implicitWidth: UM.Theme.sizes.standard_list_input.width
}
}
TextField { id: machineName; Layout.fillWidth: true; text: machineList.model.getItem(machineList.currentIndex).name }
Item { Layout.fillWidth: true; Layout.fillHeight: true; }
ExclusiveGroup { id: printerGroup; }
ExclusiveGroup { id: variationGroup; }
function getSpecialMachineType(machineId){
for (var i = 0; i < UM.Models.addMachinesModel.rowCount(); i++) {
if (UM.Models.addMachinesModel.getItem(i).name == machineId){
return UM.Models.addMachinesModel.getItem(i).name
}
function saveMachine()
{
if(machineList.currentIndex != -1)
{
UM.Models.availableMachinesModel.createMachine(machineList.currentIndex, machineName.text)
var pages = UM.Models.availableMachinesModel.getItem(machineList.currentIndex).pages
var old_page_count = elementRoot.getPageCount()
for(var i = 0; i < UM.Models.count; i++)
{
print(UM.Models.getItem(i))
}
// Delete old pages (if any)
for (var i = old_page_count - 1; i > 0; i--)
{
elementRoot.removePage(i)
elementRoot.currentPage = 0
}
function saveMachine(){
if(machineList.currentIndex != -1) {
UM.Models.availableMachinesModel.createMachine(machineList.currentIndex, variations_list.currentIndex, machineName.text)
var originalString = "Ultimaker Original"
var originalPlusString = "Ultimaker Original+"
var originalMachineType = getSpecialMachineType(originalString)
if (UM.Models.availableMachinesModel.getItem(machineList.currentIndex).name == originalMachineType){
var variation = UM.Models.availableMachinesModel.getItem(machineList.currentIndex).variations.getItem(variations_list.currentIndex).name
if (variation == originalString || variation == originalPlusString){
console.log(UM.Models.availableMachinesModel.getItem(machineList.currentIndex).variations.getItem(variations_list.currentIndex).type)
wizardPage.openFile(UM.Models.availableMachinesModel.getItem(machineList.currentIndex).variations.getItem(variations_list.currentIndex).type)
// Insert new pages (if any)
for(var i = 0; i < pages.count; i++)
{
elementRoot.insertPage(pages.getItem(i).page + ".qml",pages.getItem(i).title,i + 1)
}
}
else {
wizardPage.closeWizard()
// Hack to ensure the current page is set correctly
if(old_page_count == 1)
{
elementRoot.currentPage += 1
}
}
}

View file

@ -8,45 +8,47 @@ import QtQuick.Window 2.1
import UM 1.0 as UM
ColumnLayout {
property string title
Column
{
id: wizardPage
property int leveling_state: 0
property bool three_point_leveling: true
property int platform_width: UM.Models.settingsModel.getMachineSetting("machine_width")
property int platform_height: UM.Models.settingsModel.getMachineSetting("machine_depth")
anchors.fill: parent;
Label {
text: parent.title
font.pointSize: 18;
property variant printer_connection: UM.USBPrinterManager.connectedPrinterList.getItem(0).printer
Component.onCompleted: printer_connection.homeHead()
Label
{
text: ""
//Component.onCompleted:console.log(UM.Models.settingsModel.getMachineSetting("machine_width"))
}
Button
{
text: "Move to next position"
onClicked:
{
if(wizardPage.leveling_state == 0)
{
printer_connection.moveHead(platform_width /2 , platform_height,0)
}
if(wizardPage.leveling_state == 1)
{
printer_connection.moveHead(platform_width , 0,0)
}
if(wizardPage.leveling_state == 2)
{
printer_connection.moveHead(0, 0 ,0)
}
Label {
//: Add Printer wizard page description
text: qsTr("Please select the type of printer:");
}
ScrollView {
Layout.fillWidth: true;
ListView {
id: machineList;
model: UM.Models.availableMachinesModel
delegate: RadioButton {
exclusiveGroup: printerGroup;
text: model.name;
onClicked: {
ListView.view.currentIndex = index;
wizardPage.leveling_state++
}
}
}
function threePointLeveling(width, height)
{
}
Label {
//: Add Printer wizard field label
text: qsTr("Printer Name:");
}
TextField { id: machineName; Layout.fillWidth: true; text: machineList.model.getItem(machineList.currentIndex).name }
Item { Layout.fillWidth: true; Layout.fillHeight: true; }
ExclusiveGroup { id: printerGroup; }
}

View file

@ -8,45 +8,76 @@ import QtQuick.Window 2.1
import UM 1.0 as UM
ColumnLayout {
Item
{
id: wizardPage
property string title
anchors.fill: parent;
Label {
text: parent.title
font.pointSize: 18;
SystemPalette{id: palette}
ScrollView
{
height: parent.height
width: parent.width
Column
{
width: wizardPage.width
Label
{
id: pageTitle
width: parent.width
text: wizardPage.title
wrapMode: Text.WordWrap
font.pointSize: 18
}
Label
{
id: pageDescription
//: Add UM Original wizard page description
width: parent.width
wrapMode: Text.WordWrap
text: qsTr("To assist you in having better default settings for your Ultimaker. Cura would like to know which upgrades you have in your machine:")
}
Label {
//: Add Printer wizard page description
text: qsTr("Please select the type of printer:");
}
ScrollView {
Layout.fillWidth: true;
ListView {
id: machineList;
model: UM.Models.availableMachinesModel
delegate: RadioButton {
exclusiveGroup: printerGroup;
text: model.name;
onClicked: {
ListView.view.currentIndex = index;
Column
{
id: pageCheckboxes
width: parent.width
CheckBox
{
text: qsTr("Extruder driver ugrades")
}
CheckBox
{
text: qsTr("Heated printer bed (kit)")
}
CheckBox
{
text: qsTr("Heated printer bed (self built)")
}
CheckBox
{
text: qsTr("Dual extrusion (experimental)")
checked: true
}
}
Label {
//: Add Printer wizard field label
text: qsTr("Printer Name:");
Label
{
width: parent.width
wrapMode: Text.WordWrap
text: qsTr("If you have an Ultimaker bought after october 2012 you will have the Extruder drive upgrade. If you do not have this upgrade, it is highly recommended to improve reliability.");
}
TextField { id: machineName; Layout.fillWidth: true; text: machineList.model.getItem(machineList.currentIndex).name }
Item { Layout.fillWidth: true; Layout.fillHeight: true; }
Label
{
width: parent.width
wrapMode: Text.WordWrap
text: qsTr("This upgrade can be bought from the Ultimaker webshop or found on thingiverse as thing:26094");
}
}
}
ExclusiveGroup { id: printerGroup; }
}

View file

@ -8,45 +8,173 @@ import QtQuick.Window 2.1
import UM 1.0 as UM
ColumnLayout {
Column
{
id: wizardPage
property string title
anchors.fill: parent;
property bool x_min_pressed: false
property bool y_min_pressed: false
property bool z_min_pressed: false
property bool heater_works: false
property int extruder_target_temp: 0
property int bed_target_temp: 0
property variant printer_connection: UM.USBPrinterManager.connectedPrinterList.getItem(0).printer
Label {
Component.onCompleted: printer_connection.startPollEndstop()
Component.onDestruction: printer_connection.stopPollEndstop()
Label
{
text: parent.title
font.pointSize: 18;
}
Label {
Label
{
//: Add Printer wizard page description
text: qsTr("Please select the type of printer:");
text: qsTr("It's a good idea to do a few sanity checks on your Ultimaker. \n You can skip these if you know your machine is functional");
}
ScrollView {
Layout.fillWidth: true;
ListView {
id: machineList;
model: UM.Models.availableMachinesModel
delegate: RadioButton {
exclusiveGroup: printerGroup;
text: model.name;
onClicked: {
ListView.view.currentIndex = index;
Row
{
Label
{
text: qsTr("Connection: ")
}
Label
{
text: UM.USBPrinterManager.connectedPrinterList.count ? "Done":"Incomplete"
}
}
Row
{
Label
{
text: qsTr("Min endstop X: ")
}
Label
{
text: x_min_pressed ? qsTr("Works") : qsTr("Not checked")
}
}
Row
{
Label
{
text: qsTr("Min endstop Y: ")
}
Label
{
text: y_min_pressed ? qsTr("Works") : qsTr("Not checked")
}
}
Row
{
Label
{
text: qsTr("Min endstop Z: ")
}
Label
{
text: z_min_pressed ? qsTr("Works") : qsTr("Not checked")
}
}
Row
{
Label
{
text: qsTr("Nozzle temperature check: ")
}
Label
{
text: printer_connection.extruderTemperature
}
Button
{
text: "Start heating"
onClicked:
{
heater_status_label.text = qsTr("Checking")
printer_connection.heatupNozzle(190)
wizardPage.extruder_target_temp = 190
}
}
Label
{
id: heater_status_label
text: qsTr("Not checked")
}
}
Row
{
Label
{
text: qsTr("bed temperature check: ")
}
Label
{
text: printer_connection.bedTemperature
}
Button
{
text: "Start heating"
onClicked:
{
bed_status_label.text = qsTr("Checking")
printer_connection.printer.heatupBed(60)
wizardPage.bed_target_temp = 60
}
}
Label
{
id: bed_status_label
text: qsTr("Not checked")
}
}
Connections
{
target: printer_connection
onEndstopStateChanged:
{
if(key == "x_min")
{
x_min_pressed = true
}
if(key == "y_min")
{
y_min_pressed = true
}
if(key == "z_min")
{
z_min_pressed = true
}
}
onExtruderTemperatureChanged:
{
if(printer_connection.extruderTemperature > wizardPage.extruder_target_temp - 10 && printer_connection.extruderTemperature < wizardPage.extruder_target_temp + 10)
{
heater_status_label.text = qsTr("Works")
printer_connection.heatupNozzle(0)
}
}
onBedTemperatureChanged:
{
if(printer_connection.bedTemperature > wizardPage.bed_target_temp - 5 && printer_connection.bedTemperature < wizardPage.bed_target_temp + 5)
{
bed_status_label.text = qsTr("Works")
printer_connection.heatupBed(0)
}
}
}
Label {
//: Add Printer wizard field label
text: qsTr("Printer Name:");
ExclusiveGroup
{
id: printerGroup;
}
TextField { id: machineName; Layout.fillWidth: true; text: machineList.model.getItem(machineList.currentIndex).name }
Item { Layout.fillWidth: true; Layout.fillHeight: true; }
ExclusiveGroup { id: printerGroup; }
}

View file

@ -8,45 +8,61 @@ import QtQuick.Window 2.1
import UM 1.0 as UM
ColumnLayout {
Column
{
id: wizardPage
property string title
anchors.fill: parent;
signal openFile(string fileName)
Label {
Label
{
text: parent.title
font.pointSize: 18;
}
Label {
//: Add Printer wizard page description
text: qsTr("Please select the type of printer:");
}
ScrollView {
Layout.fillWidth: true;
ListView {
ScrollView
{
height: parent.height - 50
width: parent.width
ListView
{
id: machineList;
model: UM.Models.availableMachinesModel
delegate: RadioButton {
exclusiveGroup: printerGroup;
text: model.name;
onClicked: {
ListView.view.currentIndex = index;
model: UM.USBPrinterManager.connectedPrinterList
delegate:Row
{
id: derp
Text
{
id: text_area
text: model.name
}
Button
{
text: "Update";
onClicked:
{
if(!UM.USBPrinterManager.updateFirmwareBySerial(text_area.text))
{
status_text.text = "ERROR"
}
}
}
}
}
}
Label {
//: Add Printer wizard field label
text: qsTr("Printer Name:");
Label
{
id: status_text
text: ""
}
Item
{
Layout.fillWidth: true;
Layout.fillHeight: true;
}
TextField { id: machineName; Layout.fillWidth: true; text: machineList.model.getItem(machineList.currentIndex).name }
Item { Layout.fillWidth: true; Layout.fillHeight: true; }
ExclusiveGroup { id: printerGroup; }
}

View file

@ -0,0 +1,60 @@
{
"id": "rigidbotbig",
"version": 1,
"name": "RigidBot",
"manufacturer": "Invent-A-Part",
"author": "RBC",
"platform": "rigidbot_platform.stl",
"inherits": "fdmprinter.json",
"machine_settings": {
"machine_width": { "default": 254 },
"machine_depth": { "default": 254 },
"machine_height": { "default": 254 },
"machine_heated_bed": { "default": true },
"machine_nozzle_size": { "default": 0.4,
"visible": true
},
"machine_head_shape_min_x": { "default": 0 },
"machine_head_shape_min_y": { "default": 0 },
"machine_head_shape_max_x": { "default": 0 },
"machine_head_shape_max_y": { "default": 0 },
"machine_nozzle_gantry_distance": { "default": 0 },
"machine_gcode_flavor": { "default": "RepRap (Marlin/Sprinter)" },
"machine_start_gcode": {
"default": ";Sliced at: {day} {date} {time}\n;Basic settings: Layer height: {layer_height} Walls: {wall_thickness} Fill: {infill_density}\n;Print time: {print_time}\n;Filament used: {filament_amount}m {filament_weight}g\n;Filament cost: {filament_cost}\n;M190 S{print_bed_temperature} ;Uncomment to add your own bed temperature line\n;M109 S{print_temperature} ;Uncomment to add your own temperature line\nG21 ;metric values\nG90 ;absolute positioning\nM82 ;set extruder to absolute mode\nM107 ;start with the fan off\nG28 X0 Y0 ;move X/Y to min endstops\nG28 Z0 ;move Z to min endstops\nM205 X8 ;X/Y Jerk settings\nG1 Z15.0 F{travel_speed} ;move the platform down 15mm\nG92 E0 ;zero the extruded length\nG1 F200 E7 ;extrude 3mm of feed stock\nG92 E0 ;zero the extruded length again\nG1 F{travel_speed}\n;Put printing message on LCD screen\nM117 Rigibot Printing..."
},
"machine_end_gcode": {
"default": ";End GCode\nM104 S0 ;extruder heater off\nM140 S0 ;heated bed heater off (if you have it)\nG91 ;relative positioning\nG1 E-1 F300 ;retract the filament a bit before lifting the nozzle, to release some of the pressure\nG1 Z+10 E-1 X-20 Y-20 F{travel_speed} ;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\nG1 Y230 F3000 ;move Y so the head is out of the way and Plate is moved forward\nM84 ;steppers off\nG90 ;absolute positioning\n;{profile_string}"
}
},
"overrides": {
"layer_height": { "default": 0.2 },
"shell_thickness": { "default": 0.8 },
"wall_thickness": { "default": 0.8 },
"top_bottom_thickness": { "default": 0.3, "visible": true },
"material_print_temperature": { "default": 195, "visible": true },
"material_bed_temperature": { "default": 60, "visible": true },
"material_diameter": { "default": 1.75, "visible": true },
"retraction_enable": { "default": true, "always_visible": true },
"retraction_speed": { "default": 50.0, "visible": false },
"retraction_amount": { "default": 0.8, "visible": false },
"retraction_hop": { "default": 0.075, "visible": false },
"speed_print": { "default": 60.0, "visible": true },
"speed_infill": { "default": 100.0, "visible": true },
"speed_topbottom": { "default": 15.0, "visible": true },
"speed_travel": { "default": 150.0, "visible": true },
"speed_layer_0": { "min_value": 0.1, "default": 15.0, "visible": true },
"infill_overlap": { "default": 10.0 },
"cool_fan_enabled": { "default": false, "visible": true },
"cool_fan_speed": { "default": 0.0, "visible": true },
"skirt_line_count": { "default": 3, "active_if": { "setting": "adhesion_type", "value": "None" } },
"skirt_gap": { "default": 4.0, "active_if": { "setting": "adhesion_type", "value": "None" } },
"skirt_minimal_length": { "default": 200.0, "active_if": { "setting": "adhesion_type", "value": "None" } }
}
}

View file

@ -0,0 +1,58 @@
{
"id": "rigidbotbig",
"version": 1,
"name": "RigidBotBig",
"manufacturer": "Invent-A-Part",
"author": "RBC",
"platform": "rigidbotbig_platform.stl",
"inherits": "fdmprinter.json",
"machine_settings": {
"machine_width": { "default": 400 },
"machine_depth": { "default": 300 },
"machine_height": { "default": 254 },
"machine_heated_bed": { "default": true },
"machine_nozzle_size": { "default": 0.4},
"machine_head_shape_min_x": { "default": 0 },
"machine_head_shape_min_y": { "default": 0 },
"machine_head_shape_max_x": { "default": 0 },
"machine_head_shape_max_y": { "default": 0 },
"machine_nozzle_gantry_distance": { "default": 0 },
"machine_gcode_flavor": { "default": "RepRap (Marlin/Sprinter)" },
"machine_start_gcode": {
"default": ";Sliced at: {day} {date} {time}\n;Basic settings: Layer height: {layer_height} Walls: {wall_thickness} Fill: {infill_density}\n;Print time: {print_time}\n;Filament used: {filament_amount}m {filament_weight}g\n;Filament cost: {filament_cost}\n;M190 S{print_bed_temperature} ;Uncomment to add your own bed temperature line\n;M109 S{print_temperature} ;Uncomment to add your own temperature line\nG21 ;metric values\nG90 ;absolute positioning\nM82 ;set extruder to absolute mode\nM107 ;start with the fan off\nG28 X0 Y0 ;move X/Y to min endstops\nG28 Z0 ;move Z to min endstops\nM205 X8 ;X/Y Jerk settings\nG1 Z15.0 F{travel_speed} ;move the platform down 15mm\nG92 E0 ;zero the extruded length\nG1 F200 E7 ;extrude 3mm of feed stock\nG92 E0 ;zero the extruded length again\nG1 F{travel_speed}\n;Put printing message on LCD screen\nM117 Rigibot Printing..."
},
"machine_end_gcode": {
"default": ";End GCode\nM104 S0 ;extruder heater off\nM140 S0 ;heated bed heater off (if you have it)\nG91 ;relative positioning\nG1 E-1 F300 ;retract the filament a bit before lifting the nozzle, to release some of the pressure\nG1 Z+10 E-1 X-20 Y-20 F{travel_speed} ;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\nG1 Y230 F3000 ;move Y so the head is out of the way and Plate is moved forward\nM84 ;steppers off\nG90 ;absolute positioning\n;{profile_string}"
}
},
"overrides": {
"layer_height": { "default": 0.2 },
"shell_thickness": { "default": 0.8},
"wall_thickness": { "default": 0.8 },
"top_bottom_thickness": { "default": 0.3, "visible": true },
"material_print_temperature": { "default": 195, "visible": true },
"material_bed_temperature": { "default": 60, "visible": true },
"material_diameter": { "default": 1.75, "visible": true },
"retraction_enable": { "default": true, "always_visible": true},
"retraction_speed": { "default": 50.0, "visible": false },
"retraction_amount": { "default": 0.8, "visible": false },
"retraction_hop": { "default": 0.075, "visible": false },
"speed_print": { "default": 60.0, "visible": true},
"speed_infill": { "default": 100.0, "visible": true },
"speed_topbottom": { "default": 15.0, "visible": true },
"speed_travel": { "default": 150.0, "visible": true },
"speed_layer_0": { "min_value": 0.1, "default": 15.0, "visible": true },
"infill_overlap": { "default": 10.0 },
"cool_fan_enabled": { "default": false, "visible": true},
"cool_fan_speed": { "default": 0.0, "visible": true },
"skirt_line_count": { "default": 3, "active_if": { "setting": "adhesion_type", "value": "None" } },
"skirt_gap": { "default": 4.0, "active_if": { "setting": "adhesion_type", "value": "None" } },
"skirt_minimal_length": { "default": 200.0, "active_if": { "setting": "adhesion_type", "value": "None" } }
}
}

View file

@ -0,0 +1,280 @@
{
"version": 1,
"inherits": "fdmprinter.json",
"machine_settings": {
"extruder_nr": { "default": 0 },
"machine_use_extruder_offset_to_offset_coords": { "default": false },
"machine_nozzle_offset_x": { "default": 0, "SEE_machine_extruder_trains": true },
"machine_nozzle_offset_y": { "default": 0, "SEE_machine_extruder_trains": true },
"machine_extruder_start_code": { "default": "", "SEE_machine_extruder_trains": true },
"machine_extruder_start_pos_abs": { "default": false, "SEE_machine_extruder_trains": true },
"machine_extruder_start_pos_x": { "default": 0, "SEE_machine_extruder_trains": true },
"machine_extruder_start_pos_y": { "default": 0, "SEE_machine_extruder_trains": true },
"machine_extruder_end_pos_abs": { "default": false, "SEE_machine_extruder_trains": true },
"machine_extruder_end_pos_x": { "default": 0, "SEE_machine_extruder_trains": true },
"machine_extruder_end_pos_y": { "default": 0, "SEE_machine_extruder_trains": true },
"machine_extruder_end_code": { "default": "", "SEE_machine_extruder_trains": true }
},
"overrides": {
"speed_print": {
"children": {
"speed_prime_tower": {
"label": "Prime Tower Speed",
"description": "The speed at which the prime tower is printed. Printing the prime tower slower can make it more stable when the adhesion between the different filaments is suboptimal.",
"unit": "mm/s",
"type": "float",
"min_value": 0.1,
"max_value_warning": 150,
"default": 50,
"visible": false,
"active_if": {
"setting": "prime_tower_enable",
"value": true
}
}
}
},
"line_width": {
"children": {
"prime_tower_line_width": {
"label": "Prime Tower Line Width",
"description": "Width of a single prime tower line.",
"unit": "mm",
"min_value": 0.0001,
"min_value_warning": 0.2,
"max_value_warning": 5,
"default": 0.4,
"type": "float",
"visible": false,
"active_if": {
"setting": "prime_tower_enable",
"value": true
}
}
}
}
},
"categories": {
"dual": {
"label": "Dual Extrusion",
"visible": false,
"icon": "category_dual",
"settings": {
"prime_tower_enable": {
"label": "Enable Prime Tower",
"description": "Print a tower next to the print which serves to prime the material after each nozzle switch.",
"type": "boolean",
"default": false
},
"prime_tower_size": {
"label": "Prime Tower Size",
"description": "The width of the prime tower.",
"visible": false,
"type": "float",
"unit": "mm",
"default": 15,
"min_value": 0,
"max_value_warning": 20,
"inherit_function": "0 if prime_tower_enable else 15",
"active_if": {
"setting": "prime_tower_enable",
"value": true
}
},
"prime_tower_position_x": {
"label": "Prime Tower X Position",
"description": "The x position of the prime tower.",
"visible": false,
"type": "float",
"unit": "mm",
"default": 200,
"active_if": {
"setting": "prime_tower_enable",
"value": true
}
},
"prime_tower_position_y": {
"label": "Prime Tower Y Position",
"description": "The y position of the prime tower.",
"visible": false,
"type": "float",
"unit": "mm",
"default": 200,
"active_if": {
"setting": "prime_tower_enable",
"value": true
}
},
"prime_tower_flow": {
"label": "Prime Tower Flow",
"description": "Flow compensation: the amount of material extruded is multiplied by this value.",
"visible": false,
"unit": "%",
"default": 100,
"type": "float",
"min_value": 5,
"min_value_warning": 50,
"max_value_warning": 150,
"active_if": {
"setting": "prime_tower_enable",
"value": true
}
},
"prime_tower_wipe_enabled": {
"label": "Wipe Nozzle on Prime tower",
"description": "After printing the prime tower with the one nozzle, wipe the oozed material from the other nozzle off on the prime tower.",
"type": "boolean",
"default": false,
"active_if": {
"setting": "prime_tower_enable",
"value": true
}
},
"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,
"max_value": 90,
"default": 60,
"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,
"max_value_warning": 30,
"default": 2,
"visible": false,
"active_if": {
"setting": "ooze_shield_enabled",
"value": true
}
}
}
},
"platform_adhesion": {
"settings": {
"adhesion_extruder_nr": {
"label": "Platform Adhesion Extruder",
"description": "The extruder train to use for printing the skirt/brim/raft. This is used in multi-extrusion.",
"type": "int",
"default": 0,
"min_value": 0,
"max_value": 16,
"inherit_function": "extruder_nr"
}
}
},
"material": {
"settings": {
"switch_extruder_retraction_amount": {
"label": "Nozzle Switch Retraction Distance",
"description": "The amount of retraction: Set at 0 for no retraction at all. This should generally be the same as the length of the heat zone.",
"unit": "mm",
"type": "float",
"default": 16,
"visible": false,
"inherit_function": "machine_heat_zone_length",
"active_if": {
"setting": "retraction_enable",
"value": true
}
},
"switch_extruder_retraction_speeds": {
"label": "Nozzle Switch Retraction Speed",
"description": "The speed at which the filament is retracted. A higher retraction speed works better, but a very high retraction speed can lead to filament grinding.",
"unit": "mm/s",
"type": "float",
"default": 20,
"visible": false,
"inherit": false,
"active_if": {
"setting": "retraction_enable",
"value": true
},
"children": {
"switch_extruder_retraction_speed": {
"label": "Nozzle Switch Retract Speed",
"description": "The speed at which the filament is retracted during a nozzle switch retract. ",
"unit": "mm/s",
"type": "float",
"default": 20,
"visible": false,
"active_if": {
"setting": "retraction_enable",
"value": true
}
},
"switch_extruder_prime_speed": {
"label": "Nozzle Switch Prime Speed",
"description": "The speed at which the filament is pushed back after a nozzle switch retraction.",
"unit": "mm/s",
"type": "float",
"default": 20,
"visible": false,
"active_if": {
"setting": "retraction_enable",
"value": true
}
}
}
}
}
},
"support": {
"settings": {
"support_extruder_nr": {
"label": "Support Extruder",
"description": "The extruder train to use for printing the support. This is used in multi-extrusion.",
"type": "int",
"default": 0,
"min_value": 0,
"max_value": 16,
"inherit_function": "extruder_nr",
"children": {
"support_extruder_nr_layer_0": {
"label": "First Layer Support Extruder",
"description": "The extruder train to use for printing the first layer of support. This is used in multi-extrusion.",
"type": "int",
"default": 0,
"min_value": 0,
"max_value": 16,
"inherit": true
},
"support_roof_extruder_nr": {
"label": "Hammock Extruder",
"description": "The extruder train to use for printing the hammock. This is used in multi-extrusion.",
"type": "int",
"default": 0,
"min_value": 0,
"max_value": 16,
"inherit": true,
"active_if": {
"setting": "support_roof_enable",
"value": true
}
}
}
}
}
}
}
}

View file

@ -0,0 +1,82 @@
{
"id": "maker_starter",
"version": 1,
"name": "3DMaker Starter",
"manufacturer": "Other",
"author": "Other",
"icon": "icon_ultimaker2.png",
"platform": "makerstarter_platform.stl",
"inherits": "fdmprinter.json",
"machine_settings": {
"machine_width": { "default": 210 },
"machine_depth": { "default": 185 },
"machine_height": { "default": 200 },
"machine_heated_bed": { "default": false },
"machine_center_is_zero": { "default": false },
"machine_nozzle_size": { "default": 0.4 },
"machine_head_shape_min_x": { "default": 0 },
"machine_head_shape_min_y": { "default": 0 },
"machine_head_shape_max_x": { "default": 0 },
"machine_head_shape_max_y": { "default": 0 },
"machine_nozzle_gantry_distance": { "default": 55 },
"machine_gcode_flavor": { "default": "RepRap" },
"machine_disallowed_areas": { "default": []},
"machine_platform_offset": { "default": [0.0, 0.0, 0.0] },
"machine_nozzle_tip_outer_diameter": { "default": 1.0 },
"machine_nozzle_head_distance": { "default": 3.0 },
"machine_nozzle_expansion_angle": { "default": 45 }
},
"overrides": {
"layer_height": { "default": 0.2 },
"layer_height_0": { "default": 0.2, "visible": false },
"wall_line_count": { "default": 2, "visible": true },
"top_layers": { "default": 4, "visible": true },
"bottom_layers": { "default": 4, "visible": true },
"material_print_temperature": { "visible": false },
"material_bed_temperature": { "visible": false },
"material_diameter": { "default": 1.75, "visible": false },
"material_flow": { "visible": false },
"retraction_hop": { "default": 0.2 },
"speed_print": { "default": 50.0 },
"speed_wall": { "default": 30.0 },
"speed_wall_0": { "default": 30.0 },
"speed_wall_x": { "default": 30.0 },
"speed_topbottom": { "default": 50.0 },
"speed_support": { "default": 50.0 },
"speed_travel": { "default": 120.0 },
"speed_layer_0": { "default": 20.0 },
"skirt_speed": { "default": 15.0 },
"speed_slowdown_layers": { "default": 4 },
"infill_sparse_density": { "default": 20.0 },
"cool_fan_speed_min": { "default": 50.0 },
"cool_fan_speed_max": { "default": 100.0 },
"cool_fan_full_layer": { "default": 4, "visible": true },
"cool_min_layer_time": { "default": 5.0 },
"cool_min_layer_time_fan_speed_max": { "default": 10.0 },
"support_type": { "default": "Everywhere" },
"support_angle": { "default": 45.0, "visible": true },
"support_xy_distance": { "default": 1 },
"support_z_distance": { "default": 0.2 },
"support_top_distance": { "default": 0.2 },
"support_bottom_distance": { "default": 0.24 },
"support_pattern": { "default": "ZigZag" },
"support_infill_rate": { "default": 15, "visible": true },
"adhesion_type": { "default": "Raft" },
"skirt_minimal_length": { "default": 100.0 },
"raft_base_line_spacing": { "default": 2.0 },
"raft_base_thickness": { "default": 0.3 },
"raft_base_line_width": { "default": 2.0 },
"raft_base_speed": { "default": 15.0 },
"raft_interface_thickness": { "default": 0.24 },
"raft_interface_line_width": { "default": 0.6 },
"raft_airgap": { "default": 0.2 },
"raft_surface_layers": { "default": 2 }
}
}

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View file

@ -38,51 +38,23 @@ QtObject {
property Component open_file_button: Component {
ButtonStyle {
background: Item{
implicitWidth: UM.Theme.sizes.button.width;
implicitHeight: UM.Theme.sizes.button.height;
implicitWidth: UM.Theme.sizes.loadfile_button.width
implicitHeight: UM.Theme.sizes.loadfile_button.height
Rectangle {
anchors.bottom: parent.verticalCenter;
width: parent.width;
height: control.hovered ? parent.height / 2 + label.height : 0;
Behavior on height { NumberAnimation { duration: 100; } }
opacity: control.hovered ? 1.0 : 0.0;
Behavior on opacity { NumberAnimation { duration: 100; } }
Label {
id: label;
anchors.horizontalCenter: parent.horizontalCenter;
text: control.text.replace("&", "");
font: UM.Theme.fonts.button_tooltip;
color: UM.Theme.colors.button_tooltip_text;
}
}
UM.AngledCornerRectangle {
anchors.fill: parent;
color: {
if(control.hovered) {
return UM.Theme.colors.button_active_hover;
} else {
return UM.Theme.colors.button_active;
}
}
width: parent.width
height: parent.height
color: control.hovered ? UM.Theme.colors.load_save_button_hover : UM.Theme.colors.load_save_button
Behavior on color { ColorAnimation { duration: 50; } }
cornerSize: UM.Theme.sizes.default_margin.width;
}
Label {
anchors.centerIn: parent
text: control.text
color: UM.Theme.colors.load_save_button_text
font: UM.Theme.fonts.default
}
}
label: Item {
Image {
anchors.centerIn: parent;
source: control.iconSource;
width: UM.Theme.sizes.button_icon.width;
height: UM.Theme.sizes.button_icon.height;
sourceSize: UM.Theme.sizes.button_icon;
}
label: Label{
visible: false
}
}
}
@ -94,7 +66,8 @@ QtObject {
implicitHeight: UM.Theme.sizes.button.height;
Rectangle {
anchors.bottom: parent.verticalCenter;
id: tool_button_background
anchors.top: parent.verticalCenter;
width: parent.width;
height: control.hovered ? parent.height / 2 + label.height : 0;
@ -103,21 +76,16 @@ QtObject {
opacity: control.hovered ? 1.0 : 0.0;
Behavior on opacity { NumberAnimation { duration: 100; } }
Rectangle {
anchors.horizontalCenter: parent.horizontalCenter;
width: childrenRect.width;
height: childrenRect.height;
Label {
id: label
text: control.text.replace("&", "");
anchors.bottom: parent.bottom
text: control.text
font: UM.Theme.fonts.button_tooltip;
color: UM.Theme.colors.button_tooltip_text;
}
}
}
UM.AngledCornerRectangle {
Rectangle {
id: buttonFace;
anchors.fill: parent;
@ -138,16 +106,16 @@ QtObject {
}
}
Behavior on color { ColorAnimation { duration: 50; } }
cornerSize: UM.Theme.sizes.default_margin.width;
Label {
id: tool_button_arrow
anchors.right: parent.right;
anchors.rightMargin: UM.Theme.sizes.default_margin.width / 2;
anchors.rightMargin: (UM.Theme.sizes.button.width - UM.Theme.sizes.button_icon.width - tool_button_arrow.width) / 2
anchors.verticalCenter: parent.verticalCenter;
text: "▼";
font: UM.Theme.fonts.small;
visible: control.menu != null;
color: "white";
color: UM.Theme.colors.button_text
}
}
}
@ -165,34 +133,98 @@ QtObject {
}
}
}
property Component tool_button_panel: Component {
ButtonStyle {
background: Item {
implicitWidth: UM.Theme.sizes.button.width;
implicitHeight: UM.Theme.sizes.button.height;
Rectangle {
id: tool_button_background
anchors.top: parent.verticalCenter;
width: parent.width;
height: control.hovered ? parent.height / 2 + label.height : 0;
Behavior on height { NumberAnimation { duration: 100; } }
opacity: control.hovered ? 1.0 : 0.0;
Behavior on opacity { NumberAnimation { duration: 100; } }
Label {
id: label
anchors.bottom: parent.bottom
text: control.text
width: UM.Theme.sizes.button.width;
wrapMode: Text.WordWrap
font: UM.Theme.fonts.button_tooltip;
color: UM.Theme.colors.button_tooltip_text;
}
}
Rectangle {
id: buttonFace;
anchors.fill: parent;
property bool down: control.pressed || (control.checkable && control.checked);
color: {
if(!control.enabled) {
return UM.Theme.colors.button_disabled;
} else if(control.checkable && control.checked && control.hovered) {
return UM.Theme.colors.button_active_hover;
} else if(control.pressed || (control.checkable && control.checked)) {
return UM.Theme.colors.button_active;
} else if(control.hovered) {
return UM.Theme.colors.button_hover;
} else {
return UM.Theme.colors.button;
}
}
Behavior on color { ColorAnimation { duration: 50; } }
}
}
label: Item {
Image {
anchors.centerIn: parent;
source: control.iconSource;
width: UM.Theme.sizes.button_icon.width;
height: UM.Theme.sizes.button_icon.height;
sourceSize: UM.Theme.sizes.button_icon;
}
}
}
}
property Component progressbar: Component{
ProgressBarStyle {
background: UM.AngledCornerRectangle {
cornerSize: UM.Theme.sizes.progressbar_control.height
implicitWidth: UM.Theme.sizes.progressbar.width
background:Rectangle {
implicitWidth: UM.Theme.sizes.message.width - (UM.Theme.sizes.default_margin.width * 2)
implicitHeight: UM.Theme.sizes.progressbar.height
x: UM.Theme.sizes.default_margin.width
color: UM.Theme.colors.progressbar_background
}
progress: UM.AngledCornerRectangle {
cornerSize: UM.Theme.sizes.progressbar_control.height
progress: Rectangle {
color: control.indeterminate ? "transparent" : UM.Theme.colors.progressbar_control
UM.AngledCornerRectangle {
cornerSize: UM.Theme.sizes.progressbar_control.height
Rectangle{
color: UM.Theme.colors.progressbar_control
width: UM.Theme.sizes.progressbar_control.width
height: UM.Theme.sizes.progressbar_control.height
x: UM.Theme.sizes.default_margin.width
visible: control.indeterminate
SequentialAnimation on x {
id: xAnim
property int animEndPoint: UM.Theme.sizes.progressbar.width - UM.Theme.sizes.progressbar_control.width
property int animEndPoint: UM.Theme.sizes.message.width - UM.Theme.sizes.default_margin.width - UM.Theme.sizes.progressbar_control.width
running: control.indeterminate
loops: Animation.Infinite
NumberAnimation { from: 0; to: xAnim.animEndPoint; duration: 2000;}
NumberAnimation { from: xAnim.animEndPoint; to: 0; duration: 2000;}
NumberAnimation { from: UM.Theme.sizes.default_margin.width; to: xAnim.animEndPoint; duration: 2000;}
NumberAnimation { from: xAnim.animEndPoint; to: UM.Theme.sizes.default_margin.width; duration: 2000;}
}
}
}

View file

@ -3,47 +3,52 @@
"large": {
"size": 1.5,
"bold": true,
"family": "Roboto"
"family": "ProximaNova"
},
"default": {
"size": 1,
"family": "Roboto"
"family": "ProximaNova"
},
"default_allcaps": {
"size": 1,
"capitalize": true,
"family": "Roboto"
"family": "ProximaNova"
},
"small": {
"size": 0.75,
"family": "Roboto"
"family": "ProximaNova"
},
"tiny": {
"size": 0.5,
"family": "Roboto"
"family": "ProximaNova"
},
"caption": {
"size": 0.75,
"italic": true,
"family": "ProximaNova"
},
"sidebar_header": {
"size": 0.75,
"capitalize": true,
"family": "Roboto"
"family": "ProximaNova"
},
"sidebar_save_to": {
"size": 1.0,
"family": "Roboto"
"family": "ProximaNova"
},
"timeslider_time": {
"size": 1.0,
"bold": true,
"family": "Roboto"
"family": "ProximaNova"
},
"button_tooltip": {
"size": 0.75,
"capitalize": true,
"family": "Roboto"
"family": "ProximaNova"
},
"setting_category": {
"size": 1.5,
"family": "Roboto"
"family": "ProximaNova"
}
},
@ -61,14 +66,20 @@
"text_hover": [35, 35, 35, 255],
"text_pressed": [12, 169, 227, 255],
"button": [160, 163, 171, 255],
"button_hover": [140, 144, 154, 255],
"button": [139, 143, 153, 255],
"button_hover": [116, 120, 127, 255],
"button_active": [12, 169, 227, 255],
"button_active_hover": [34, 150, 199, 255],
"button_active_hover": [77, 184, 226, 255],
"button_lining": [208, 210, 211, 255],
"button_text": [255, 255, 255, 255],
"button_disabled": [245, 245, 245, 255],
"button_tooltip_text": [35, 35, 35, 255],
"load_save_button": [0, 0, 0, 255],
"load_save_button_text": [255, 255, 255, 255],
"load_save_button_hover": [43, 45, 46, 255],
"load_save_button_active": [43, 45, 46, 255],
"scrollbar_background": [245, 245, 245, 255],
"scrollbar_handle": [205, 202, 201, 255],
"scrollbar_handle_hover": [174, 174, 174, 255],
@ -92,7 +103,7 @@
"setting_validation_warning": [255, 186, 15, 255],
"setting_validation_ok": [255, 255, 255, 255],
"progressbar_background": [245, 245, 245, 255],
"progressbar_background": [208, 210, 211, 255],
"progressbar_control": [12, 169, 227, 255],
"slider_groove": [245, 245, 245, 255],
@ -120,8 +131,8 @@
"save_button_printtime_text": [12, 169, 227, 255],
"save_button_background": [249, 249, 249, 255],
"message": [205, 202, 201, 255],
"message_text": [35, 35, 35, 255],
"message_background": [255, 255, 255, 255],
"message_text": [12, 169, 227, 255],
"tool_panel_background": [255, 255, 255, 255]
},
@ -129,11 +140,15 @@
"sizes": {
"window_margin": [2.0, 2.0],
"default_margin": [1.0, 1.0],
"default_lining": [0.1, 0.1],
"panel": [22.0, 10.0],
"logo": [9.5, 2.0],
"toolbar_button": [2.0, 2.0],
"toolbar_spacing": [1.0, 1.0],
"loadfile_button": [11.0, 2.4],
"loadfile_margin": [0.8, 0.4],
"section": [22.0, 3.0],
"section_icon": [2.14, 2.14],
"section_text_margin": [0.33, 0.33],
@ -144,11 +159,14 @@
"setting_unit_margin": [0.5, 0.5],
"setting_text_maxwidth": [40.0, 0.0],
"button": [4.25, 4.25],
"button_icon": [2.9, 2.9],
"standard_list_lineheight": [1.5, 1.5],
"standard_list_input": [20.0, 25.0],
"progressbar": [26.0, 0.5],
"progressbar_control": [8.0, 0.5],
"button": [3.2, 3.2],
"button_icon": [2.5, 2.5],
"progressbar": [26.0, 0.8],
"progressbar_control": [8.0, 0.8],
"progressbar_padding": [0.0, 1.0],
"scrollbar": [0.5, 0.5],
@ -171,7 +189,11 @@
"save_button_label_margin": [0.5, 0.5],
"save_button_save_to_button": [0.3, 2.7],
"modal_window_minimum": [30.0, 30.0],
"wizard_progress": [10.0, 0.0],
"message": [30.0, 5.0],
"message_close": [1.25, 1.25]
"message_close": [1.25, 1.25],
"message_button": [6.0, 1.8]
}
}