mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-08-03 12:03:57 -06:00
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:
commit
f099c30dfd
66 changed files with 2608 additions and 1842 deletions
|
@ -2,6 +2,8 @@
|
||||||
project(cura)
|
project(cura)
|
||||||
cmake_minimum_required(VERSION 2.8.12)
|
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")
|
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 "")
|
if(NOT ${URANIUM_SCRIPTS_DIR} STREQUAL "")
|
||||||
|
@ -10,13 +12,14 @@ if(NOT ${URANIUM_SCRIPTS_DIR} STREQUAL "")
|
||||||
|
|
||||||
# Build Translations
|
# Build Translations
|
||||||
find_package(Gettext)
|
find_package(Gettext)
|
||||||
include(${URANIUM_SCRIPTS_DIR}/ECMPoQmTools.cmake)
|
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.
|
# 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
|
# The files are checked for a _qt suffix and if it is found, converted to
|
||||||
# qm, otherwise they are converted to .po.
|
# 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
|
# 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
|
# 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
|
# 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})
|
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}...")
|
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()
|
endforeach()
|
||||||
|
|
||||||
|
install(FILES ${qm_files} ${mo_files} DESTINATION ${CMAKE_INSTALL_DATADIR}/uranium/resources/i18n/${lang}/LC_MESSAGES/)
|
||||||
endforeach()
|
endforeach()
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
include(GNUInstallDirs)
|
|
||||||
find_package(PythonInterp 3.4.0 REQUIRED)
|
find_package(PythonInterp 3.4.0 REQUIRED)
|
||||||
|
|
||||||
install(DIRECTORY resources DESTINATION ${CMAKE_INSTALL_DATADIR}/cura)
|
install(DIRECTORY resources DESTINATION ${CMAKE_INSTALL_DATADIR}/cura)
|
||||||
|
|
|
@ -39,7 +39,8 @@ Please checkout [cura-build](https://github.com/Ultimaker/cura-build)
|
||||||
|
|
||||||
Third party plugins
|
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
|
Making profiles for other printers
|
||||||
----------------------------------
|
----------------------------------
|
||||||
|
|
|
@ -5,7 +5,7 @@ GenericName=3D Printing Software
|
||||||
Comment=
|
Comment=
|
||||||
Exec=/usr/bin/cura_app.py
|
Exec=/usr/bin/cura_app.py
|
||||||
TryExec=/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
|
Terminal=false
|
||||||
Type=Application
|
Type=Application
|
||||||
Categories=Graphics;
|
Categories=Graphics;
|
||||||
|
|
|
@ -25,20 +25,21 @@ class ConvexHullJob(Job):
|
||||||
child_hull = child.callDecoration("getConvexHull")
|
child_hull = child.callDecoration("getConvexHull")
|
||||||
if child_hull:
|
if child_hull:
|
||||||
hull.setPoints(numpy.append(hull.getPoints(), child_hull.getPoints(), axis = 0))
|
hull.setPoints(numpy.append(hull.getPoints(), child_hull.getPoints(), axis = 0))
|
||||||
|
|
||||||
if hull.getPoints().size < 3:
|
if hull.getPoints().size < 3:
|
||||||
self._node.callDecoration("setConvexHull", None)
|
self._node.callDecoration("setConvexHull", None)
|
||||||
self._node.callDecoration("setConvexHullJob", None)
|
self._node.callDecoration("setConvexHullJob", None)
|
||||||
return
|
return
|
||||||
|
|
||||||
else:
|
else:
|
||||||
if not self._node.getMeshData():
|
if not self._node.getMeshData():
|
||||||
return
|
return
|
||||||
mesh = self._node.getMeshData()
|
mesh = self._node.getMeshData()
|
||||||
vertex_data = mesh.getTransformed(self._node.getWorldTransformation()).getVertices()
|
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))
|
hull = Polygon(numpy.rint(vertex_data[:, [0, 2]]).astype(int))
|
||||||
|
|
||||||
# First, calculate the normal convex hull around the points
|
# First, calculate the normal convex hull around the points
|
||||||
hull = hull.getConvexHull()
|
hull = hull.getConvexHull()
|
||||||
|
|
||||||
|
@ -57,7 +58,7 @@ class ConvexHullJob(Job):
|
||||||
self._node.callDecoration("setConvexHullNode", hull_node)
|
self._node.callDecoration("setConvexHullNode", hull_node)
|
||||||
self._node.callDecoration("setConvexHull", hull)
|
self._node.callDecoration("setConvexHull", hull)
|
||||||
self._node.callDecoration("setConvexHullJob", None)
|
self._node.callDecoration("setConvexHullJob", None)
|
||||||
|
|
||||||
if self._node.getParent().callDecoration("isGroup"):
|
if self._node.getParent().callDecoration("isGroup"):
|
||||||
job = self._node.getParent().callDecoration("getConvexHullJob")
|
job = self._node.getParent().callDecoration("getConvexHullJob")
|
||||||
if job:
|
if job:
|
||||||
|
|
|
@ -33,14 +33,14 @@ class ConvexHullNode(SceneNode):
|
||||||
self._hull = hull
|
self._hull = hull
|
||||||
|
|
||||||
hull_points = self._hull.getPoints()
|
hull_points = self._hull.getPoints()
|
||||||
center = (hull_points.min(0) + hull_points.max(0)) / 2.0
|
|
||||||
|
|
||||||
mesh = MeshData()
|
mesh = MeshData()
|
||||||
mesh.addVertex(center[0], 0.1, center[1])
|
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:
|
for point in hull_points:
|
||||||
mesh.addVertex(point[0], 0.1, point[1])
|
mesh.addVertex(point[0], 0.1, point[1])
|
||||||
|
|
||||||
indices = []
|
indices = []
|
||||||
for i in range(len(hull_points) - 1):
|
for i in range(len(hull_points) - 1):
|
||||||
indices.append([0, i + 1, i + 2])
|
indices.append([0, i + 1, i + 2])
|
||||||
|
|
|
@ -38,7 +38,11 @@ from . import PrintInformation
|
||||||
from . import CuraActions
|
from . import CuraActions
|
||||||
from . import MultiMaterialDecorator
|
from . import MultiMaterialDecorator
|
||||||
|
|
||||||
|
<<<<<<< HEAD
|
||||||
from PyQt5.QtCore import pyqtSlot, QUrl, Qt, pyqtSignal, pyqtProperty, Q_ENUMS
|
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
|
from PyQt5.QtGui import QColor, QIcon
|
||||||
|
|
||||||
import platform
|
import platform
|
||||||
|
@ -84,6 +88,7 @@ class CuraApplication(QtApplication):
|
||||||
self._platform_activity = False
|
self._platform_activity = False
|
||||||
|
|
||||||
self.getMachineManager().activeMachineInstanceChanged.connect(self._onActiveMachineChanged)
|
self.getMachineManager().activeMachineInstanceChanged.connect(self._onActiveMachineChanged)
|
||||||
|
self.getController().getScene().sceneChanged.connect(self.updatePlatformActivity)
|
||||||
|
|
||||||
Resources.addType(self.ResourceTypes.QmlFiles, "qml")
|
Resources.addType(self.ResourceTypes.QmlFiles, "qml")
|
||||||
Resources.addType(self.ResourceTypes.Firmware, "firmware")
|
Resources.addType(self.ResourceTypes.Firmware, "firmware")
|
||||||
|
@ -92,6 +97,7 @@ class CuraApplication(QtApplication):
|
||||||
Preferences.getInstance().addPreference("cura/active_mode", "simple")
|
Preferences.getInstance().addPreference("cura/active_mode", "simple")
|
||||||
Preferences.getInstance().addPreference("cura/recent_files", "")
|
Preferences.getInstance().addPreference("cura/recent_files", "")
|
||||||
Preferences.getInstance().addPreference("cura/categories_expanded", "")
|
Preferences.getInstance().addPreference("cura/categories_expanded", "")
|
||||||
|
Preferences.getInstance().addPreference("view/center_on_select", True)
|
||||||
|
|
||||||
JobQueue.getInstance().jobFinished.connect(self._onJobFinished)
|
JobQueue.getInstance().jobFinished.connect(self._onJobFinished)
|
||||||
|
|
||||||
|
@ -123,6 +129,11 @@ class CuraApplication(QtApplication):
|
||||||
def run(self):
|
def run(self):
|
||||||
self._i18n_catalog = i18nCatalog("cura");
|
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..."))
|
self.showSplashMessage(self._i18n_catalog.i18nc("Splash screen message", "Setting up scene..."))
|
||||||
|
|
||||||
controller = self.getController()
|
controller = self.getController()
|
||||||
|
@ -133,7 +144,7 @@ class CuraApplication(QtApplication):
|
||||||
|
|
||||||
t = controller.getTool("TranslateTool")
|
t = controller.getTool("TranslateTool")
|
||||||
if t:
|
if t:
|
||||||
t.setEnabledAxis([ToolHandle.XAxis, ToolHandle.ZAxis])
|
t.setEnabledAxis([ToolHandle.XAxis, ToolHandle.YAxis,ToolHandle.ZAxis])
|
||||||
|
|
||||||
Selection.selectionChanged.connect(self.onSelectionChanged)
|
Selection.selectionChanged.connect(self.onSelectionChanged)
|
||||||
|
|
||||||
|
@ -181,12 +192,17 @@ class CuraApplication(QtApplication):
|
||||||
self.closeSplash()
|
self.closeSplash()
|
||||||
|
|
||||||
for file in self.getCommandLineOption("file", []):
|
for file in self.getCommandLineOption("file", []):
|
||||||
job = ReadMeshJob(os.path.abspath(file))
|
self._openFile(file)
|
||||||
job.finished.connect(self._onFileLoaded)
|
|
||||||
job.start()
|
|
||||||
|
|
||||||
self.exec_()
|
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):
|
def registerObjects(self, engine):
|
||||||
engine.rootContext().setContextProperty("Printer", self)
|
engine.rootContext().setContextProperty("Printer", self)
|
||||||
self._print_information = PrintInformation.PrintInformation()
|
self._print_information = PrintInformation.PrintInformation()
|
||||||
|
@ -202,10 +218,10 @@ class CuraApplication(QtApplication):
|
||||||
self._previous_active_tool = None
|
self._previous_active_tool = None
|
||||||
else:
|
else:
|
||||||
self.getController().setActiveTool("TranslateTool")
|
self.getController().setActiveTool("TranslateTool")
|
||||||
|
if Preferences.getInstance().getValue("view/center_on_select"):
|
||||||
self._camera_animation.setStart(self.getController().getTool("CameraTool").getOrigin())
|
self._camera_animation.setStart(self.getController().getTool("CameraTool").getOrigin())
|
||||||
self._camera_animation.setTarget(Selection.getSelectedObject(0).getWorldPosition())
|
self._camera_animation.setTarget(Selection.getSelectedObject(0).getWorldPosition())
|
||||||
self._camera_animation.start()
|
self._camera_animation.start()
|
||||||
else:
|
else:
|
||||||
if self.getController().getActiveTool():
|
if self.getController().getActiveTool():
|
||||||
self._previous_active_tool = self.getController().getActiveTool().getPluginId()
|
self._previous_active_tool = self.getController().getActiveTool().getPluginId()
|
||||||
|
@ -220,24 +236,15 @@ class CuraApplication(QtApplication):
|
||||||
def getPlatformActivity(self):
|
def getPlatformActivity(self):
|
||||||
return self._platform_activity
|
return self._platform_activity
|
||||||
|
|
||||||
@pyqtSlot(bool)
|
def updatePlatformActivity(self, node = None):
|
||||||
def setPlatformActivity(self, activity):
|
count = 0
|
||||||
##Sets the _platform_activity variable on true or false depending on whether there is a mesh on the platform
|
for node in DepthFirstIterator(self.getController().getScene().getRoot()):
|
||||||
if activity == True:
|
if type(node) is not SceneNode or not node.getMeshData():
|
||||||
self._platform_activity = activity
|
continue
|
||||||
elif activity == False:
|
|
||||||
nodes = []
|
count += 1
|
||||||
for node in DepthFirstIterator(self.getController().getScene().getRoot()):
|
|
||||||
if type(node) is not SceneNode or not node.getMeshData():
|
self._platform_activity = True if count > 0 else False
|
||||||
continue
|
|
||||||
nodes.append(node)
|
|
||||||
i = 0
|
|
||||||
for node in nodes:
|
|
||||||
if not node.getMeshData():
|
|
||||||
continue
|
|
||||||
i += 1
|
|
||||||
if i <= 1: ## i == 0 when the meshes are removed using the deleteAll function; i == 1 when the last remaining mesh is removed using the deleteObject function
|
|
||||||
self._platform_activity = activity
|
|
||||||
self.activityChanged.emit()
|
self.activityChanged.emit()
|
||||||
|
|
||||||
## Remove an object from the scene
|
## Remove an object from the scene
|
||||||
|
@ -258,8 +265,7 @@ class CuraApplication(QtApplication):
|
||||||
group_node = group_node.getParent()
|
group_node = group_node.getParent()
|
||||||
op = RemoveSceneNodeOperation(group_node)
|
op = RemoveSceneNodeOperation(group_node)
|
||||||
op.push()
|
op.push()
|
||||||
self.setPlatformActivity(False)
|
|
||||||
|
|
||||||
## Create a number of copies of existing object.
|
## Create a number of copies of existing object.
|
||||||
@pyqtSlot("quint64", int)
|
@pyqtSlot("quint64", int)
|
||||||
def multiplyObject(self, object_id, count):
|
def multiplyObject(self, object_id, count):
|
||||||
|
@ -306,8 +312,7 @@ class CuraApplication(QtApplication):
|
||||||
op.addOperation(RemoveSceneNodeOperation(node))
|
op.addOperation(RemoveSceneNodeOperation(node))
|
||||||
|
|
||||||
op.push()
|
op.push()
|
||||||
self.setPlatformActivity(False)
|
|
||||||
|
|
||||||
## Reset all translation on nodes with mesh data.
|
## Reset all translation on nodes with mesh data.
|
||||||
@pyqtSlot()
|
@pyqtSlot()
|
||||||
def resetAllTranslation(self):
|
def resetAllTranslation(self):
|
||||||
|
@ -490,12 +495,9 @@ class CuraApplication(QtApplication):
|
||||||
self._platform.setPosition(Vector(0.0, 0.0, 0.0))
|
self._platform.setPosition(Vector(0.0, 0.0, 0.0))
|
||||||
|
|
||||||
def _onFileLoaded(self, job):
|
def _onFileLoaded(self, job):
|
||||||
mesh = job.getResult()
|
node = job.getResult()
|
||||||
if mesh != None:
|
if node != None:
|
||||||
node = SceneNode()
|
|
||||||
|
|
||||||
node.setSelectable(True)
|
node.setSelectable(True)
|
||||||
node.setMeshData(mesh)
|
|
||||||
node.setName(os.path.basename(job.getFileName()))
|
node.setName(os.path.basename(job.getFileName()))
|
||||||
|
|
||||||
op = AddSceneNodeOperation(node, self.getController().getScene().getRoot())
|
op = AddSceneNodeOperation(node, self.getController().getScene().getRoot())
|
||||||
|
@ -521,4 +523,10 @@ class CuraApplication(QtApplication):
|
||||||
self.recentFilesChanged.emit()
|
self.recentFilesChanged.emit()
|
||||||
|
|
||||||
def _reloadMeshFinished(self, job):
|
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()
|
||||||
|
|
||||||
|
|
|
@ -12,6 +12,8 @@ from UM.Math.Vector import Vector
|
||||||
from UM.Math.AxisAlignedBox import AxisAlignedBox
|
from UM.Math.AxisAlignedBox import AxisAlignedBox
|
||||||
from UM.Application import Application
|
from UM.Application import Application
|
||||||
from UM.Scene.Selection import Selection
|
from UM.Scene.Selection import Selection
|
||||||
|
from UM.Preferences import Preferences
|
||||||
|
|
||||||
from cura.ConvexHullDecorator import ConvexHullDecorator
|
from cura.ConvexHullDecorator import ConvexHullDecorator
|
||||||
|
|
||||||
from . import PlatformPhysicsOperation
|
from . import PlatformPhysicsOperation
|
||||||
|
@ -19,6 +21,7 @@ from . import ConvexHullJob
|
||||||
|
|
||||||
import time
|
import time
|
||||||
import threading
|
import threading
|
||||||
|
import copy
|
||||||
|
|
||||||
class PlatformPhysics:
|
class PlatformPhysics:
|
||||||
def __init__(self, controller, volume):
|
def __init__(self, controller, volume):
|
||||||
|
@ -36,6 +39,8 @@ class PlatformPhysics:
|
||||||
self._change_timer.setSingleShot(True)
|
self._change_timer.setSingleShot(True)
|
||||||
self._change_timer.timeout.connect(self._onChangeTimerFinished)
|
self._change_timer.timeout.connect(self._onChangeTimerFinished)
|
||||||
|
|
||||||
|
Preferences.getInstance().addPreference("physics/automatic_push_free", True)
|
||||||
|
|
||||||
def _onSceneChanged(self, source):
|
def _onSceneChanged(self, source):
|
||||||
self._change_timer.start()
|
self._change_timer.start()
|
||||||
|
|
||||||
|
@ -53,16 +58,21 @@ class PlatformPhysics:
|
||||||
self._change_timer.start()
|
self._change_timer.start()
|
||||||
continue
|
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.
|
# 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
|
node._outside_buildarea = True
|
||||||
else:
|
else:
|
||||||
node._outside_buildarea = False
|
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()
|
move_vector = Vector()
|
||||||
if not Float.fuzzyCompare(bbox.bottom, 0.0):
|
if bbox.bottom > 0:
|
||||||
move_vector.setY(-bbox.bottom)
|
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 there is no convex hull for the node, start calculating it and continue.
|
||||||
if not node.getDecorator(ConvexHullDecorator):
|
if not node.getDecorator(ConvexHullDecorator):
|
||||||
|
@ -76,7 +86,7 @@ class PlatformPhysics:
|
||||||
|
|
||||||
elif Selection.isSelected(node):
|
elif Selection.isSelected(node):
|
||||||
pass
|
pass
|
||||||
else:
|
elif Preferences.getInstance().getValue("physics/automatic_push_free"):
|
||||||
# Check for collisions between convex hulls
|
# Check for collisions between convex hulls
|
||||||
for other_node in BreadthFirstIterator(root):
|
for other_node in BreadthFirstIterator(root):
|
||||||
# Ignore root, ourselves and anything that is not a normal SceneNode.
|
# Ignore root, ourselves and anything that is not a normal SceneNode.
|
||||||
|
@ -107,8 +117,10 @@ class PlatformPhysics:
|
||||||
|
|
||||||
move_vector.setX(overlap[0] * 1.1)
|
move_vector.setX(overlap[0] * 1.1)
|
||||||
move_vector.setZ(overlap[1] * 1.1)
|
move_vector.setZ(overlap[1] * 1.1)
|
||||||
convex_hull = node.callDecoration("getConvexHull")
|
convex_hull = node.callDecoration("getConvexHull")
|
||||||
if convex_hull:
|
if convex_hull:
|
||||||
|
if not convex_hull.isValid():
|
||||||
|
return
|
||||||
# Check for collisions between disallowed areas and the object
|
# Check for collisions between disallowed areas and the object
|
||||||
for area in self._build_volume.getDisallowedAreas():
|
for area in self._build_volume.getDisallowedAreas():
|
||||||
overlap = convex_hull.intersectsPolygon(area)
|
overlap = convex_hull.intersectsPolygon(area)
|
||||||
|
|
124
plugins/3MFReader/ThreeMFReader.py
Normal file
124
plugins/3MFReader/ThreeMFReader.py
Normal 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
|
25
plugins/3MFReader/__init__.py
Normal file
25
plugins/3MFReader/__init__.py
Normal 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() }
|
|
@ -17,8 +17,8 @@ class RemovableDriveOutputDevice(OutputDevice):
|
||||||
super().__init__(device_id)
|
super().__init__(device_id)
|
||||||
|
|
||||||
self.setName(device_name)
|
self.setName(device_name)
|
||||||
self.setShortDescription(catalog.i18nc("", "Save to Removable Drive"))
|
self.setShortDescription(catalog.i18nc("@action:button", "Save to Removable Drive"))
|
||||||
self.setDescription(catalog.i18nc("", "Save to Removable Drive {0}").format(device_name))
|
self.setDescription(catalog.i18nc("@info:tooltip", "Save to Removable Drive {0}").format(device_name))
|
||||||
self.setIconName("save_sd")
|
self.setIconName("save_sd")
|
||||||
self.setPriority(1)
|
self.setPriority(1)
|
||||||
|
|
||||||
|
@ -49,7 +49,7 @@ class RemovableDriveOutputDevice(OutputDevice):
|
||||||
job.progress.connect(self._onProgress)
|
job.progress.connect(self._onProgress)
|
||||||
job.finished.connect(self._onFinished)
|
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()
|
message.show()
|
||||||
|
|
||||||
job._message = message
|
job._message = message
|
||||||
|
|
|
@ -22,7 +22,7 @@ UM.Dialog
|
||||||
Column
|
Column
|
||||||
{
|
{
|
||||||
anchors.fill: parent;
|
anchors.fill: parent;
|
||||||
|
|
||||||
Text
|
Text
|
||||||
{
|
{
|
||||||
anchors {
|
anchors {
|
||||||
|
|
|
@ -8,96 +8,156 @@ import time
|
||||||
import queue
|
import queue
|
||||||
import re
|
import re
|
||||||
import functools
|
import functools
|
||||||
|
import os
|
||||||
|
import os.path
|
||||||
|
|
||||||
from UM.Application import Application
|
from UM.Application import Application
|
||||||
from UM.Signal import Signal, SignalEmitter
|
from UM.Signal import Signal, SignalEmitter
|
||||||
from UM.Resources import Resources
|
from UM.Resources import Resources
|
||||||
from UM.Logger import Logger
|
from UM.Logger import Logger
|
||||||
|
from UM.OutputDevice.OutputDevice import OutputDevice
|
||||||
|
from UM.OutputDevice import OutputDeviceError
|
||||||
|
from UM.PluginRegistry import PluginRegistry
|
||||||
|
|
||||||
|
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")
|
||||||
|
|
||||||
class PrinterConnection(SignalEmitter):
|
|
||||||
def __init__(self, serial_port):
|
|
||||||
super().__init__()
|
|
||||||
|
|
||||||
self._serial = None
|
self._serial = None
|
||||||
self._serial_port = serial_port
|
self._serial_port = serial_port
|
||||||
self._error_state = None
|
self._error_state = None
|
||||||
|
|
||||||
self._connect_thread = threading.Thread(target = self._connect)
|
self._connect_thread = threading.Thread(target = self._connect)
|
||||||
self._connect_thread.daemon = True
|
self._connect_thread.daemon = True
|
||||||
|
|
||||||
|
self._end_stop_thread = threading.Thread(target = self._pollEndStop)
|
||||||
|
self._end_stop_thread.deamon = True
|
||||||
|
|
||||||
# Printer is connected
|
# Printer is connected
|
||||||
self._is_connected = False
|
self._is_connected = False
|
||||||
|
|
||||||
# Printer is in the process of connecting
|
# Printer is in the process of connecting
|
||||||
self._is_connecting = False
|
self._is_connecting = False
|
||||||
|
|
||||||
# The baud checking is done by sending a number of m105 commands to the printer and waiting for a readable
|
# 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.
|
# 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
|
self._progress = 0
|
||||||
|
|
||||||
self._listen_thread = threading.Thread(target=self._listen)
|
self._listen_thread = threading.Thread(target=self._listen)
|
||||||
self._listen_thread.daemon = True
|
self._listen_thread.daemon = True
|
||||||
|
|
||||||
self._update_firmware_thread = threading.Thread(target= self._updateFirmware)
|
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()
|
self._heatup_wait_start_time = time.time()
|
||||||
|
|
||||||
## Queue for commands that need to be send. Used when command is sent when a print is active.
|
## Queue for commands that need to be send. Used when command is sent when a print is active.
|
||||||
self._command_queue = queue.Queue()
|
self._command_queue = queue.Queue()
|
||||||
|
|
||||||
self._is_printing = False
|
self._is_printing = False
|
||||||
|
|
||||||
## Set when print is started in order to check running time.
|
## Set when print is started in order to check running time.
|
||||||
self._print_start_time = None
|
self._print_start_time = None
|
||||||
self._print_start_time_100 = None
|
self._print_start_time_100 = None
|
||||||
|
|
||||||
## Keep track where in the provided g-code the print is
|
## Keep track where in the provided g-code the print is
|
||||||
self._gcode_position = 0
|
self._gcode_position = 0
|
||||||
|
|
||||||
# List of gcode lines to be printed
|
# List of gcode lines to be printed
|
||||||
self._gcode = []
|
self._gcode = []
|
||||||
|
|
||||||
# Number of extruders
|
# Number of extruders
|
||||||
self._extruder_count = 1
|
self._extruder_count = 1
|
||||||
|
|
||||||
# Temperatures of all extruders
|
# Temperatures of all extruders
|
||||||
self._extruder_temperatures = [0] * self._extruder_count
|
self._extruder_temperatures = [0] * self._extruder_count
|
||||||
|
|
||||||
# Target temperatures of all extruders
|
# Target temperatures of all extruders
|
||||||
self._target_extruder_temperatures = [0] * self._extruder_count
|
self._target_extruder_temperatures = [0] * self._extruder_count
|
||||||
|
|
||||||
#Target temperature of the bed
|
#Target temperature of the bed
|
||||||
self._target_bed_temperature = 0
|
self._target_bed_temperature = 0
|
||||||
|
|
||||||
# Temperature of the bed
|
# Temperature of the bed
|
||||||
self._bed_temperature = 0
|
self._bed_temperature = 0
|
||||||
|
|
||||||
# Current Z stage location
|
# Current Z stage location
|
||||||
self._current_z = 0
|
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.
|
# 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.
|
# This index is the extruder we requested data from the last time.
|
||||||
self._temperature_requested_extruder_index = 0
|
self._temperature_requested_extruder_index = 0
|
||||||
|
|
||||||
self._updating_firmware = False
|
self._updating_firmware = False
|
||||||
|
|
||||||
self._firmware_file_name = None
|
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
|
# 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):
|
def setNumExtuders(self, num):
|
||||||
self._extruder_count = num
|
self._extruder_count = num
|
||||||
self._extruder_temperatures = [0] * self._extruder_count
|
self._extruder_temperatures = [0] * self._extruder_count
|
||||||
self._target_extruder_temperatures = [0] * self._extruder_count
|
self._target_extruder_temperatures = [0] * self._extruder_count
|
||||||
|
|
||||||
## Is the printer actively printing
|
## Is the printer actively printing
|
||||||
def isPrinting(self):
|
def isPrinting(self):
|
||||||
if not self._is_connected or self._serial is None:
|
if not self._is_connected or self._serial is None:
|
||||||
return False
|
return False
|
||||||
return self._is_printing
|
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.
|
## Start a print based on a g-code.
|
||||||
# \param gcode_list List with gcode (strings).
|
# \param gcode_list List with gcode (strings).
|
||||||
def printGCode(self, gcode_list):
|
def printGCode(self, gcode_list):
|
||||||
|
@ -115,20 +175,20 @@ class PrinterConnection(SignalEmitter):
|
||||||
self._print_start_time_100 = None
|
self._print_start_time_100 = None
|
||||||
self._is_printing = True
|
self._is_printing = True
|
||||||
self._print_start_time = time.time()
|
self._print_start_time = time.time()
|
||||||
|
|
||||||
for i in range(0, 4): #Push first 4 entries before accepting other inputs
|
for i in range(0, 4): #Push first 4 entries before accepting other inputs
|
||||||
self._sendNextGcodeLine()
|
self._sendNextGcodeLine()
|
||||||
|
|
||||||
## Get the serial port string of this connection.
|
## Get the serial port string of this connection.
|
||||||
# \return serial port
|
# \return serial port
|
||||||
def getSerialPort(self):
|
def getSerialPort(self):
|
||||||
return self._serial_port
|
return self._serial_port
|
||||||
|
|
||||||
## Try to connect the serial. This simply starts the thread, which runs _connect.
|
## Try to connect the serial. This simply starts the thread, which runs _connect.
|
||||||
def connect(self):
|
def connect(self):
|
||||||
if not self._updating_firmware and not self._connect_thread.isAlive():
|
if not self._updating_firmware and not self._connect_thread.isAlive():
|
||||||
self._connect_thread.start()
|
self._connect_thread.start()
|
||||||
|
|
||||||
## Private fuction (threaded) that actually uploads the firmware.
|
## Private fuction (threaded) that actually uploads the firmware.
|
||||||
def _updateFirmware(self):
|
def _updateFirmware(self):
|
||||||
if self._is_connecting or self._is_connected:
|
if self._is_connecting or self._is_connected:
|
||||||
|
@ -162,6 +222,8 @@ class PrinterConnection(SignalEmitter):
|
||||||
|
|
||||||
self.setProgress(100, 100)
|
self.setProgress(100, 100)
|
||||||
|
|
||||||
|
self.firmwareUpdateComplete.emit()
|
||||||
|
|
||||||
## Upload new firmware to machine
|
## Upload new firmware to machine
|
||||||
# \param filename full path of firmware file to be uploaded
|
# \param filename full path of firmware file to be uploaded
|
||||||
def updateFirmware(self, file_name):
|
def updateFirmware(self, file_name):
|
||||||
|
@ -169,14 +231,28 @@ class PrinterConnection(SignalEmitter):
|
||||||
self._firmware_file_name = file_name
|
self._firmware_file_name = file_name
|
||||||
self._update_firmware_thread.start()
|
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.
|
## Private connect function run by thread. Can be started by calling connect.
|
||||||
def _connect(self):
|
def _connect(self):
|
||||||
Logger.log("d", "Attempting to connect to %s", self._serial_port)
|
Logger.log("d", "Attempting to connect to %s", self._serial_port)
|
||||||
self._is_connecting = True
|
self._is_connecting = True
|
||||||
programmer = stk500v2.Stk500v2()
|
programmer = stk500v2.Stk500v2()
|
||||||
try:
|
try:
|
||||||
programmer.connect(self._serial_port) # Connect with the serial, if this succeeds, it"s an arduino based usb device.
|
programmer.connect(self._serial_port) # Connect with the serial, if this succeeds, it"s an arduino based usb device.
|
||||||
self._serial = programmer.leaveISP()
|
self._serial = programmer.leaveISP()
|
||||||
except ispBase.IspError as e:
|
except ispBase.IspError as e:
|
||||||
Logger.log("i", "Could not establish connection on %s: %s. Device is not arduino based." %(self._serial_port,str(e)))
|
Logger.log("i", "Could not establish connection on %s: %s. Device is not arduino based." %(self._serial_port,str(e)))
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
|
@ -186,25 +262,23 @@ class PrinterConnection(SignalEmitter):
|
||||||
self._is_connecting = False
|
self._is_connecting = False
|
||||||
Logger.log("i", "Could not establish connection on %s, unknown reasons.", self._serial_port)
|
Logger.log("i", "Could not establish connection on %s, unknown reasons.", self._serial_port)
|
||||||
return
|
return
|
||||||
|
|
||||||
# If the programmer connected, we know its an atmega based version. Not all that usefull, but it does give some debugging information.
|
# 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)
|
for baud_rate in self._getBaudrateList(): # Cycle all baud rates (auto detect)
|
||||||
|
|
||||||
if self._serial is None:
|
if self._serial is None:
|
||||||
try:
|
try:
|
||||||
self._serial = serial.Serial(str(self._serial_port), baud_rate, timeout=3, writeTimeout=10000)
|
self._serial = serial.Serial(str(self._serial_port), baud_rate, timeout = 3, writeTimeout = 10000)
|
||||||
except serial.SerialException:
|
except serial.SerialException:
|
||||||
Logger.log("i", "Could not open port %s" % self._serial_port)
|
Logger.log("i", "Could not open port %s" % self._serial_port)
|
||||||
return
|
return
|
||||||
else:
|
else:
|
||||||
if not self.setBaudRate(baud_rate):
|
if not self.setBaudRate(baud_rate):
|
||||||
continue # Could not set the baud rate, go to the next
|
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
|
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
|
sucesfull_responses = 0
|
||||||
timeout_time = time.time() + 15
|
timeout_time = time.time() + 5
|
||||||
self._serial.write(b"\n")
|
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
|
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():
|
while timeout_time > time.time():
|
||||||
line = self._readline()
|
line = self._readline()
|
||||||
if line is None:
|
if line is None:
|
||||||
|
@ -213,7 +287,6 @@ class PrinterConnection(SignalEmitter):
|
||||||
|
|
||||||
if b"T:" in line:
|
if b"T:" in line:
|
||||||
self._serial.timeout = 0.5
|
self._serial.timeout = 0.5
|
||||||
self._sendCommand("M105")
|
|
||||||
sucesfull_responses += 1
|
sucesfull_responses += 1
|
||||||
if sucesfull_responses >= self._required_responses_auto_baud:
|
if sucesfull_responses >= self._required_responses_auto_baud:
|
||||||
self._serial.timeout = 2 #Reset serial timeout
|
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)
|
Logger.log("i", "Established printer connection on port %s" % self._serial_port)
|
||||||
return
|
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)
|
Logger.log("e", "Baud rate detection for %s failed", self._serial_port)
|
||||||
self.close() # Unable to connect, wrap up.
|
self.close() # Unable to connect, wrap up.
|
||||||
self.setIsConnected(False)
|
self.setIsConnected(False)
|
||||||
|
@ -240,21 +315,12 @@ class PrinterConnection(SignalEmitter):
|
||||||
self.connectionStateChanged.emit(self._serial_port)
|
self.connectionStateChanged.emit(self._serial_port)
|
||||||
if self._is_connected:
|
if self._is_connected:
|
||||||
self._listen_thread.start() #Start listening
|
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:
|
else:
|
||||||
Logger.log("w", "Printer connection state was not changed")
|
Logger.log("w", "Printer connection state was not changed")
|
||||||
|
|
||||||
connectionStateChanged = Signal()
|
connectionStateChanged = Signal()
|
||||||
|
|
||||||
## Close the printer connection
|
## Close the printer connection
|
||||||
def close(self):
|
def close(self):
|
||||||
if self._connect_thread.isAlive():
|
if self._connect_thread.isAlive():
|
||||||
try:
|
try:
|
||||||
|
@ -262,6 +328,9 @@ class PrinterConnection(SignalEmitter):
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
pass # This should work, but it does fail sometimes for some reason
|
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:
|
if self._serial is not None:
|
||||||
self.setIsConnected(False)
|
self.setIsConnected(False)
|
||||||
try:
|
try:
|
||||||
|
@ -269,12 +338,31 @@ class PrinterConnection(SignalEmitter):
|
||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
self._serial.close()
|
self._serial.close()
|
||||||
|
|
||||||
|
self._listen_thread = threading.Thread(target=self._listen)
|
||||||
|
self._listen_thread.daemon = True
|
||||||
self._serial = None
|
self._serial = None
|
||||||
|
|
||||||
def isConnected(self):
|
def isConnected(self):
|
||||||
return self._is_connected
|
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).
|
## Directly send the command, withouth checking connection state (eg; printing).
|
||||||
# \param cmd string with g-code
|
# \param cmd string with g-code
|
||||||
def _sendCommand(self, cmd):
|
def _sendCommand(self, cmd):
|
||||||
|
@ -296,10 +384,9 @@ class PrinterConnection(SignalEmitter):
|
||||||
self._target_bed_temperature = float(re.search("S([0-9]+)", cmd).group(1))
|
self._target_bed_temperature = float(re.search("S([0-9]+)", cmd).group(1))
|
||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
#Logger.log("i","Sending: %s" % (cmd))
|
|
||||||
try:
|
try:
|
||||||
command = (cmd + "\n").encode()
|
command = (cmd + "\n").encode()
|
||||||
#self._serial.write(b"\n")
|
self._serial.write(b"\n")
|
||||||
self._serial.write(command)
|
self._serial.write(command)
|
||||||
except serial.SerialTimeoutException:
|
except serial.SerialTimeoutException:
|
||||||
Logger.log("w","Serial timeout while writing to serial port, trying again.")
|
Logger.log("w","Serial timeout while writing to serial port, trying again.")
|
||||||
|
@ -314,11 +401,26 @@ class PrinterConnection(SignalEmitter):
|
||||||
Logger.log("e","Unexpected error while writing serial port %s" % e)
|
Logger.log("e","Unexpected error while writing serial port %s" % e)
|
||||||
self._setErrorState("Unexpected error while writing serial port %s " % e)
|
self._setErrorState("Unexpected error while writing serial port %s " % e)
|
||||||
self.close()
|
self.close()
|
||||||
|
|
||||||
## Ensure that close gets called when object is destroyed
|
## Ensure that close gets called when object is destroyed
|
||||||
def __del__(self):
|
def __del__(self):
|
||||||
self.close()
|
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.
|
## Send a command to printer.
|
||||||
# \param cmd string with g-code
|
# \param cmd string with g-code
|
||||||
def sendCommand(self, cmd):
|
def sendCommand(self, cmd):
|
||||||
|
@ -326,37 +428,47 @@ class PrinterConnection(SignalEmitter):
|
||||||
self._command_queue.put(cmd)
|
self._command_queue.put(cmd)
|
||||||
elif self.isConnected():
|
elif self.isConnected():
|
||||||
self._sendCommand(cmd)
|
self._sendCommand(cmd)
|
||||||
|
|
||||||
## Set the error state with a message.
|
## Set the error state with a message.
|
||||||
# \param error String with the error message.
|
# \param error String with the error message.
|
||||||
def _setErrorState(self, error):
|
def _setErrorState(self, error):
|
||||||
self._error_state = error
|
self._error_state = error
|
||||||
self.onError.emit(error)
|
self.onError.emit()
|
||||||
|
|
||||||
onError = Signal()
|
|
||||||
|
|
||||||
## Private function to set the temperature of an extruder
|
## Private function to set the temperature of an extruder
|
||||||
# \param index index of the extruder
|
# \param index index of the extruder
|
||||||
# \param temperature recieved temperature
|
# \param temperature recieved temperature
|
||||||
def _setExtruderTemperature(self, index, temperature):
|
def _setExtruderTemperature(self, index, temperature):
|
||||||
try:
|
try:
|
||||||
self._extruder_temperatures[index] = temperature
|
self._extruder_temperatures[index] = temperature
|
||||||
self.onExtruderTemperatureChange.emit(self._serial_port, index, temperature)
|
self.extruderTemperatureChanged.emit()
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
onExtruderTemperatureChange = Signal()
|
|
||||||
|
|
||||||
## Private function to set the temperature of the bed.
|
## Private function to set the temperature of the bed.
|
||||||
# As all printers (as of time of writing) only support a single heated bed,
|
# As all printers (as of time of writing) only support a single heated bed,
|
||||||
# these are not indexed as with extruders.
|
# these are not indexed as with extruders.
|
||||||
def _setBedTemperature(self, temperature):
|
def _setBedTemperature(self, temperature):
|
||||||
self._bed_temperature = 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.
|
## Listen thread function.
|
||||||
def _listen(self):
|
def _listen(self):
|
||||||
Logger.log("i", "Printer connection listen thread started for %s" % self._serial_port)
|
Logger.log("i", "Printer connection listen thread started for %s" % self._serial_port)
|
||||||
|
@ -364,10 +476,18 @@ class PrinterConnection(SignalEmitter):
|
||||||
ok_timeout = time.time()
|
ok_timeout = time.time()
|
||||||
while self._is_connected:
|
while self._is_connected:
|
||||||
line = self._readline()
|
line = self._readline()
|
||||||
|
|
||||||
if line is None:
|
if line is None:
|
||||||
break # None is only returned when something went wrong. Stop listening
|
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:"):
|
if line.startswith(b"Error:"):
|
||||||
# Oh YEAH, consistency.
|
# Oh YEAH, consistency.
|
||||||
# Marlin reports an MIN/MAX temp error as "Error:x\n: Extruder switched off. MAXTEMP triggered !\n"
|
# Marlin reports an MIN/MAX temp error as "Error:x\n: Extruder switched off. MAXTEMP triggered !\n"
|
||||||
|
@ -392,19 +512,14 @@ class PrinterConnection(SignalEmitter):
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
pass
|
pass
|
||||||
#TODO: temperature changed callback
|
#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 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:
|
if line == b"" and time.time() > ok_timeout:
|
||||||
line = b"ok" # Force a timeout (basicly, send next command)
|
line = b"ok" # Force a timeout (basicly, send next command)
|
||||||
|
|
||||||
if b"ok" in line:
|
if b"ok" in line:
|
||||||
ok_timeout = time.time() + 5
|
ok_timeout = time.time() + 5
|
||||||
if not self._command_queue.empty():
|
if not self._command_queue.empty():
|
||||||
|
@ -449,26 +564,25 @@ class PrinterConnection(SignalEmitter):
|
||||||
Logger.log("e", "Unexpected error with printer connection: %s" % e)
|
Logger.log("e", "Unexpected error with printer connection: %s" % e)
|
||||||
self._setErrorState("Unexpected error: %s" %e)
|
self._setErrorState("Unexpected error: %s" %e)
|
||||||
checksum = functools.reduce(lambda x,y: x^y, map(ord, "N%d%s" % (self._gcode_position, line)))
|
checksum = functools.reduce(lambda x,y: x^y, map(ord, "N%d%s" % (self._gcode_position, line)))
|
||||||
|
|
||||||
self._sendCommand("N%d%s*%d" % (self._gcode_position, line, checksum))
|
self._sendCommand("N%d%s*%d" % (self._gcode_position, line, checksum))
|
||||||
self._gcode_position += 1
|
self._gcode_position += 1
|
||||||
self.setProgress(( self._gcode_position / len(self._gcode)) * 100)
|
self.setProgress(( self._gcode_position / len(self._gcode)) * 100)
|
||||||
self.progressChanged.emit(self._progress, self._serial_port)
|
self.progressChanged.emit()
|
||||||
|
|
||||||
progressChanged = Signal()
|
|
||||||
|
|
||||||
## Set the progress of the print.
|
## Set the progress of the print.
|
||||||
# It will be normalized (based on max_progress) to range 0 - 100
|
# It will be normalized (based on max_progress) to range 0 - 100
|
||||||
def setProgress(self, progress, max_progress = 100):
|
def setProgress(self, progress, max_progress = 100):
|
||||||
self._progress = (progress / max_progress) * 100 #Convert to scale of 0-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.
|
## Cancel the current print. Printer connection wil continue to listen.
|
||||||
|
@pyqtSlot()
|
||||||
def cancelPrint(self):
|
def cancelPrint(self):
|
||||||
self._gcode_position = 0
|
self._gcode_position = 0
|
||||||
self.setProgress(0)
|
self.setProgress(0)
|
||||||
self._gcode = []
|
self._gcode = []
|
||||||
|
|
||||||
# Turn of temperatures
|
# Turn of temperatures
|
||||||
self._sendCommand("M140 S0")
|
self._sendCommand("M140 S0")
|
||||||
self._sendCommand("M104 S0")
|
self._sendCommand("M104 S0")
|
||||||
|
@ -477,7 +591,7 @@ class PrinterConnection(SignalEmitter):
|
||||||
## Check if the process did not encounter an error yet.
|
## Check if the process did not encounter an error yet.
|
||||||
def hasError(self):
|
def hasError(self):
|
||||||
return self._error_state != None
|
return self._error_state != None
|
||||||
|
|
||||||
## private read line used by printer connection to listen for data on serial port.
|
## private read line used by printer connection to listen for data on serial port.
|
||||||
def _readline(self):
|
def _readline(self):
|
||||||
if self._serial is None:
|
if self._serial is None:
|
||||||
|
@ -490,9 +604,16 @@ class PrinterConnection(SignalEmitter):
|
||||||
self.close()
|
self.close()
|
||||||
return None
|
return None
|
||||||
return ret
|
return ret
|
||||||
|
|
||||||
## Create a list of baud rates at which we can communicate.
|
## Create a list of baud rates at which we can communicate.
|
||||||
# \return list of int
|
# \return list of int
|
||||||
def _getBaudrateList(self):
|
def _getBaudrateList(self):
|
||||||
ret = [250000, 230400, 115200, 57600, 38400, 19200, 9600]
|
ret = [250000, 230400, 115200, 57600, 38400, 19200, 9600]
|
||||||
return ret
|
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()
|
||||||
|
|
|
@ -9,6 +9,8 @@ from UM.Scene.SceneNode import SceneNode
|
||||||
from UM.Resources import Resources
|
from UM.Resources import Resources
|
||||||
from UM.Logger import Logger
|
from UM.Logger import Logger
|
||||||
from UM.PluginRegistry import PluginRegistry
|
from UM.PluginRegistry import PluginRegistry
|
||||||
|
from UM.OutputDevice.OutputDevicePlugin import OutputDevicePlugin
|
||||||
|
from UM.Qt.ListModel import ListModel
|
||||||
|
|
||||||
import threading
|
import threading
|
||||||
import platform
|
import platform
|
||||||
|
@ -26,34 +28,48 @@ from PyQt5.QtCore import QUrl, QObject, pyqtSlot, pyqtProperty, pyqtSignal, Qt
|
||||||
from UM.i18n import i18nCatalog
|
from UM.i18n import i18nCatalog
|
||||||
i18n_catalog = i18nCatalog("cura")
|
i18n_catalog = i18nCatalog("cura")
|
||||||
|
|
||||||
class USBPrinterManager(QObject, SignalEmitter, Extension):
|
class USBPrinterManager(QObject, SignalEmitter, OutputDevicePlugin, Extension):
|
||||||
def __init__(self, parent = None):
|
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._serial_port_list = []
|
||||||
self._printer_connections = []
|
self._printer_connections = {}
|
||||||
self._check_ports_thread = threading.Thread(target = self._updateConnectionList)
|
self._printer_connections_model = None
|
||||||
self._check_ports_thread.daemon = True
|
self._update_thread = threading.Thread(target = self._updateThread)
|
||||||
self._check_ports_thread.start()
|
self._update_thread.setDaemon(True)
|
||||||
|
|
||||||
self._progress = 0
|
|
||||||
|
|
||||||
self._control_view = None
|
self._check_updates = True
|
||||||
self._firmware_view = None
|
self._firmware_view = None
|
||||||
self._extruder_temp = 0
|
|
||||||
self._bed_temp = 0
|
|
||||||
self._error_message = ""
|
|
||||||
|
|
||||||
## Add menu item to top menu of the application.
|
## Add menu item to top menu of the application.
|
||||||
self.setMenuName("Firmware")
|
self.setMenuName("Firmware")
|
||||||
self.addMenuItem(i18n_catalog.i18n("Update Firmware"), self.updateAllFirmware)
|
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"])
|
addConnectionSignal = Signal()
|
||||||
pyqtExtruderTemperature = pyqtSignal(float, arguments = ["amount"])
|
printerConnectionStateChanged = pyqtSignal()
|
||||||
pyqtBedTemperature = pyqtSignal(float, arguments = ["amount"])
|
|
||||||
|
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.
|
## Show firmware interface.
|
||||||
# This will create the view if its not already created.
|
# This will create the view if its not already created.
|
||||||
def spawnFirmwareInterface(self, serial_port):
|
def spawnFirmwareInterface(self, serial_port):
|
||||||
|
@ -66,79 +82,37 @@ class USBPrinterManager(QObject, SignalEmitter, Extension):
|
||||||
self._firmware_view = component.create(self._firmware_context)
|
self._firmware_view = component.create(self._firmware_context)
|
||||||
|
|
||||||
self._firmware_view.show()
|
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):
|
def updateAllFirmware(self):
|
||||||
self.spawnFirmwareInterface("")
|
self.spawnFirmwareInterface("")
|
||||||
for printer_connection in self._printer_connections:
|
for printer_connection in self._printer_connections:
|
||||||
try:
|
try:
|
||||||
printer_connection.updateFirmware(Resources.getPath(Resources.FirmwareLocation, self._getDefaultFirmwareName()))
|
self._printer_connections[printer_connection].updateFirmware(Resources.getPath(Resources.FirmwareLocation, self._getDefaultFirmwareName()))
|
||||||
except FileNotFoundError:
|
except FileNotFoundError:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
@pyqtSlot(str, result = bool)
|
||||||
def updateFirmwareBySerial(self, serial_port):
|
def updateFirmwareBySerial(self, serial_port):
|
||||||
printer_connection = self.getConnectionByPort(serial_port)
|
if serial_port in self._printer_connections:
|
||||||
if printer_connection is not None:
|
self.spawnFirmwareInterface(self._printer_connections[serial_port].getSerialPort())
|
||||||
self.spawnFirmwareInterface(printer_connection.getSerialPort())
|
try:
|
||||||
printer_connection.updateFirmware(Resources.getPath(Resources.FirmwareLocation, self._getDefaultFirmwareName()))
|
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):
|
def _getDefaultFirmwareName(self):
|
||||||
machine_type = Application.getInstance().getActiveMachine().getTypeID()
|
machine_type = Application.getInstance().getActiveMachine().getTypeID()
|
||||||
firmware_name = ""
|
firmware_name = ""
|
||||||
|
@ -160,120 +134,46 @@ class USBPrinterManager(QObject, SignalEmitter, Extension):
|
||||||
return "MarlinUltimaker2.hex"
|
return "MarlinUltimaker2.hex"
|
||||||
|
|
||||||
##TODO: Add check for multiple extruders
|
##TODO: Add check for multiple extruders
|
||||||
|
|
||||||
if firmware_name != "":
|
if firmware_name != "":
|
||||||
firmware_name += ".hex"
|
firmware_name += ".hex"
|
||||||
return firmware_name
|
return firmware_name
|
||||||
|
|
||||||
## Callback for extruder temperature change
|
def _addRemovePorts(self, serial_ports):
|
||||||
def onExtruderTemperature(self, serial_port, index, temperature):
|
# First, find and add all new or changed keys
|
||||||
self._extruder_temp = temperature
|
for serial_port in list(serial_ports):
|
||||||
self.pyqtExtruderTemperature.emit(temperature)
|
if serial_port not in self._serial_port_list:
|
||||||
|
self.addConnectionSignal.emit(serial_port) #Hack to ensure its created in main thread
|
||||||
## Callback for bed temperature change
|
continue
|
||||||
def onBedTemperature(self, serial_port,temperature):
|
self._serial_port_list = list(serial_ports)
|
||||||
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.
|
## Because the model needs to be created in the same thread as the QMLEngine, we use a signal.
|
||||||
def connectAllConnections(self):
|
def addConnection(self, serial_port):
|
||||||
|
connection = PrinterConnection.PrinterConnection(serial_port)
|
||||||
|
connection.connect()
|
||||||
|
connection.connectionStateChanged.connect(self._onPrinterConnectionStateChanged)
|
||||||
|
self._printer_connections[serial_port] = connection
|
||||||
|
|
||||||
|
def _onPrinterConnectionStateChanged(self, serial_port):
|
||||||
|
if self._printer_connections[serial_port].isConnected():
|
||||||
|
self.getOutputDeviceManager().addOutputDevice(self._printer_connections[serial_port])
|
||||||
|
else:
|
||||||
|
self.getOutputDeviceManager().removeOutputDevice(serial_port)
|
||||||
|
self.printerConnectionStateChanged.emit()
|
||||||
|
|
||||||
|
@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:
|
for connection in self._printer_connections:
|
||||||
connection.connect()
|
if self._printer_connections[connection].isConnected():
|
||||||
|
self._printer_connections_model.appendItem({"name":connection, "printer": self._printer_connections[connection]})
|
||||||
## Send gcode to printer and start printing
|
return self._printer_connections_model
|
||||||
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
|
|
||||||
else:
|
|
||||||
return False
|
|
||||||
|
|
||||||
## 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
|
|
||||||
|
|
||||||
## Create a list of serial ports on the system.
|
## Create a list of serial ports on the system.
|
||||||
# \param only_list_usb If true, only usb ports are listed
|
# \param only_list_usb If true, only usb ports are listed
|
||||||
def getSerialPortList(self,only_list_usb=False):
|
def getSerialPortList(self, only_list_usb = False):
|
||||||
base_list = []
|
base_list = []
|
||||||
if platform.system() == "Windows":
|
if platform.system() == "Windows":
|
||||||
import winreg
|
import winreg
|
||||||
|
@ -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
|
base_list = filter(lambda s: "Bluetooth" not in s, base_list) # Filter because mac sometimes puts them in the list
|
||||||
else:
|
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/*")
|
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):
|
_instance = None
|
||||||
for connection in self._printer_connections:
|
|
||||||
connection.close()
|
|
|
@ -2,7 +2,7 @@
|
||||||
# Cura is released under the terms of the AGPLv3 or higher.
|
# Cura is released under the terms of the AGPLv3 or higher.
|
||||||
|
|
||||||
from . import USBPrinterManager
|
from . import USBPrinterManager
|
||||||
|
from PyQt5.QtQml import qmlRegisterType, qmlRegisterSingletonType
|
||||||
from UM.i18n import i18nCatalog
|
from UM.i18n import i18nCatalog
|
||||||
i18n_catalog = i18nCatalog("cura")
|
i18n_catalog = i18nCatalog("cura")
|
||||||
|
|
||||||
|
@ -13,9 +13,11 @@ def getMetaData():
|
||||||
"name": "USB printing",
|
"name": "USB printing",
|
||||||
"author": "Ultimaker",
|
"author": "Ultimaker",
|
||||||
"version": "1.0",
|
"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")
|
"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):
|
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() }
|
||||||
|
|
BIN
resources/images/MakerStarterbackplate.png
Normal file
BIN
resources/images/MakerStarterbackplate.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 13 KiB |
File diff suppressed because it is too large
Load diff
|
@ -2,7 +2,7 @@
|
||||||
"id": "grr_neo",
|
"id": "grr_neo",
|
||||||
"version": 1,
|
"version": 1,
|
||||||
"name": "German RepRap Neo",
|
"name": "German RepRap Neo",
|
||||||
"manufacturer": "German RepRap",
|
"manufacturer": "Other",
|
||||||
"author": "other",
|
"author": "other",
|
||||||
"icon": "icon_ultimaker.png",
|
"icon": "icon_ultimaker.png",
|
||||||
"platform": "grr_neo_platform.stl",
|
"platform": "grr_neo_platform.stl",
|
||||||
|
@ -21,8 +21,6 @@
|
||||||
"machine_head_shape_max_x": { "default": 18 },
|
"machine_head_shape_max_x": { "default": 18 },
|
||||||
"machine_head_shape_max_y": { "default": 35 },
|
"machine_head_shape_max_y": { "default": 35 },
|
||||||
"machine_nozzle_gantry_distance": { "default": 55 },
|
"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_gcode_flavor": { "default": "RepRap (Marlin/Sprinter)" },
|
||||||
|
|
||||||
"machine_start_gcode": {
|
"machine_start_gcode": {
|
||||||
|
@ -33,13 +31,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
"categories": {
|
"overrides": {
|
||||||
"material": {
|
"material_bed_temperature": { "visible": false }
|
||||||
"settings": {
|
|
||||||
"material_bed_temperature": {
|
|
||||||
"visible": false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
|
|
||||||
"machine_settings": {
|
"machine_settings": {
|
||||||
"machine_start_gcode": {
|
"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": {
|
"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 --"
|
"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]
|
"default": [0.0, 100.0, 0.0]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"categories": {
|
|
||||||
"layer_height": {
|
"overrides": {
|
||||||
"settings": {
|
"layer_height": { "default": 0.2 },
|
||||||
"layer_height": {
|
"layer_height_0": { "default": 0.2, "visible": true },
|
||||||
"default": 0.2
|
"shell_thickness": { "default": 1.2 },
|
||||||
},
|
"wall_thickness": { "default": 1.2, "visible": false },
|
||||||
"layer_height_0": {
|
"top_bottom_thickness": { "default": 0.8, "visible": false },
|
||||||
"default": 0.2,
|
"bottom_thickness": { "default": 0.4, "visible": false },
|
||||||
"visible": true
|
"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 },
|
||||||
"shell": {
|
"speed_infill": { "default": 40.0, "visible": false },
|
||||||
"settings": {
|
"speed_wall": { "default":35.0, "visible": false },
|
||||||
"shell_thickness": {
|
"speed_wall_0": { "default": 35.0, "visible": false },
|
||||||
"default": 1.2,
|
"speed_wall_x": { "default": 35.0, "visible": false },
|
||||||
"children": {
|
"speed_topbottom": { "default": 35.0, "visible": false },
|
||||||
"wall_thickness": {
|
"speed_support": { "default": 35.0, "visible": false },
|
||||||
"default": 1.2,
|
"speed_travel": { "default": 110.0 },
|
||||||
"visible": false
|
"speed_layer_0": { "default": 20.0, "visible": false },
|
||||||
},
|
"retraction_speed": { "default": 30.0, "visible": true },
|
||||||
"top_bottom_thickness": {
|
"retraction_retract_speed": { "default": 30.0, "visible": true },
|
||||||
"default": 0.8,
|
"retraction_prime_speed": { "default": 30.0, "visible": true },
|
||||||
"visible": false,
|
"retraction_amount": { "default": 2.0, "visible": true },
|
||||||
"children": {
|
"retraction_hop": { "default": 0.75, "visible": false },
|
||||||
"bottom_thickness": {
|
"skirt_minimal_length": { "default": 150 },
|
||||||
"default": 0.4,
|
"raft_base_line_width": { "default": 0.7 },
|
||||||
"visible": false
|
"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 }
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"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
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
|
|
||||||
"machine_settings": {
|
"machine_settings": {
|
||||||
"machine_start_gcode": {
|
"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": {
|
"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 --"
|
"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]
|
"default": [0.0, 100.0, 0.0]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"categories": {
|
|
||||||
"layer_height": {
|
"overrides": {
|
||||||
"settings": {
|
"layer_height": { "default": 0.2 },
|
||||||
"layer_height": {
|
"layer_height_0": { "default": 0.2, "visible": true },
|
||||||
"default": 0.2
|
"shell_thickness": { "default": 1.2 },
|
||||||
},
|
"wall_thickness": { "default": 1.2, "visible": false },
|
||||||
"layer_height_0": {
|
"top_bottom_thickness": { "default": 0.8, "visible": false },
|
||||||
"default": 0.2,
|
"bottom_thickness": { "default": 0.4, "visible": false },
|
||||||
"visible": true
|
"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 },
|
||||||
"shell": {
|
"speed_infill": { "default": 40.0, "visible": false },
|
||||||
"settings": {
|
"speed_wall": { "default":35.0, "visible": false },
|
||||||
"shell_thickness": {
|
"speed_wall_0": { "default": 35.0, "visible": false },
|
||||||
"default": 1.2,
|
"speed_wall_x": { "default": 35.0, "visible": false },
|
||||||
"children": {
|
"speed_topbottom": { "default": 35.0, "visible": false },
|
||||||
"wall_thickness": {
|
"speed_support": { "default": 35.0, "visible": false },
|
||||||
"default": 1.2,
|
"speed_travel": { "default": 110.0 },
|
||||||
"visible": false
|
"speed_layer_0": { "default": 20.0, "visible": false },
|
||||||
},
|
"retraction_speed": { "default": 30.0, "visible": true },
|
||||||
"top_bottom_thickness": {
|
"retraction_retract_speed": { "default": 30.0, "visible": true },
|
||||||
"default": 0.8,
|
"retraction_prime_speed": { "default": 30.0, "visible": true },
|
||||||
"visible": false,
|
"retraction_amount": { "default": 2.0, "visible": true },
|
||||||
"children": {
|
"retraction_hop": { "default": 0.75, "visible": false },
|
||||||
"bottom_thickness": {
|
"skirt_minimal_length": { "default": 150 },
|
||||||
"default": 0.4,
|
"raft_base_line_width": { "default": 0.7 },
|
||||||
"visible": false
|
"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 }
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"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
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,8 +20,6 @@
|
||||||
"machine_head_shape_max_x": { "default": 18 },
|
"machine_head_shape_max_x": { "default": 18 },
|
||||||
"machine_head_shape_max_y": { "default": 35 },
|
"machine_head_shape_max_y": { "default": 35 },
|
||||||
"machine_nozzle_gantry_distance": { "default": 55 },
|
"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_gcode_flavor": { "default": "RepRap (Marlin/Sprinter)" },
|
||||||
|
|
||||||
"machine_start_gcode": {
|
"machine_start_gcode": {
|
||||||
|
@ -32,13 +30,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
"categories": {
|
"overrides": {
|
||||||
"material": {
|
"material_bed_temperature": { "visible": true }
|
||||||
"settings": {
|
|
||||||
"material_bed_temperature": {
|
|
||||||
"visible": true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,6 +10,35 @@
|
||||||
|
|
||||||
"inherits": "fdmprinter.json",
|
"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_settings": {
|
||||||
"machine_start_gcode" : { "default": "" },
|
"machine_start_gcode" : { "default": "" },
|
||||||
"machine_end_gcode" : { "default": "" },
|
"machine_end_gcode" : { "default": "" },
|
||||||
|
@ -18,15 +47,31 @@
|
||||||
"machine_height": { "default": 205 },
|
"machine_height": { "default": 205 },
|
||||||
"machine_heated_bed": { "default": true },
|
"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_center_is_zero": { "default": false },
|
||||||
"machine_nozzle_size": { "default": 0.4 },
|
"machine_nozzle_size": { "default": 0.4 },
|
||||||
"machine_head_shape_min_x": { "default": 40 },
|
"gantry_height": { "default": 55 },
|
||||||
"machine_head_shape_min_y": { "default": 10 },
|
"machine_use_extruder_offset_to_offset_coords": { "default": true },
|
||||||
"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 },
|
|
||||||
"machine_gcode_flavor": { "default": "UltiGCode" },
|
"machine_gcode_flavor": { "default": "UltiGCode" },
|
||||||
"machine_disallowed_areas": { "default": [
|
"machine_disallowed_areas": { "default": [
|
||||||
[[-115.0, 112.5], [ -82.0, 112.5], [ -84.0, 104.5], [-115.0, 104.5]],
|
[[-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 }
|
"machine_nozzle_expansion_angle": { "default": 45 }
|
||||||
},
|
},
|
||||||
|
|
||||||
"categories": {
|
"overrides": {
|
||||||
"material": {
|
"material_print_temperature": { "visible": false },
|
||||||
"settings": {
|
"material_bed_temperature": { "visible": false },
|
||||||
"material_print_temperature": {
|
"material_diameter": { "visible": false },
|
||||||
"visible": false
|
"material_flow": { "visible": false }
|
||||||
},
|
|
||||||
"material_bed_temperature": {
|
|
||||||
"visible": false
|
|
||||||
},
|
|
||||||
"material_diameter": {
|
|
||||||
"visible": false
|
|
||||||
},
|
|
||||||
"material_flow": {
|
|
||||||
"visible": false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,36 +16,74 @@
|
||||||
{"page": "Bedleveling", "title": "Bedleveling Wizard"}
|
{"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_settings": {
|
||||||
"machine_width": { "default": 205 },
|
"machine_width": { "default": 205 },
|
||||||
"machine_height": { "default": 200 },
|
"machine_height": { "default": 200 },
|
||||||
"machine_depth": { "default": 205 },
|
"machine_depth": { "default": 205 },
|
||||||
"machine_center_is_zero": { "default": false },
|
"machine_center_is_zero": { "default": false },
|
||||||
"machine_nozzle_size": { "default": 0.4 },
|
"machine_nozzle_size": { "default": 0.4 },
|
||||||
"machine_head_shape_min_x": { "default": 75 },
|
"machine_head_with_fans_polygon":
|
||||||
"machine_head_shape_min_y": { "default": 18 },
|
{
|
||||||
"machine_head_shape_max_x": { "default": 18 },
|
"default": [
|
||||||
"machine_head_shape_max_y": { "default": 35 },
|
[
|
||||||
"machine_nozzle_gantry_distance": { "default": 55 },
|
-75,
|
||||||
"machine_nozzle_offset_x_1": { "default": 18.0 },
|
35
|
||||||
"machine_nozzle_offset_y_1": { "default": 0.0 },
|
],
|
||||||
|
[
|
||||||
|
-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_gcode_flavor": { "default": "RepRap (Marlin/Sprinter)" },
|
||||||
|
|
||||||
"machine_start_gcode": {
|
"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": {
|
"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"
|
"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": {
|
"overrides": {
|
||||||
"material": {
|
"material_bed_temperature": { "visible": false }
|
||||||
"settings": {
|
|
||||||
"material_bed_temperature": {
|
|
||||||
"visible": false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
|
|
||||||
"machine_settings": {
|
"machine_settings": {
|
||||||
"machine_start_gcode": {
|
"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": {
|
"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 --"
|
"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]
|
"default": [0, -145, -38]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"categories": {
|
"overrides": {
|
||||||
"layer_height": {
|
"layer_height": { "default": 0.2 },
|
||||||
"settings": {
|
"layer_height_0": { "default": 0.2, "visible": true },
|
||||||
"layer_height": {
|
"shell_thickness": { "default": 1.2},
|
||||||
"default": 0.2
|
"wall_thickness": { "default": 1.2, "visible": false },
|
||||||
},
|
"top_bottom_thickness": { "default": 0.8, "visible": false},
|
||||||
"layer_height_0": {
|
"bottom_thickness": { "default": 0.4, "visible": false },
|
||||||
"default": 0.2,
|
"material_print_temperature": { "default": 220, "visible": true },
|
||||||
"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 },
|
||||||
"shell": {
|
"speed_wall": { "default":35.0, "visible": false},
|
||||||
"settings": {
|
"speed_wall_0": { "default": 35.0, "visible": false },
|
||||||
"shell_thickness": {
|
"speed_wall_x": { "default": 35.0, "visible": false },
|
||||||
"default": 1.2,
|
"speed_topbottom": { "default": 35.0, "visible": false },
|
||||||
"children": {
|
"speed_support": { "default": 35.0, "visible": false },
|
||||||
"wall_thickness": {
|
"speed_travel": { "default": 120.0 },
|
||||||
"default": 1.2,
|
"speed_layer_0": { "default": 20.0, "visible": false },
|
||||||
"visible": false
|
"retraction_speed": { "default": 30.0, "visible": true},
|
||||||
},
|
"retraction_retract_speed": { "default": 30.0, "visible": true },
|
||||||
"top_bottom_thickness": {
|
"retraction_prime_speed": { "default": 30.0, "visible": true },
|
||||||
"default": 0.8,
|
"retraction_amount": { "default": 2.0, "visible": true },
|
||||||
"visible": false,
|
"retraction_hop": { "default": 0.75, "visible": false },
|
||||||
"children": {
|
"skirt_minimal_length": { "default": 150 },
|
||||||
"bottom_thickness": {
|
"raft_base_line_width": { "default": 0.7 },
|
||||||
"default": 0.4,
|
"raft_interface_thickness": { "default": 0.2 },
|
||||||
"visible": false
|
"support_enable": { "default": true },
|
||||||
}
|
"support_z_distance": { "default": 0.2, "visible": false },
|
||||||
}
|
"support_infill_rate": { "default": 10, "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
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
BIN
resources/meshes/makerstarter_platform.stl
Normal file
BIN
resources/meshes/makerstarter_platform.stl
Normal file
Binary file not shown.
BIN
resources/meshes/rigidbot_platform.stl
Normal file
BIN
resources/meshes/rigidbot_platform.stl
Normal file
Binary file not shown.
BIN
resources/meshes/rigidbotbig_platform.stl
Normal file
BIN
resources/meshes/rigidbotbig_platform.stl
Normal file
Binary file not shown.
|
@ -40,10 +40,18 @@ Item {
|
||||||
property alias reportBug: reportBugAction;
|
property alias reportBug: reportBugAction;
|
||||||
property alias about: aboutAction;
|
property alias about: aboutAction;
|
||||||
|
|
||||||
|
property alias toggleFullScreen: toggleFullScreenAction;
|
||||||
|
|
||||||
|
Action
|
||||||
|
{
|
||||||
|
id:toggleFullScreenAction
|
||||||
|
shortcut: StandardKey.FullScreen;
|
||||||
|
}
|
||||||
|
|
||||||
Action {
|
Action {
|
||||||
id: undoAction;
|
id: undoAction;
|
||||||
//: Undo action
|
//: Undo action
|
||||||
text: qsTr("&Undo");
|
text: qsTr("Undo");
|
||||||
iconName: "edit-undo";
|
iconName: "edit-undo";
|
||||||
shortcut: StandardKey.Undo;
|
shortcut: StandardKey.Undo;
|
||||||
}
|
}
|
||||||
|
@ -51,7 +59,7 @@ Item {
|
||||||
Action {
|
Action {
|
||||||
id: redoAction;
|
id: redoAction;
|
||||||
//: Redo action
|
//: Redo action
|
||||||
text: qsTr("&Redo");
|
text: qsTr("Redo");
|
||||||
iconName: "edit-redo";
|
iconName: "edit-redo";
|
||||||
shortcut: StandardKey.Redo;
|
shortcut: StandardKey.Redo;
|
||||||
}
|
}
|
||||||
|
@ -59,7 +67,7 @@ Item {
|
||||||
Action {
|
Action {
|
||||||
id: quitAction;
|
id: quitAction;
|
||||||
//: Quit action
|
//: Quit action
|
||||||
text: qsTr("&Quit");
|
text: qsTr("Quit");
|
||||||
iconName: "application-exit";
|
iconName: "application-exit";
|
||||||
shortcut: StandardKey.Quit;
|
shortcut: StandardKey.Quit;
|
||||||
}
|
}
|
||||||
|
@ -67,20 +75,20 @@ Item {
|
||||||
Action {
|
Action {
|
||||||
id: preferencesAction;
|
id: preferencesAction;
|
||||||
//: Preferences action
|
//: Preferences action
|
||||||
text: qsTr("&Preferences...");
|
text: qsTr("Preferences...");
|
||||||
iconName: "configure";
|
iconName: "configure";
|
||||||
}
|
}
|
||||||
|
|
||||||
Action {
|
Action {
|
||||||
id: addMachineAction;
|
id: addMachineAction;
|
||||||
//: Add Printer action
|
//: Add Printer action
|
||||||
text: qsTr("&Add Printer...");
|
text: qsTr("Add Printer...");
|
||||||
}
|
}
|
||||||
|
|
||||||
Action {
|
Action {
|
||||||
id: settingsAction;
|
id: settingsAction;
|
||||||
//: Configure Printers action
|
//: Configure Printers action
|
||||||
text: qsTr("&Configure Printers");
|
text: qsTr("Configure Printers");
|
||||||
iconName: "configure";
|
iconName: "configure";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -102,7 +110,7 @@ Item {
|
||||||
Action {
|
Action {
|
||||||
id: aboutAction;
|
id: aboutAction;
|
||||||
//: About action
|
//: About action
|
||||||
text: qsTr("&About...");
|
text: qsTr("About...");
|
||||||
iconName: "help-about";
|
iconName: "help-about";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -119,6 +127,7 @@ Item {
|
||||||
//: Delete object action
|
//: Delete object action
|
||||||
text: qsTr("Delete Object");
|
text: qsTr("Delete Object");
|
||||||
iconName: "edit-delete";
|
iconName: "edit-delete";
|
||||||
|
shortcut: StandardKey.Backspace;
|
||||||
}
|
}
|
||||||
|
|
||||||
Action {
|
Action {
|
||||||
|
@ -126,7 +135,7 @@ Item {
|
||||||
//: Center object action
|
//: Center object action
|
||||||
text: qsTr("Center Object on Platform");
|
text: qsTr("Center Object on Platform");
|
||||||
}
|
}
|
||||||
|
|
||||||
Action
|
Action
|
||||||
{
|
{
|
||||||
id: groupObjectsAction
|
id: groupObjectsAction
|
||||||
|
@ -189,7 +198,7 @@ Item {
|
||||||
Action {
|
Action {
|
||||||
id: openAction;
|
id: openAction;
|
||||||
//: Open file action
|
//: Open file action
|
||||||
text: qsTr("&Open...");
|
text: qsTr("Load file");
|
||||||
iconName: "document-open";
|
iconName: "document-open";
|
||||||
shortcut: StandardKey.Open;
|
shortcut: StandardKey.Open;
|
||||||
}
|
}
|
||||||
|
@ -197,7 +206,7 @@ Item {
|
||||||
Action {
|
Action {
|
||||||
id: saveAction;
|
id: saveAction;
|
||||||
//: Save file action
|
//: Save file action
|
||||||
text: qsTr("&Save...");
|
text: qsTr("Save...");
|
||||||
iconName: "document-save";
|
iconName: "document-save";
|
||||||
shortcut: StandardKey.Save;
|
shortcut: StandardKey.Save;
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,9 +8,19 @@ import QtQuick.Window 2.1
|
||||||
|
|
||||||
import UM 1.0 as UM
|
import UM 1.0 as UM
|
||||||
|
|
||||||
UM.Wizard{
|
UM.Wizard
|
||||||
id: base
|
{
|
||||||
|
//: 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
|
property bool printer: true
|
||||||
file: "ultimaker2.json"
|
|
||||||
firstRun: printer ? false : true
|
firstRun: printer ? false : true
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,7 +12,6 @@ import UM 1.1 as UM
|
||||||
UM.MainWindow {
|
UM.MainWindow {
|
||||||
id: base
|
id: base
|
||||||
visible: true
|
visible: true
|
||||||
|
|
||||||
//: Cura application window title
|
//: Cura application window title
|
||||||
title: qsTr("Cura");
|
title: qsTr("Cura");
|
||||||
|
|
||||||
|
@ -229,10 +228,8 @@ UM.MainWindow {
|
||||||
|
|
||||||
UM.MessageStack {
|
UM.MessageStack {
|
||||||
anchors {
|
anchors {
|
||||||
left: toolbar.right;
|
horizontalCenter: parent.horizontalCenter
|
||||||
leftMargin: UM.Theme.sizes.window_margin.width;
|
horizontalCenterOffset: -(UM.Theme.sizes.logo.width/ 2)
|
||||||
right: sidebar.left;
|
|
||||||
rightMargin: UM.Theme.sizes.window_margin.width;
|
|
||||||
top: parent.verticalCenter;
|
top: parent.verticalCenter;
|
||||||
bottom: parent.bottom;
|
bottom: parent.bottom;
|
||||||
}
|
}
|
||||||
|
@ -259,25 +256,25 @@ UM.MainWindow {
|
||||||
|
|
||||||
Button {
|
Button {
|
||||||
id: openFileButton;
|
id: openFileButton;
|
||||||
|
//style: UM.Backend.progress < 0 ? UM.Theme.styles.open_file_button : UM.Theme.styles.tool_button;
|
||||||
iconSource: UM.Theme.icons.open;
|
style: UM.Theme.styles.open_file_button
|
||||||
style: UM.Backend.progress < 0 ? UM.Theme.styles.open_file_button : UM.Theme.styles.tool_button;
|
|
||||||
tooltip: '';
|
tooltip: '';
|
||||||
anchors {
|
anchors {
|
||||||
top: parent.top;
|
top: parent.top;
|
||||||
topMargin: UM.Theme.sizes.window_margin.height;
|
topMargin: UM.Theme.sizes.loadfile_margin.height
|
||||||
left: parent.left;
|
left: parent.left;
|
||||||
leftMargin: UM.Theme.sizes.window_margin.width;
|
leftMargin: UM.Theme.sizes.loadfile_margin.width
|
||||||
}
|
}
|
||||||
|
|
||||||
action: actions.open;
|
action: actions.open;
|
||||||
}
|
}
|
||||||
|
|
||||||
Image {
|
Image {
|
||||||
|
id: logo
|
||||||
anchors {
|
anchors {
|
||||||
verticalCenter: openFileButton.verticalCenter;
|
left: parent.left
|
||||||
left: openFileButton.right;
|
leftMargin: UM.Theme.sizes.default_margin.width;
|
||||||
leftMargin: UM.Theme.sizes.window_margin.width;
|
bottom: parent.bottom
|
||||||
|
bottomMargin: UM.Theme.sizes.default_margin.height;
|
||||||
}
|
}
|
||||||
|
|
||||||
source: UM.Theme.images.logo;
|
source: UM.Theme.images.logo;
|
||||||
|
@ -289,13 +286,12 @@ UM.MainWindow {
|
||||||
}
|
}
|
||||||
|
|
||||||
Button {
|
Button {
|
||||||
|
id: viewModeButton
|
||||||
anchors {
|
anchors {
|
||||||
top: parent.top;
|
top: parent.top;
|
||||||
topMargin: UM.Theme.sizes.window_margin.height;
|
|
||||||
right: sidebar.left;
|
right: sidebar.left;
|
||||||
rightMargin: UM.Theme.sizes.window_margin.width;
|
rightMargin: UM.Theme.sizes.window_margin.width;
|
||||||
}
|
}
|
||||||
id: viewModeButton
|
|
||||||
//: View Mode toolbar button
|
//: View Mode toolbar button
|
||||||
text: qsTr("View Mode");
|
text: qsTr("View Mode");
|
||||||
iconSource: UM.Theme.icons.viewmode;
|
iconSource: UM.Theme.icons.viewmode;
|
||||||
|
@ -325,10 +321,9 @@ UM.MainWindow {
|
||||||
id: toolbar;
|
id: toolbar;
|
||||||
|
|
||||||
anchors {
|
anchors {
|
||||||
left: parent.left;
|
horizontalCenter: parent.horizontalCenter
|
||||||
leftMargin: UM.Theme.sizes.window_margin.width;
|
horizontalCenterOffset: -(UM.Theme.sizes.panel.width / 2)
|
||||||
bottom: parent.bottom;
|
top: parent.top;
|
||||||
bottomMargin: UM.Theme.sizes.window_margin.height;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -366,8 +361,15 @@ UM.MainWindow {
|
||||||
id: preferences
|
id: preferences
|
||||||
|
|
||||||
Component.onCompleted: {
|
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
|
//: View preferences page title
|
||||||
insertPage(1, qsTr("View"), "view-preview", Qt.resolvedUrl("./ViewPage.qml"));
|
insertPage(1, qsTr("View"), "view-preview", Qt.resolvedUrl("./ViewPage.qml"));
|
||||||
|
|
||||||
|
//Force refresh
|
||||||
|
setPage(0)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -440,6 +442,8 @@ UM.MainWindow {
|
||||||
reportBug.onTriggered: CuraActions.openBugReportPage();
|
reportBug.onTriggered: CuraActions.openBugReportPage();
|
||||||
showEngineLog.onTriggered: engineLog.visible = true;
|
showEngineLog.onTriggered: engineLog.visible = true;
|
||||||
about.onTriggered: aboutDialog.visible = true;
|
about.onTriggered: aboutDialog.visible = true;
|
||||||
|
toggleFullScreen.onTriggered: base.toggleFullscreen()
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Menu {
|
Menu {
|
||||||
|
@ -498,7 +502,6 @@ UM.MainWindow {
|
||||||
onAccepted:
|
onAccepted:
|
||||||
{
|
{
|
||||||
UM.MeshFileHandler.readLocalFile(fileUrl)
|
UM.MeshFileHandler.readLocalFile(fileUrl)
|
||||||
Printer.setPlatformActivity(true)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
130
resources/qml/GeneralPage.qml
Normal file
130
resources/qml/GeneralPage.qml
Normal 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 }
|
||||||
|
}
|
||||||
|
}
|
|
@ -12,33 +12,14 @@ Item {
|
||||||
id: base;
|
id: base;
|
||||||
|
|
||||||
width: buttons.width;
|
width: buttons.width;
|
||||||
height: buttons.height + panel.height;
|
height: buttons.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;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
RowLayout {
|
RowLayout {
|
||||||
id: buttons;
|
id: buttons;
|
||||||
|
|
||||||
anchors.bottom: parent.bottom;
|
anchors.bottom: parent.bottom;
|
||||||
anchors.left: parent.left;
|
anchors.left: parent.left;
|
||||||
|
spacing: UM.Theme.sizes.default_lining.width
|
||||||
spacing: UM.Theme.sizes.default_margin.width * 2;
|
|
||||||
|
|
||||||
Repeater {
|
Repeater {
|
||||||
id: repeat
|
id: repeat
|
||||||
|
@ -51,7 +32,6 @@ Item {
|
||||||
|
|
||||||
checkable: true;
|
checkable: true;
|
||||||
checked: model.active;
|
checked: model.active;
|
||||||
onCheckedChanged: if (checked) activeItemBackground.setActive(x);
|
|
||||||
|
|
||||||
style: UM.Theme.styles.tool_button;
|
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;
|
id: panelBackground;
|
||||||
|
|
||||||
anchors.left: parent.left;
|
anchors.left: parent.left;
|
||||||
anchors.bottom: buttons.top;
|
anchors.top: buttons.bottom;
|
||||||
anchors.bottomMargin: UM.Theme.sizes.default_margin.height;
|
|
||||||
|
|
||||||
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;
|
height: panel.item ? panel.height + 2 * UM.Theme.sizes.default_margin.height : 0;
|
||||||
|
|
||||||
opacity: panel.item ? 1 : 0
|
opacity: panel.item ? 1 : 0
|
||||||
Behavior on opacity { NumberAnimation { duration: 100 } }
|
Behavior on opacity { NumberAnimation { duration: 100 } }
|
||||||
|
|
||||||
color: UM.Theme.colors.tool_panel_background;
|
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 {
|
Loader {
|
||||||
id: panel
|
id: panel
|
||||||
|
|
|
@ -8,7 +8,8 @@ import QtQuick.Controls.Styles 1.1
|
||||||
|
|
||||||
import UM 1.0 as UM
|
import UM 1.0 as UM
|
||||||
|
|
||||||
UM.PreferencesPage {
|
UM.PreferencesPage
|
||||||
|
{
|
||||||
id: preferencesPage
|
id: preferencesPage
|
||||||
|
|
||||||
//: View configuration page title
|
//: View configuration page title
|
||||||
|
@ -17,22 +18,26 @@ UM.PreferencesPage {
|
||||||
function reset()
|
function reset()
|
||||||
{
|
{
|
||||||
UM.Preferences.resetPreference("view/show_overhang");
|
UM.Preferences.resetPreference("view/show_overhang");
|
||||||
|
UM.Preferences.resetPreferences("view/center_on_select");
|
||||||
}
|
}
|
||||||
|
|
||||||
GridLayout {
|
GridLayout
|
||||||
|
{
|
||||||
columns: 2;
|
columns: 2;
|
||||||
|
|
||||||
CheckBox {
|
CheckBox
|
||||||
id: viewCheckbox
|
{
|
||||||
|
id: overhangCheckbox
|
||||||
checked: UM.Preferences.getValue("view/show_overhang")
|
checked: UM.Preferences.getValue("view/show_overhang")
|
||||||
onCheckedChanged: UM.Preferences.setValue("view/show_overhang", checked)
|
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
|
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
|
//: Display Overhang preference checkbox
|
||||||
text: qsTr("Display Overhang");
|
text: qsTr("Display Overhang");
|
||||||
onClicked: viewCheckbox.checked = !viewCheckbox.checked
|
onClicked: overhangCheckbox.checked = !overhangCheckbox.checked
|
||||||
|
|
||||||
//: Display Overhang preference tooltip
|
//: Display Overhang preference tooltip
|
||||||
tooltip: "Highlight unsupported areas of the model in red. Without support these areas will nog print properly."
|
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 }
|
Item { Layout.fillHeight: true; Layout.columnSpan: 2 }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,103 +5,274 @@ import QtQuick 2.2
|
||||||
import QtQuick.Controls 1.1
|
import QtQuick.Controls 1.1
|
||||||
import QtQuick.Layouts 1.1
|
import QtQuick.Layouts 1.1
|
||||||
import QtQuick.Window 2.1
|
import QtQuick.Window 2.1
|
||||||
|
import QtQuick.Controls.Styles 1.1
|
||||||
|
|
||||||
import UM 1.0 as UM
|
import UM 1.0 as UM
|
||||||
import ".."
|
import ".."
|
||||||
|
|
||||||
ColumnLayout {
|
ColumnLayout
|
||||||
|
{
|
||||||
id: wizardPage
|
id: wizardPage
|
||||||
property string title
|
property string title
|
||||||
signal openFile(string fileName)
|
property int pageWidth
|
||||||
signal closeWizard()
|
property int pageHeight
|
||||||
|
property var manufacturers: wizardPage.lineManufacturers()
|
||||||
|
property int manufacturerIndex: 0
|
||||||
|
|
||||||
Connections {
|
SystemPalette{id: palette}
|
||||||
target: rootElement
|
signal reloadModel(var newModel)
|
||||||
onFinalClicked: {//You can add functions here that get triggered when the final button is clicked in the wizard-element
|
|
||||||
|
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()
|
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
|
text: parent.title
|
||||||
font.pointSize: 18;
|
font.pointSize: 18;
|
||||||
}
|
}
|
||||||
|
|
||||||
Label {
|
Label
|
||||||
|
{
|
||||||
|
id: subTitle
|
||||||
|
anchors.left: parent.left
|
||||||
|
anchors.top: title.bottom
|
||||||
//: Add Printer wizard page description
|
//: Add Printer wizard page description
|
||||||
text: qsTr("Please select the type of printer:");
|
text: qsTr("Please select the type of printer:");
|
||||||
}
|
}
|
||||||
|
|
||||||
ScrollView {
|
ScrollView
|
||||||
ListView {
|
{
|
||||||
id: machineList;
|
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;
|
||||||
|
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
|
||||||
|
}
|
||||||
|
Behavior on opacity
|
||||||
|
{
|
||||||
|
SequentialAnimation
|
||||||
|
{
|
||||||
|
PauseAnimation { duration: machineButton.getAnimationTime(100) }
|
||||||
|
NumberAnimation { properties:"opacity"; duration: machineButton.getAnimationTime(200) }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
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
|
model: UM.Models.availableMachinesModel
|
||||||
delegate: RadioButton {
|
delegate: machineDelegate
|
||||||
id:machine_button
|
focus: true
|
||||||
exclusiveGroup: printerGroup;
|
|
||||||
checked: ListView.view.currentIndex == index ? true : false
|
|
||||||
text: model.name;
|
|
||||||
onClicked: {
|
|
||||||
ListView.view.currentIndex = index;
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Label {
|
Item
|
||||||
text: qsTr("Variation:");
|
{
|
||||||
|
id: machineNameHolder
|
||||||
|
height: childrenRect.height
|
||||||
|
anchors.top: machinesHolder.bottom
|
||||||
|
Label
|
||||||
|
{
|
||||||
|
id: insertNameLabel
|
||||||
|
//: Add Printer wizard field label
|
||||||
|
text: qsTr("Printer Name:");
|
||||||
}
|
}
|
||||||
|
TextField
|
||||||
ScrollView {
|
{
|
||||||
ListView {
|
id: machineName;
|
||||||
id: variations_list
|
anchors.top: insertNameLabel.bottom
|
||||||
model: machineList.model.getItem(machineList.currentIndex).variations
|
text: machineList.model.getItem(machineList.currentIndex).name
|
||||||
delegate: RadioButton {
|
implicitWidth: UM.Theme.sizes.standard_list_input.width
|
||||||
id: variation_radio_button
|
|
||||||
checked: ListView.view.currentIndex == index ? true : false
|
|
||||||
exclusiveGroup: variationGroup;
|
|
||||||
text: model.name;
|
|
||||||
onClicked: ListView.view.currentIndex = index;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
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; }
|
ExclusiveGroup { id: printerGroup; }
|
||||||
ExclusiveGroup { id: variationGroup; }
|
|
||||||
|
|
||||||
function getSpecialMachineType(machineId){
|
|
||||||
for (var i = 0; i < UM.Models.addMachinesModel.rowCount(); i++) {
|
function saveMachine()
|
||||||
if (UM.Models.addMachinesModel.getItem(i).name == machineId){
|
{
|
||||||
return UM.Models.addMachinesModel.getItem(i).name
|
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--)
|
||||||
|
{
|
||||||
function saveMachine(){
|
elementRoot.removePage(i)
|
||||||
if(machineList.currentIndex != -1) {
|
elementRoot.currentPage = 0
|
||||||
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)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else {
|
|
||||||
wizardPage.closeWizard()
|
// 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)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Hack to ensure the current page is set correctly
|
||||||
|
if(old_page_count == 1)
|
||||||
|
{
|
||||||
|
elementRoot.currentPage += 1
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,45 +8,47 @@ import QtQuick.Window 2.1
|
||||||
|
|
||||||
import UM 1.0 as UM
|
import UM 1.0 as UM
|
||||||
|
|
||||||
ColumnLayout {
|
Column
|
||||||
property string title
|
{
|
||||||
|
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;
|
anchors.fill: parent;
|
||||||
|
property variant printer_connection: UM.USBPrinterManager.connectedPrinterList.getItem(0).printer
|
||||||
Label {
|
Component.onCompleted: printer_connection.homeHead()
|
||||||
text: parent.title
|
Label
|
||||||
font.pointSize: 18;
|
{
|
||||||
|
text: ""
|
||||||
|
//Component.onCompleted:console.log(UM.Models.settingsModel.getMachineSetting("machine_width"))
|
||||||
}
|
}
|
||||||
|
Button
|
||||||
Label {
|
{
|
||||||
//: Add Printer wizard page description
|
text: "Move to next position"
|
||||||
text: qsTr("Please select the type of printer:");
|
onClicked:
|
||||||
}
|
{
|
||||||
|
if(wizardPage.leveling_state == 0)
|
||||||
ScrollView {
|
{
|
||||||
Layout.fillWidth: true;
|
printer_connection.moveHead(platform_width /2 , platform_height,0)
|
||||||
|
|
||||||
ListView {
|
|
||||||
id: machineList;
|
|
||||||
model: UM.Models.availableMachinesModel
|
|
||||||
delegate: RadioButton {
|
|
||||||
exclusiveGroup: printerGroup;
|
|
||||||
text: model.name;
|
|
||||||
onClicked: {
|
|
||||||
ListView.view.currentIndex = index;
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
if(wizardPage.leveling_state == 1)
|
||||||
|
{
|
||||||
|
printer_connection.moveHead(platform_width , 0,0)
|
||||||
|
}
|
||||||
|
if(wizardPage.leveling_state == 2)
|
||||||
|
{
|
||||||
|
printer_connection.moveHead(0, 0 ,0)
|
||||||
|
}
|
||||||
|
|
||||||
|
wizardPage.leveling_state++
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Label {
|
function threePointLeveling(width, height)
|
||||||
//: 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; }
|
|
||||||
}
|
}
|
|
@ -8,45 +8,76 @@ import QtQuick.Window 2.1
|
||||||
|
|
||||||
import UM 1.0 as UM
|
import UM 1.0 as UM
|
||||||
|
|
||||||
ColumnLayout {
|
Item
|
||||||
|
{
|
||||||
|
id: wizardPage
|
||||||
property string title
|
property string title
|
||||||
anchors.fill: parent;
|
|
||||||
|
|
||||||
Label {
|
SystemPalette{id: palette}
|
||||||
text: parent.title
|
|
||||||
font.pointSize: 18;
|
|
||||||
}
|
|
||||||
|
|
||||||
Label {
|
ScrollView
|
||||||
//: Add Printer wizard page description
|
{
|
||||||
text: qsTr("Please select the type of printer:");
|
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:")
|
||||||
|
}
|
||||||
|
|
||||||
ScrollView {
|
Column
|
||||||
Layout.fillWidth: true;
|
{
|
||||||
|
id: pageCheckboxes
|
||||||
ListView {
|
width: parent.width
|
||||||
id: machineList;
|
|
||||||
model: UM.Models.availableMachinesModel
|
|
||||||
delegate: RadioButton {
|
|
||||||
exclusiveGroup: printerGroup;
|
|
||||||
text: model.name;
|
|
||||||
onClicked: {
|
|
||||||
ListView.view.currentIndex = index;
|
|
||||||
|
|
||||||
|
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
|
||||||
|
{
|
||||||
|
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.");
|
||||||
|
}
|
||||||
|
|
||||||
|
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");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
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; }
|
ExclusiveGroup { id: printerGroup; }
|
||||||
}
|
}
|
|
@ -8,45 +8,173 @@ import QtQuick.Window 2.1
|
||||||
|
|
||||||
import UM 1.0 as UM
|
import UM 1.0 as UM
|
||||||
|
|
||||||
ColumnLayout {
|
Column
|
||||||
|
{
|
||||||
|
id: wizardPage
|
||||||
property string title
|
property string title
|
||||||
anchors.fill: parent;
|
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
|
text: parent.title
|
||||||
font.pointSize: 18;
|
font.pointSize: 18;
|
||||||
}
|
}
|
||||||
|
|
||||||
Label {
|
Label
|
||||||
|
{
|
||||||
//: Add Printer wizard page description
|
//: 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 {
|
Row
|
||||||
Layout.fillWidth: true;
|
{
|
||||||
|
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")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
ListView {
|
Row
|
||||||
id: machineList;
|
{
|
||||||
model: UM.Models.availableMachinesModel
|
Label
|
||||||
delegate: RadioButton {
|
{
|
||||||
exclusiveGroup: printerGroup;
|
text: qsTr("Min endstop Z: ")
|
||||||
text: model.name;
|
}
|
||||||
onClicked: {
|
Label
|
||||||
ListView.view.currentIndex = index;
|
{
|
||||||
|
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 {
|
ExclusiveGroup
|
||||||
//: Add Printer wizard field label
|
{
|
||||||
text: qsTr("Printer Name:");
|
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; }
|
|
||||||
}
|
}
|
|
@ -8,45 +8,61 @@ import QtQuick.Window 2.1
|
||||||
|
|
||||||
import UM 1.0 as UM
|
import UM 1.0 as UM
|
||||||
|
|
||||||
ColumnLayout {
|
Column
|
||||||
|
{
|
||||||
|
id: wizardPage
|
||||||
property string title
|
property string title
|
||||||
anchors.fill: parent;
|
anchors.fill: parent;
|
||||||
signal openFile(string fileName)
|
Label
|
||||||
|
{
|
||||||
Label {
|
|
||||||
text: parent.title
|
text: parent.title
|
||||||
font.pointSize: 18;
|
font.pointSize: 18;
|
||||||
}
|
}
|
||||||
|
|
||||||
Label {
|
ScrollView
|
||||||
//: Add Printer wizard page description
|
{
|
||||||
text: qsTr("Please select the type of printer:");
|
height: parent.height - 50
|
||||||
}
|
width: parent.width
|
||||||
|
ListView
|
||||||
ScrollView {
|
{
|
||||||
Layout.fillWidth: true;
|
|
||||||
|
|
||||||
ListView {
|
|
||||||
id: machineList;
|
id: machineList;
|
||||||
model: UM.Models.availableMachinesModel
|
model: UM.USBPrinterManager.connectedPrinterList
|
||||||
delegate: RadioButton {
|
|
||||||
exclusiveGroup: printerGroup;
|
delegate:Row
|
||||||
text: model.name;
|
{
|
||||||
onClicked: {
|
id: derp
|
||||||
ListView.view.currentIndex = index;
|
Text
|
||||||
|
{
|
||||||
|
id: text_area
|
||||||
|
text: model.name
|
||||||
|
}
|
||||||
|
Button
|
||||||
|
{
|
||||||
|
text: "Update";
|
||||||
|
onClicked:
|
||||||
|
{
|
||||||
|
if(!UM.USBPrinterManager.updateFirmwareBySerial(text_area.text))
|
||||||
|
{
|
||||||
|
status_text.text = "ERROR"
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Label {
|
Label
|
||||||
//: Add Printer wizard field label
|
{
|
||||||
text: qsTr("Printer Name:");
|
id: status_text
|
||||||
|
text: ""
|
||||||
}
|
}
|
||||||
|
|
||||||
TextField { id: machineName; Layout.fillWidth: true; text: machineList.model.getItem(machineList.currentIndex).name }
|
|
||||||
|
|
||||||
Item { Layout.fillWidth: true; Layout.fillHeight: true; }
|
Item
|
||||||
|
{
|
||||||
|
Layout.fillWidth: true;
|
||||||
|
Layout.fillHeight: true;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
ExclusiveGroup { id: printerGroup; }
|
|
||||||
}
|
}
|
60
resources/settings/RigidBot.json
Normal file
60
resources/settings/RigidBot.json
Normal 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" } }
|
||||||
|
}
|
||||||
|
}
|
58
resources/settings/RigidBotBig.json
Normal file
58
resources/settings/RigidBotBig.json
Normal 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" } }
|
||||||
|
}
|
||||||
|
}
|
280
resources/settings/dual_extrusion_printer.json
Normal file
280
resources/settings/dual_extrusion_printer.json
Normal 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
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
82
resources/settings/maker_starter.json
Normal file
82
resources/settings/maker_starter.json
Normal 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 }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
BIN
resources/themes/cura/fonts/ProximaNova-Black.otf
Normal file
BIN
resources/themes/cura/fonts/ProximaNova-Black.otf
Normal file
Binary file not shown.
BIN
resources/themes/cura/fonts/ProximaNova-Bold.otf
Normal file
BIN
resources/themes/cura/fonts/ProximaNova-Bold.otf
Normal file
Binary file not shown.
BIN
resources/themes/cura/fonts/ProximaNova-BoldIt.otf
Normal file
BIN
resources/themes/cura/fonts/ProximaNova-BoldIt.otf
Normal file
Binary file not shown.
BIN
resources/themes/cura/fonts/ProximaNova-Extrabold.otf
Normal file
BIN
resources/themes/cura/fonts/ProximaNova-Extrabold.otf
Normal file
Binary file not shown.
BIN
resources/themes/cura/fonts/ProximaNova-Light.otf
Normal file
BIN
resources/themes/cura/fonts/ProximaNova-Light.otf
Normal file
Binary file not shown.
BIN
resources/themes/cura/fonts/ProximaNova-LightItalic.otf
Normal file
BIN
resources/themes/cura/fonts/ProximaNova-LightItalic.otf
Normal file
Binary file not shown.
BIN
resources/themes/cura/fonts/ProximaNova-Regular.otf
Normal file
BIN
resources/themes/cura/fonts/ProximaNova-Regular.otf
Normal file
Binary file not shown.
BIN
resources/themes/cura/fonts/ProximaNova-RegularItalic.otf
Normal file
BIN
resources/themes/cura/fonts/ProximaNova-RegularItalic.otf
Normal file
Binary file not shown.
BIN
resources/themes/cura/fonts/ProximaNovaCond-Light.otf
Normal file
BIN
resources/themes/cura/fonts/ProximaNovaCond-Light.otf
Normal file
Binary file not shown.
BIN
resources/themes/cura/fonts/ProximaNovaCond-LightIt.otf
Normal file
BIN
resources/themes/cura/fonts/ProximaNovaCond-LightIt.otf
Normal file
Binary file not shown.
BIN
resources/themes/cura/fonts/ProximaNovaCond-Regular.otf
Normal file
BIN
resources/themes/cura/fonts/ProximaNovaCond-Regular.otf
Normal file
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.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -35,54 +35,26 @@ QtObject {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
property Component open_file_button: Component {
|
property Component open_file_button: Component {
|
||||||
ButtonStyle {
|
ButtonStyle {
|
||||||
background: Item {
|
background: Item{
|
||||||
implicitWidth: UM.Theme.sizes.button.width;
|
implicitWidth: UM.Theme.sizes.loadfile_button.width
|
||||||
implicitHeight: UM.Theme.sizes.button.height;
|
implicitHeight: UM.Theme.sizes.loadfile_button.height
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
anchors.bottom: parent.verticalCenter;
|
width: parent.width
|
||||||
width: parent.width;
|
height: parent.height
|
||||||
height: control.hovered ? parent.height / 2 + label.height : 0;
|
color: control.hovered ? UM.Theme.colors.load_save_button_hover : UM.Theme.colors.load_save_button
|
||||||
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;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Behavior on color { ColorAnimation { duration: 50; } }
|
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: Label{
|
||||||
label: Item {
|
visible: false
|
||||||
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;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -94,7 +66,8 @@ QtObject {
|
||||||
implicitHeight: UM.Theme.sizes.button.height;
|
implicitHeight: UM.Theme.sizes.button.height;
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
anchors.bottom: parent.verticalCenter;
|
id: tool_button_background
|
||||||
|
anchors.top: parent.verticalCenter;
|
||||||
|
|
||||||
width: parent.width;
|
width: parent.width;
|
||||||
height: control.hovered ? parent.height / 2 + label.height : 0;
|
height: control.hovered ? parent.height / 2 + label.height : 0;
|
||||||
|
@ -103,21 +76,16 @@ QtObject {
|
||||||
opacity: control.hovered ? 1.0 : 0.0;
|
opacity: control.hovered ? 1.0 : 0.0;
|
||||||
Behavior on opacity { NumberAnimation { duration: 100; } }
|
Behavior on opacity { NumberAnimation { duration: 100; } }
|
||||||
|
|
||||||
Rectangle {
|
Label {
|
||||||
anchors.horizontalCenter: parent.horizontalCenter;
|
id: label
|
||||||
width: childrenRect.width;
|
anchors.bottom: parent.bottom
|
||||||
height: childrenRect.height;
|
text: control.text
|
||||||
|
font: UM.Theme.fonts.button_tooltip;
|
||||||
Label {
|
color: UM.Theme.colors.button_tooltip_text;
|
||||||
id: label
|
|
||||||
text: control.text.replace("&", "");
|
|
||||||
font: UM.Theme.fonts.button_tooltip;
|
|
||||||
color: UM.Theme.colors.button_tooltip_text;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
UM.AngledCornerRectangle {
|
Rectangle {
|
||||||
id: buttonFace;
|
id: buttonFace;
|
||||||
|
|
||||||
anchors.fill: parent;
|
anchors.fill: parent;
|
||||||
|
@ -138,16 +106,16 @@ QtObject {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Behavior on color { ColorAnimation { duration: 50; } }
|
Behavior on color { ColorAnimation { duration: 50; } }
|
||||||
cornerSize: UM.Theme.sizes.default_margin.width;
|
|
||||||
|
|
||||||
Label {
|
Label {
|
||||||
|
id: tool_button_arrow
|
||||||
anchors.right: parent.right;
|
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;
|
anchors.verticalCenter: parent.verticalCenter;
|
||||||
text: "▼";
|
text: "▼";
|
||||||
font: UM.Theme.fonts.small;
|
font: UM.Theme.fonts.small;
|
||||||
visible: control.menu != null;
|
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{
|
property Component progressbar: Component{
|
||||||
ProgressBarStyle {
|
ProgressBarStyle {
|
||||||
background: UM.AngledCornerRectangle {
|
background:Rectangle {
|
||||||
cornerSize: UM.Theme.sizes.progressbar_control.height
|
implicitWidth: UM.Theme.sizes.message.width - (UM.Theme.sizes.default_margin.width * 2)
|
||||||
implicitWidth: UM.Theme.sizes.progressbar.width
|
|
||||||
implicitHeight: UM.Theme.sizes.progressbar.height
|
implicitHeight: UM.Theme.sizes.progressbar.height
|
||||||
|
x: UM.Theme.sizes.default_margin.width
|
||||||
color: UM.Theme.colors.progressbar_background
|
color: UM.Theme.colors.progressbar_background
|
||||||
}
|
}
|
||||||
progress: UM.AngledCornerRectangle {
|
progress: Rectangle {
|
||||||
cornerSize: UM.Theme.sizes.progressbar_control.height
|
|
||||||
color: control.indeterminate ? "transparent" : UM.Theme.colors.progressbar_control
|
color: control.indeterminate ? "transparent" : UM.Theme.colors.progressbar_control
|
||||||
|
|
||||||
UM.AngledCornerRectangle {
|
Rectangle{
|
||||||
cornerSize: UM.Theme.sizes.progressbar_control.height
|
|
||||||
color: UM.Theme.colors.progressbar_control
|
color: UM.Theme.colors.progressbar_control
|
||||||
width: UM.Theme.sizes.progressbar_control.width
|
width: UM.Theme.sizes.progressbar_control.width
|
||||||
height: UM.Theme.sizes.progressbar_control.height
|
height: UM.Theme.sizes.progressbar_control.height
|
||||||
|
x: UM.Theme.sizes.default_margin.width
|
||||||
visible: control.indeterminate
|
visible: control.indeterminate
|
||||||
|
|
||||||
SequentialAnimation on x {
|
SequentialAnimation on x {
|
||||||
id: xAnim
|
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
|
running: control.indeterminate
|
||||||
loops: Animation.Infinite
|
loops: Animation.Infinite
|
||||||
NumberAnimation { from: 0; to: xAnim.animEndPoint; duration: 2000;}
|
NumberAnimation { from: UM.Theme.sizes.default_margin.width; to: xAnim.animEndPoint; duration: 2000;}
|
||||||
NumberAnimation { from: xAnim.animEndPoint; to: 0; duration: 2000;}
|
NumberAnimation { from: xAnim.animEndPoint; to: UM.Theme.sizes.default_margin.width; duration: 2000;}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,47 +3,52 @@
|
||||||
"large": {
|
"large": {
|
||||||
"size": 1.5,
|
"size": 1.5,
|
||||||
"bold": true,
|
"bold": true,
|
||||||
"family": "Roboto"
|
"family": "ProximaNova"
|
||||||
},
|
},
|
||||||
"default": {
|
"default": {
|
||||||
"size": 1,
|
"size": 1,
|
||||||
"family": "Roboto"
|
"family": "ProximaNova"
|
||||||
},
|
},
|
||||||
"default_allcaps": {
|
"default_allcaps": {
|
||||||
"size": 1,
|
"size": 1,
|
||||||
"capitalize": true,
|
"capitalize": true,
|
||||||
"family": "Roboto"
|
"family": "ProximaNova"
|
||||||
},
|
},
|
||||||
"small": {
|
"small": {
|
||||||
"size": 0.75,
|
"size": 0.75,
|
||||||
"family": "Roboto"
|
"family": "ProximaNova"
|
||||||
},
|
},
|
||||||
"tiny": {
|
"tiny": {
|
||||||
"size": 0.5,
|
"size": 0.5,
|
||||||
"family": "Roboto"
|
"family": "ProximaNova"
|
||||||
|
},
|
||||||
|
"caption": {
|
||||||
|
"size": 0.75,
|
||||||
|
"italic": true,
|
||||||
|
"family": "ProximaNova"
|
||||||
},
|
},
|
||||||
"sidebar_header": {
|
"sidebar_header": {
|
||||||
"size": 0.75,
|
"size": 0.75,
|
||||||
"capitalize": true,
|
"capitalize": true,
|
||||||
"family": "Roboto"
|
"family": "ProximaNova"
|
||||||
},
|
},
|
||||||
"sidebar_save_to": {
|
"sidebar_save_to": {
|
||||||
"size": 1.0,
|
"size": 1.0,
|
||||||
"family": "Roboto"
|
"family": "ProximaNova"
|
||||||
},
|
},
|
||||||
"timeslider_time": {
|
"timeslider_time": {
|
||||||
"size": 1.0,
|
"size": 1.0,
|
||||||
"bold": true,
|
"bold": true,
|
||||||
"family": "Roboto"
|
"family": "ProximaNova"
|
||||||
},
|
},
|
||||||
"button_tooltip": {
|
"button_tooltip": {
|
||||||
"size": 0.75,
|
"size": 0.75,
|
||||||
"capitalize": true,
|
"capitalize": true,
|
||||||
"family": "Roboto"
|
"family": "ProximaNova"
|
||||||
},
|
},
|
||||||
"setting_category": {
|
"setting_category": {
|
||||||
"size": 1.5,
|
"size": 1.5,
|
||||||
"family": "Roboto"
|
"family": "ProximaNova"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -61,14 +66,20 @@
|
||||||
"text_hover": [35, 35, 35, 255],
|
"text_hover": [35, 35, 35, 255],
|
||||||
"text_pressed": [12, 169, 227, 255],
|
"text_pressed": [12, 169, 227, 255],
|
||||||
|
|
||||||
"button": [160, 163, 171, 255],
|
"button": [139, 143, 153, 255],
|
||||||
"button_hover": [140, 144, 154, 255],
|
"button_hover": [116, 120, 127, 255],
|
||||||
"button_active": [12, 169, 227, 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_text": [255, 255, 255, 255],
|
||||||
"button_disabled": [245, 245, 245, 255],
|
"button_disabled": [245, 245, 245, 255],
|
||||||
"button_tooltip_text": [35, 35, 35, 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_background": [245, 245, 245, 255],
|
||||||
"scrollbar_handle": [205, 202, 201, 255],
|
"scrollbar_handle": [205, 202, 201, 255],
|
||||||
"scrollbar_handle_hover": [174, 174, 174, 255],
|
"scrollbar_handle_hover": [174, 174, 174, 255],
|
||||||
|
@ -92,7 +103,7 @@
|
||||||
"setting_validation_warning": [255, 186, 15, 255],
|
"setting_validation_warning": [255, 186, 15, 255],
|
||||||
"setting_validation_ok": [255, 255, 255, 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],
|
"progressbar_control": [12, 169, 227, 255],
|
||||||
|
|
||||||
"slider_groove": [245, 245, 245, 255],
|
"slider_groove": [245, 245, 245, 255],
|
||||||
|
@ -120,8 +131,8 @@
|
||||||
"save_button_printtime_text": [12, 169, 227, 255],
|
"save_button_printtime_text": [12, 169, 227, 255],
|
||||||
"save_button_background": [249, 249, 249, 255],
|
"save_button_background": [249, 249, 249, 255],
|
||||||
|
|
||||||
"message": [205, 202, 201, 255],
|
"message_background": [255, 255, 255, 255],
|
||||||
"message_text": [35, 35, 35, 255],
|
"message_text": [12, 169, 227, 255],
|
||||||
|
|
||||||
"tool_panel_background": [255, 255, 255, 255]
|
"tool_panel_background": [255, 255, 255, 255]
|
||||||
},
|
},
|
||||||
|
@ -129,11 +140,15 @@
|
||||||
"sizes": {
|
"sizes": {
|
||||||
"window_margin": [2.0, 2.0],
|
"window_margin": [2.0, 2.0],
|
||||||
"default_margin": [1.0, 1.0],
|
"default_margin": [1.0, 1.0],
|
||||||
|
"default_lining": [0.1, 0.1],
|
||||||
"panel": [22.0, 10.0],
|
"panel": [22.0, 10.0],
|
||||||
"logo": [9.5, 2.0],
|
"logo": [9.5, 2.0],
|
||||||
"toolbar_button": [2.0, 2.0],
|
"toolbar_button": [2.0, 2.0],
|
||||||
"toolbar_spacing": [1.0, 1.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": [22.0, 3.0],
|
||||||
"section_icon": [2.14, 2.14],
|
"section_icon": [2.14, 2.14],
|
||||||
"section_text_margin": [0.33, 0.33],
|
"section_text_margin": [0.33, 0.33],
|
||||||
|
@ -144,11 +159,14 @@
|
||||||
"setting_unit_margin": [0.5, 0.5],
|
"setting_unit_margin": [0.5, 0.5],
|
||||||
"setting_text_maxwidth": [40.0, 0.0],
|
"setting_text_maxwidth": [40.0, 0.0],
|
||||||
|
|
||||||
"button": [4.25, 4.25],
|
"standard_list_lineheight": [1.5, 1.5],
|
||||||
"button_icon": [2.9, 2.9],
|
"standard_list_input": [20.0, 25.0],
|
||||||
|
|
||||||
"progressbar": [26.0, 0.5],
|
"button": [3.2, 3.2],
|
||||||
"progressbar_control": [8.0, 0.5],
|
"button_icon": [2.5, 2.5],
|
||||||
|
|
||||||
|
"progressbar": [26.0, 0.8],
|
||||||
|
"progressbar_control": [8.0, 0.8],
|
||||||
"progressbar_padding": [0.0, 1.0],
|
"progressbar_padding": [0.0, 1.0],
|
||||||
|
|
||||||
"scrollbar": [0.5, 0.5],
|
"scrollbar": [0.5, 0.5],
|
||||||
|
@ -171,7 +189,11 @@
|
||||||
"save_button_label_margin": [0.5, 0.5],
|
"save_button_label_margin": [0.5, 0.5],
|
||||||
"save_button_save_to_button": [0.3, 2.7],
|
"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": [30.0, 5.0],
|
||||||
"message_close": [1.25, 1.25]
|
"message_close": [1.25, 1.25],
|
||||||
|
"message_button": [6.0, 1.8]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue