diff --git a/cura.desktop b/cura.desktop index 0b3af64aaa..4ac14e4651 100644 --- a/cura.desktop +++ b/cura.desktop @@ -5,8 +5,8 @@ Name[de]=Cura GenericName=3D Printing Software GenericName[de]=3D-Druck-Software Comment= -Exec=/usr/bin/cura_app.py -TryExec=/usr/bin/cura_app.py +Exec=/usr/bin/cura_app.py %f +TryExec=/usr/bin/cura_app.py %f Icon=/usr/share/cura/resources/images/cura-icon.png Terminal=false Type=Application diff --git a/cura/ConvexHullDecorator.py b/cura/ConvexHullDecorator.py index f791441f1e..de51aacd0e 100644 --- a/cura/ConvexHullDecorator.py +++ b/cura/ConvexHullDecorator.py @@ -9,8 +9,10 @@ class ConvexHullDecorator(SceneNodeDecorator): # In case of printing all at once this is the same as the convex hull. For one at the time this is the area without the head. self._convex_hull_boundary = None - # In case of printing all at once this is the same as the convex hull. For one at the time this is area with full head + # In case of printing all at once this is the same as the convex hull. For one at the time this is area with intersection of mirrored head self._convex_hull_head = None + # In case of printing all at once this is the same as the convex hull. For one at the time this is area with intersection of full head + self._convex_hull_head_full = None self._convex_hull_node = None self._convex_hull_job = None @@ -28,6 +30,11 @@ class ConvexHullDecorator(SceneNodeDecorator): def getConvexHull(self): return self._convex_hull + def getConvexHullHeadFull(self): + if not self._convex_hull_head_full: + return self.getConvexHull() + return self._convex_hull_head_full + def getConvexHullHead(self): if not self._convex_hull_head: return self.getConvexHull() @@ -40,7 +47,10 @@ class ConvexHullDecorator(SceneNodeDecorator): def setConvexHullBoundary(self, hull): self._convex_hull_boundary = hull - + + def setConvexHullHeadFull(self, hull): + self._convex_hull_head_full = hull + def setConvexHullHead(self, hull): self._convex_hull_head = hull diff --git a/cura/ConvexHullJob.py b/cura/ConvexHullJob.py index fe9a6c279f..7ef63e61e8 100644 --- a/cura/ConvexHullJob.py +++ b/cura/ConvexHullJob.py @@ -39,7 +39,7 @@ class ConvexHullJob(Job): mesh = self._node.getMeshData() vertex_data = mesh.getTransformed(self._node.getWorldTransformation()).getVertices() # Don't use data below 0. TODO; We need a better check for this as this gives poor results for meshes with long edges. - vertex_data = vertex_data[vertex_data[:,1]>0] + vertex_data = vertex_data[vertex_data[:,1] >= 0] hull = Polygon(numpy.rint(vertex_data[:, [0, 2]]).astype(int)) # First, calculate the normal convex hull around the points @@ -55,12 +55,16 @@ class ConvexHullJob(Job): # Printing one at a time and it's not an object in a group self._node.callDecoration("setConvexHullBoundary", copy.deepcopy(hull)) head_and_fans = Polygon(numpy.array(profile.getSettingValue("machine_head_with_fans_polygon"), numpy.float32)) + # Full head hull is used to actually check the order. + full_head_hull = hull.getMinkowskiHull(head_and_fans) + self._node.callDecoration("setConvexHullHeadFull", full_head_hull) mirrored = copy.deepcopy(head_and_fans) mirrored.mirror([0, 0], [0, 1]) #Mirror horizontally. mirrored.mirror([0, 0], [1, 0]) #Mirror vertically. head_and_fans = head_and_fans.intersectionConvexHulls(mirrored) - head_hull = hull.getMinkowskiHull(head_and_fans) - self._node.callDecoration("setConvexHullHead", head_hull) + # Min head hull is used for the push free + min_head_hull = hull.getMinkowskiHull(head_and_fans) + self._node.callDecoration("setConvexHullHead", min_head_hull) hull = hull.getMinkowskiHull(Polygon(numpy.array(profile.getSettingValue("machine_head_polygon"),numpy.float32))) else: self._node.callDecoration("setConvexHullHead", None) diff --git a/cura/CuraApplication.py b/cura/CuraApplication.py index 9dba5f6335..1b41cdda2f 100644 --- a/cura/CuraApplication.py +++ b/cura/CuraApplication.py @@ -78,6 +78,8 @@ class CuraApplication(QtApplication): if not hasattr(sys, "frozen"): Resources.addSearchPath(os.path.join(os.path.abspath(os.path.dirname(__file__)), "..")) + self._open_file_queue = [] #Files to open when plug-ins are loaded. + super().__init__(name = "cura", version = CuraVersion) self.setWindowIcon(QIcon(Resources.getPath(Resources.Images, "cura-icon.png"))) @@ -129,6 +131,10 @@ class CuraApplication(QtApplication): continue self._recent_files.append(QUrl.fromLocalFile(f)) + + @pyqtSlot(result = QUrl) + def getDefaultPath(self): + return QUrl.fromLocalFile(os.path.expanduser("~/")) ## Handle loading of all plugin types (and the backend explicitly) # \sa PluginRegistery @@ -144,6 +150,8 @@ class CuraApplication(QtApplication): if self.getBackend() == None: raise RuntimeError("Could not load the backend plugin!") + self._plugins_loaded = True + def addCommandLineOptions(self, parser): super().addCommandLineOptions(parser) parser.add_argument("file", nargs="*", help="Files to load after starting the application.") @@ -201,13 +209,18 @@ class CuraApplication(QtApplication): for file in self.getCommandLineOption("file", []): self._openFile(file) + for file_name in self._open_file_queue: #Open all the files that were queued up while plug-ins were loading. + self._openFile(file_name) self.exec_() # Handle Qt events def event(self, event): if event.type() == QEvent.FileOpen: - self._openFile(event.file()) + if self._plugins_loaded: + self._openFile(event.file()) + else: + self._open_file_queue.append(event.file()) return super().event(event) @@ -268,7 +281,7 @@ class CuraApplication(QtApplication): count += 1 if not scene_boundingbox: - scene_boundingbox = node.getBoundingBox() + scene_boundingbox = copy.deepcopy(node.getBoundingBox()) else: scene_boundingbox += node.getBoundingBox() @@ -536,6 +549,7 @@ class CuraApplication(QtApplication): group_decorator = GroupDecorator() group_node.addDecorator(group_decorator) group_node.setParent(self.getController().getScene().getRoot()) + group_node.setSelectable(True) center = Selection.getSelectionCenter() group_node.setPosition(center) group_node.setCenterPosition(center) diff --git a/cura/LayerData.py b/cura/LayerData.py index 421b2589cb..90529e63ea 100644 --- a/cura/LayerData.py +++ b/cura/LayerData.py @@ -174,32 +174,12 @@ class Polygon(): MoveRetractionType = 9 def __init__(self, mesh, type, data, line_width): - super().__init__() self._mesh = mesh self._type = type self._data = data self._line_width = line_width / 1000 - if type == self.Inset0Type: - self._color = Color(1.0, 0.0, 0.0, 1.0) - elif self._type == self.InsetXType: - self._color = Color(0.0, 1.0, 0.0, 1.0) - elif self._type == self.SkinType: - self._color = Color(1.0, 1.0, 0.0, 1.0) - elif self._type == self.SupportType: - self._color = Color(0.0, 1.0, 1.0, 1.0) - elif self._type == self.SkirtType: - self._color = Color(0.0, 1.0, 1.0, 1.0) - elif self._type == self.InfillType: - self._color = Color(1.0, 0.74, 0.0, 1.0) - elif self._type == self.SupportInfillType: - self._color = Color(0.0, 1.0, 1.0, 1.0) - elif self._type == self.MoveCombingType: - self._color = Color(0.0, 0.0, 1.0, 1.0) - elif self._type == self.MoveRetractionType: - self._color = Color(0.5, 0.5, 1.0, 1.0) - else: - self._color = Color(1.0, 1.0, 1.0, 1.0) + self._color = self.__color_map[type] def build(self, offset, vertices, colors, indices): self._begin = offset @@ -260,3 +240,16 @@ class Polygon(): normals[:,2] /= lengths return normals + + __color_map = { + NoneType: Color(1.0, 1.0, 1.0, 1.0), + Inset0Type: Color(1.0, 0.0, 0.0, 1.0), + InsetXType: Color(0.0, 1.0, 0.0, 1.0), + SkinType: Color(1.0, 1.0, 0.0, 1.0), + SupportType: Color(0.0, 1.0, 1.0, 1.0), + SkirtType: Color(0.0, 1.0, 1.0, 1.0), + InfillType: Color(1.0, 0.74, 0.0, 1.0), + SupportInfillType: Color(0.0, 1.0, 1.0, 1.0), + MoveCombingType: Color(0.0, 0.0, 1.0, 1.0), + MoveRetractionType: Color(0.5, 0.5, 1.0, 1.0), + } diff --git a/cura/OneAtATimeIterator.py b/cura/OneAtATimeIterator.py index 42ec14e6ff..6ecd49d8b3 100644 --- a/cura/OneAtATimeIterator.py +++ b/cura/OneAtATimeIterator.py @@ -25,22 +25,23 @@ class OneAtATimeIterator(Iterator.Iterator): return if node.callDecoration("getConvexHull"): node_list.append(node) - + if len(node_list) < 2: self._node_stack = node_list[:] return - + + # Copy the list self._original_node_list = node_list[:] - + ## Initialise the hit map (pre-compute all hits between all objects) - self._hit_map = [[self._checkHit(j,i) for i in node_list] for j in node_list] - + self._hit_map = [[self._checkHit(i,j) for i in node_list] for j in node_list] + # Check if we have to files that block eachother. If this is the case, there is no solution! for a in range(0,len(node_list)): for b in range(0,len(node_list)): if a != b and self._hit_map[a][b] and self._hit_map[b][a]: return - + # Sort the original list so that items that block the most other objects are at the beginning. # This does not decrease the worst case running time, but should improve it in most cases. sorted(node_list, key = cmp_to_key(self._calculateScore)) @@ -59,44 +60,46 @@ class OneAtATimeIterator(Iterator.Iterator): # We have no more nodes to check, so quit looking. todo_node_list = None self._node_stack = new_order - + return todo_node_list.append(_ObjectOrder(new_order, new_todo_list)) - self._node_stack = [] #No result found! + self._node_stack = [] #No result found! + - # Check if first object can be printed before the provided list (using the hit map) def _checkHitMultiple(self, node, other_nodes): node_index = self._original_node_list.index(node) for other_node in other_nodes: - if self._hit_map[node_index][self._original_node_list.index(other_node)]: + other_node_index = self._original_node_list.index(other_node) + if self._hit_map[node_index][other_node_index]: return True return False - + def _checkBlockMultiple(self, node, other_nodes): node_index = self._original_node_list.index(node) for other_node in other_nodes: - if self._hit_map[self._original_node_list.index(other_node)][node_index] and node_index != self._original_node_list.index(other_node): + other_node_index = self._original_node_list.index(other_node) + if self._hit_map[other_node_index][node_index] and node_index != other_node_index: return True return False - + ## Calculate score simply sums the number of other objects it 'blocks' def _calculateScore(self, a, b): score_a = sum(self._hit_map[self._original_node_list.index(a)]) score_b = sum(self._hit_map[self._original_node_list.index(b)]) return score_a - score_b - + # Checks if A can be printed before B def _checkHit(self, a, b): if a == b: return False - - overlap = a.callDecoration("getConvexHullBoundary").intersectsPolygon(b.callDecoration("getConvexHullHead")) + + overlap = a.callDecoration("getConvexHullBoundary").intersectsPolygon(b.callDecoration("getConvexHullHeadFull")) if overlap: return True else: return False - + ## Internal object used to keep track of a possible order in which to print objects. class _ObjectOrder(): @@ -107,4 +110,4 @@ class _ObjectOrder(): """ self.order = order self.todo = todo - + diff --git a/cura/PlatformPhysics.py b/cura/PlatformPhysics.py index 3933802135..df841bd71d 100644 --- a/cura/PlatformPhysics.py +++ b/cura/PlatformPhysics.py @@ -60,12 +60,16 @@ class PlatformPhysics: build_volume_bounding_box = copy.deepcopy(self._build_volume.getBoundingBox()) build_volume_bounding_box.setBottom(-9001) # Ignore intersections with the bottom + node._outside_buildarea = False # Mark the node as outside the build volume if the bounding box test fails. if build_volume_bounding_box.intersectsBox(bbox) != AxisAlignedBox.IntersectionResult.FullIntersection: node._outside_buildarea = True else: - node._outside_buildarea = False + # When printing one at a time too high objects are not printable. + if Application.getInstance().getMachineManager().getWorkingProfile().getSettingValue("print_sequence") == "one_at_a_time": + if node.getBoundingBox().height > Application.getInstance().getMachineManager().getWorkingProfile().getSettingValue("gantry_height"): + node._outside_buildarea = True # Move it downwards if bottom is above platform move_vector = Vector() diff --git a/cura/PrintInformation.py b/cura/PrintInformation.py index 3c404e69a3..a3a2bb2948 100644 --- a/cura/PrintInformation.py +++ b/cura/PrintInformation.py @@ -4,7 +4,6 @@ from PyQt5.QtCore import QObject, QDateTime, QTimer, pyqtSignal, pyqtSlot, pyqtProperty from UM.Application import Application -from UM.Settings.MachineSettings import MachineSettings from UM.Resources import Resources from UM.Scene.SceneNode import SceneNode from UM.Qt.Duration import Duration diff --git a/cura/ZOffsetDecorator.py b/cura/ZOffsetDecorator.py index 54bf64b9a5..5c3c9e219b 100644 --- a/cura/ZOffsetDecorator.py +++ b/cura/ZOffsetDecorator.py @@ -6,7 +6,6 @@ class ZOffsetDecorator(SceneNodeDecorator): self._z_offset = 0 def setZOffset(self, offset): - print("setZOffset", offset) self._z_offset = offset def getZOffset(self): diff --git a/plugins/AutoSave/AutoSave.py b/plugins/AutoSave/AutoSave.py index 79d91e75b2..e621ccdc4b 100644 --- a/plugins/AutoSave/AutoSave.py +++ b/plugins/AutoSave/AutoSave.py @@ -13,7 +13,6 @@ class AutoSave(Extension): def __init__(self): super().__init__() - #Preferences.getInstance().preferenceChanged.connect(self._onPreferenceChanged) Preferences.getInstance().preferenceChanged.connect(self._triggerTimer) machine_manager = Application.getInstance().getMachineManager() @@ -52,8 +51,11 @@ class AutoSave(Extension): self._saving = True # To prevent the save process from triggering another autosave. Logger.log("d", "Autosaving preferences, instances and profiles") + machine_manager = Application.getInstance().getMachineManager() + + machine_manager.saveVisibility() + machine_manager.saveMachineInstances() + machine_manager.saveProfiles() Preferences.getInstance().writeToFile(Resources.getStoragePath(Resources.Preferences, Application.getInstance().getApplicationName() + ".cfg")) - Application.getInstance().getMachineManager().saveMachineInstances() - Application.getInstance().getMachineManager().saveProfiles() self._saving = False diff --git a/plugins/CuraEngineBackend/CuraEngineBackend.py b/plugins/CuraEngineBackend/CuraEngineBackend.py index 321233e4bf..7f7b992404 100644 --- a/plugins/CuraEngineBackend/CuraEngineBackend.py +++ b/plugins/CuraEngineBackend/CuraEngineBackend.py @@ -26,6 +26,8 @@ import numpy from PyQt5.QtCore import QTimer +import Arcus + from UM.i18n import i18nCatalog catalog = i18nCatalog("cura") @@ -73,6 +75,7 @@ class CuraEngineBackend(Backend): self._restart = False self._enabled = True self._always_restart = True + self._process_layers_job = None #The currently active job to process layers, or None if it is not processing layers. self._message = None @@ -120,6 +123,10 @@ class CuraEngineBackend(Backend): self.slicingCancelled.emit() return + if self._process_layers_job: + self._process_layers_job.abort() + self._process_layers_job = None + if self._profile.hasErrorValue(): Logger.log("w", "Profile has error values. Aborting slicing") if self._message: @@ -179,6 +186,15 @@ class CuraEngineBackend(Backend): self._onChanged() + def _onSocketError(self, error): + super()._onSocketError(error) + + self._slicing = False + self.processingProgress.emit(0) + + if error.getErrorCode() not in [Arcus.ErrorCode.BindFailedError, Arcus.ErrorCode.ConnectionResetError, Arcus.ErrorCode.Debug]: + Logger.log("e", "A socket error caused the connection to be reset") + def _onActiveProfileChanged(self): if self._profile: self._profile.settingValueChanged.disconnect(self._onSettingChanged) @@ -193,8 +209,8 @@ class CuraEngineBackend(Backend): def _onSlicedObjectListMessage(self, message): if self._layer_view_active: - job = ProcessSlicedObjectListJob.ProcessSlicedObjectListJob(message) - job.start() + self._process_layers_job = ProcessSlicedObjectListJob.ProcessSlicedObjectListJob(message) + self._process_layers_job.start() else : self._stored_layer_data = message @@ -258,8 +274,8 @@ class CuraEngineBackend(Backend): # There is data and we're not slicing at the moment # if we are slicing, there is no need to re-calculate the data as it will be invalid in a moment. if self._stored_layer_data and not self._slicing: - job = ProcessSlicedObjectListJob.ProcessSlicedObjectListJob(self._stored_layer_data) - job.start() + self._process_layers_job = ProcessSlicedObjectListJob.ProcessSlicedObjectListJob(self._stored_layer_data) + self._process_layers_job.start() self._stored_layer_data = None else: self._layer_view_active = False diff --git a/plugins/CuraEngineBackend/ProcessSlicedObjectListJob.py b/plugins/CuraEngineBackend/ProcessSlicedObjectListJob.py index acd974797c..df2e5966e9 100644 --- a/plugins/CuraEngineBackend/ProcessSlicedObjectListJob.py +++ b/plugins/CuraEngineBackend/ProcessSlicedObjectListJob.py @@ -10,6 +10,8 @@ from UM.Mesh.MeshData import MeshData from UM.Message import Message from UM.i18n import i18nCatalog +from UM.Math.Vector import Vector + from cura import LayerData from cura import LayerDataDecorator @@ -24,12 +26,26 @@ class ProcessSlicedObjectListJob(Job): self._message = message self._scene = Application.getInstance().getController().getScene() self._progress = None + self._abort_requested = False + + ## Aborts the processing of layers. + # + # This abort is made on a best-effort basis, meaning that the actual + # job thread will check once in a while to see whether an abort is + # requested and then stop processing by itself. There is no guarantee + # that the abort will stop the job any time soon or even at all. + def abort(self): + self._abort_requested = True def run(self): if Application.getInstance().getController().getActiveView().getPluginId() == "LayerView": self._progress = Message(catalog.i18nc("@info:status", "Processing Layers"), 0, False, -1) self._progress.show() Job.yieldThread() + if self._abort_requested: + if self._progress: + self._progress.hide() + return Application.getInstance().getController().activeViewChanged.connect(self._onActiveViewChanged) @@ -43,15 +59,13 @@ class ProcessSlicedObjectListJob(Job): else: object_id_map[id(node)] = node Job.yieldThread() + if self._abort_requested: + if self._progress: + self._progress.hide() + return settings = Application.getInstance().getMachineManager().getWorkingProfile() - center = None - if not settings.getSettingValue("machine_center_is_zero"): - center = numpy.array([settings.getSettingValue("machine_width") / 2, 0.0, -settings.getSettingValue("machine_depth") / 2]) - else: - center = numpy.array([0.0, 0.0, 0.0]) - mesh = MeshData() layer_data = LayerData.LayerData() @@ -79,34 +93,50 @@ class ProcessSlicedObjectListJob(Job): points = numpy.fromstring(polygon.points, dtype="i8") # Convert bytearray to numpy array points = points.reshape((-1,2)) # We get a linear list of pairs that make up the points, so make numpy interpret them correctly. - points = numpy.asarray(points, dtype=numpy.float32) - points /= 1000 - points = numpy.insert(points, 1, (layer.height / 1000), axis = 1) - points[:,2] *= -1 + # Create a new 3D-array, copy the 2D points over and insert the right height. + # This uses manual array creation + copy rather than numpy.insert since this is + # faster. + new_points = numpy.empty((len(points), 3), numpy.float32) + new_points[:,0] = points[:,0] + new_points[:,1] = layer.height + new_points[:,2] = -points[:,1] - points -= center - - layer_data.addPolygon(layer.id, polygon.type, points, polygon.line_width) + new_points /= 1000 + layer_data.addPolygon(layer.id, polygon.type, new_points, polygon.line_width) + Job.yieldThread() + Job.yieldThread() current_layer += 1 progress = (current_layer / layer_count) * 100 # TODO: Rebuild the layer data mesh once the layer has been processed. # This needs some work in LayerData so we can add the new layers instead of recreating the entire mesh. + if self._abort_requested: + if self._progress: + self._progress.hide() + return if self._progress: self._progress.setProgress(progress) # We are done processing all the layers we got from the engine, now create a mesh out of the data layer_data.build() + if self._abort_requested: + if self._progress: + self._progress.hide() + return + #Add layerdata decorator to scene node to indicate that the node has layerdata decorator = LayerDataDecorator.LayerDataDecorator() decorator.setLayerData(layer_data) new_node.addDecorator(decorator) new_node.setMeshData(mesh) - new_node.setParent(self._scene.getRoot()) + new_node.setParent(self._scene.getRoot()) #Note: After this we can no longer abort! + + if not settings.getSettingValue("machine_center_is_zero"): + new_node.setPosition(Vector(-settings.getSettingValue("machine_width") / 2, 0.0, settings.getSettingValue("machine_depth") / 2)) if self._progress: self._progress.setProgress(100) @@ -123,6 +153,7 @@ class ProcessSlicedObjectListJob(Job): if Application.getInstance().getController().getActiveView().getPluginId() == "LayerView": if not self._progress: self._progress = Message(catalog.i18nc("@info:status", "Processing Layers"), 0, False, 0) + if self._progress.getProgress() != 100: self._progress.show() else: if self._progress: diff --git a/plugins/CuraEngineBackend/StartSliceJob.py b/plugins/CuraEngineBackend/StartSliceJob.py index b94eac0f9e..7c35bca36b 100644 --- a/plugins/CuraEngineBackend/StartSliceJob.py +++ b/plugins/CuraEngineBackend/StartSliceJob.py @@ -61,6 +61,8 @@ class StartSliceJob(Job): if temp_list: object_groups.append(temp_list) Job.yieldThread() + if len(object_groups) == 0: + Logger.log("w", "No objects suitable for one at a time found, or no correct order found") else: temp_list = [] for node in DepthFirstIterator(self._scene.getRoot()): @@ -79,14 +81,16 @@ class StartSliceJob(Job): self._sendSettings(self._profile) - slice_message = self._socket.createMessage("cura.proto.Slice"); + slice_message = self._socket.createMessage("cura.proto.Slice") for group in object_groups: - group_message = slice_message.addRepeatedMessage("object_lists"); + group_message = slice_message.addRepeatedMessage("object_lists") + if group[0].getParent().callDecoration("isGroup"): + self._handlePerObjectSettings(group[0].getParent(), group_message) for object in group: mesh_data = object.getMeshData().getTransformed(object.getWorldTransformation()) - obj = group_message.addRepeatedMessage("objects"); + obj = group_message.addRepeatedMessage("objects") obj.id = id(object) verts = numpy.array(mesh_data.getVertices()) @@ -142,7 +146,6 @@ class StartSliceJob(Job): object_settings = node.callDecoration("getAllSettingValues") if not object_settings: return - for key, value in object_settings.items(): setting = message.addRepeatedMessage("settings") setting.name = key diff --git a/plugins/GCodeProfileReader/GCodeProfileReader.py b/plugins/GCodeProfileReader/GCodeProfileReader.py index 7c72d0a958..50048d831b 100644 --- a/plugins/GCodeProfileReader/GCodeProfileReader.py +++ b/plugins/GCodeProfileReader/GCodeProfileReader.py @@ -4,6 +4,7 @@ from UM.Application import Application #To get the machine manager to create the new profile in. from UM.Settings.Profile import Profile from UM.Settings.ProfileReader import ProfileReader +from UM.Logger import Logger import re #Regular expressions for parsing escape characters in the settings. ## A class that reads profile data from g-code files. @@ -40,6 +41,9 @@ class GCodeProfileReader(ProfileReader): # specified file was no g-code or contained no parsable profile, \code # None \endcode is returned. def read(self, file_name): + if file_name.split(".")[-1] != "gcode": + return None + prefix = ";SETTING_" + str(GCodeProfileReader.version) + " " prefix_length = len(prefix) @@ -62,6 +66,10 @@ class GCodeProfileReader(ProfileReader): profile = Profile(machine_manager = Application.getInstance().getMachineManager(), read_only = False) try: profile.unserialise(serialised) + profile.setType(None) #Force type to none so it's correctly added. + profile.setReadOnly(False) + profile.setDirty(True) except Exception as e: #Not a valid g-code file. + Logger.log("e", "Unable to serialise the profile: %s", str(e)) return None return profile \ No newline at end of file diff --git a/plugins/GCodeWriter/GCodeWriter.py b/plugins/GCodeWriter/GCodeWriter.py index 28677074cf..0a76a51742 100644 --- a/plugins/GCodeWriter/GCodeWriter.py +++ b/plugins/GCodeWriter/GCodeWriter.py @@ -6,6 +6,7 @@ from UM.Logger import Logger from UM.Application import Application import io import re #For escaping characters in the settings. +import copy class GCodeWriter(MeshWriter): @@ -56,17 +57,18 @@ class GCodeWriter(MeshWriter): def _serialiseProfile(self, profile): prefix = ";SETTING_" + str(GCodeWriter.version) + " " #The prefix to put before each line. prefix_length = len(prefix) - - serialised = profile.serialise() - + + #Serialise a deepcopy to remove the defaults from the profile + serialised = copy.deepcopy(profile).serialise() + #Escape characters that have a special meaning in g-code comments. pattern = re.compile("|".join(GCodeWriter.escape_characters.keys())) serialised = pattern.sub(lambda m: GCodeWriter.escape_characters[re.escape(m.group(0))], serialised) #Perform the replacement with a regular expression. - + #Introduce line breaks so that each comment is no longer than 80 characters. Prepend each line with the prefix. result = "" for pos in range(0, len(serialised), 80 - prefix_length): #Lines have 80 characters, so the payload of each line is 80 - prefix. result += prefix + serialised[pos : pos + 80 - prefix_length] + "\n" serialised = result - + return serialised \ No newline at end of file diff --git a/plugins/ImageReader/ImageReader.py b/plugins/ImageReader/ImageReader.py index f0c49553e6..4aa6a66439 100644 --- a/plugins/ImageReader/ImageReader.py +++ b/plugins/ImageReader/ImageReader.py @@ -33,8 +33,8 @@ class ImageReader(MeshReader): depth = img.height() largest = max(width, depth) - width = width / largest * self._ui.defaultWidth - depth = depth / largest * self._ui.defaultDepth + width = width / largest * self._ui.default_width + depth = depth / largest * self._ui.default_depth self._ui.setWidthAndDepth(width, depth) self._ui.showConfigUI() @@ -112,7 +112,7 @@ class ImageReader(MeshReader): height_data = 1 - height_data for i in range(0, blur_iterations): - copy = numpy.pad(height_data, ((1, 1), (1, 1)), mode='edge') + copy = numpy.pad(height_data, ((1, 1), (1, 1)), mode= "edge") height_data += copy[1:-1, 2:] height_data += copy[1:-1, :-2] @@ -138,7 +138,7 @@ class ImageReader(MeshReader): # initialize to texel space vertex offsets. # 6 is for 6 vertices for each texel quad. - heightmap_vertices = numpy.zeros((width_minus_one * height_minus_one, 6, 3), dtype=numpy.float32) + heightmap_vertices = numpy.zeros((width_minus_one * height_minus_one, 6, 3), dtype = numpy.float32) heightmap_vertices = heightmap_vertices + numpy.array([[ [0, base_height, 0], [0, base_height, texel_height], @@ -146,9 +146,9 @@ class ImageReader(MeshReader): [texel_width, base_height, texel_height], [texel_width, base_height, 0], [0, base_height, 0] - ]], dtype=numpy.float32) + ]], dtype = numpy.float32) - offsetsz, offsetsx = numpy.mgrid[0:height_minus_one, 0:width-1] + offsetsz, offsetsx = numpy.mgrid[0: height_minus_one, 0: width - 1] offsetsx = numpy.array(offsetsx, numpy.float32).reshape(-1, 1) * texel_width offsetsz = numpy.array(offsetsz, numpy.float32).reshape(-1, 1) * texel_height diff --git a/plugins/ImageReader/ImageReaderUI.py b/plugins/ImageReader/ImageReaderUI.py index 8387e91173..68a0c8df09 100644 --- a/plugins/ImageReader/ImageReaderUI.py +++ b/plugins/ImageReader/ImageReaderUI.py @@ -24,12 +24,12 @@ class ImageReaderUI(QObject): self._ui_view = None self.show_config_ui_trigger.connect(self._actualShowConfigUI) - self.defaultWidth = 120 - self.defaultDepth = 120 + self.default_width = 120 + self.default_depth = 120 self._aspect = 1 - self._width = self.defaultWidth - self._depth = self.defaultDepth + self._width = self.default_width + self._depth = self.default_depth self.base_height = 1 self.peak_height = 10 diff --git a/plugins/LayerView/LayerView.py b/plugins/LayerView/LayerView.py index 78917e4e18..9f65a8e783 100644 --- a/plugins/LayerView/LayerView.py +++ b/plugins/LayerView/LayerView.py @@ -10,16 +10,23 @@ from UM.Signal import Signal from UM.Scene.Selection import Selection from UM.Math.Color import Color from UM.Mesh.MeshData import MeshData +from UM.Job import Job +from UM.Message import Message from UM.View.RenderBatch import RenderBatch from UM.View.GL.OpenGL import OpenGL from cura.ConvexHullNode import ConvexHullNode -from PyQt5 import QtCore, QtWidgets +from PyQt5.QtCore import Qt, QTimer +from PyQt5.QtWidgets import QApplication from . import LayerViewProxy +import time +from UM.i18n import i18nCatalog +catalog = i18nCatalog("cura") + ## View used to display g-code paths. class LayerView(View): def __init__(self): @@ -29,27 +36,45 @@ class LayerView(View): self._num_layers = 0 self._layer_percentage = 0 # what percentage of layers need to be shown (SLider gives value between 0 - 100) self._proxy = LayerViewProxy.LayerViewProxy() - self._controller.getScene().sceneChanged.connect(self._onSceneChanged) + self._controller.getScene().getRoot().childrenChanged.connect(self._onSceneChanged) self._max_layers = 10 self._current_layer_num = 10 self._current_layer_mesh = None self._current_layer_jumps = None + self._top_layers_job = None self._activity = False self._solid_layers = 5 + self._top_layer_timer = QTimer() + self._top_layer_timer.setInterval(50) + self._top_layer_timer.setSingleShot(True) + self._top_layer_timer.timeout.connect(self._startUpdateTopLayers) + + self._busy = False + def getActivity(self): return self._activity def getCurrentLayer(self): return self._current_layer_num - + def _onSceneChanged(self, node): self.calculateMaxLayers() - + def getMaxLayers(self): return self._max_layers + busyChanged = Signal() + + def isBusy(self): + return self._busy + + def setBusy(self, busy): + if busy != self._busy: + self._busy = busy + self.busyChanged.emit() + def resetLayerData(self): self._current_layer_mesh = None self._current_layer_jumps = None @@ -89,51 +114,11 @@ class LayerView(View): # This uses glDrawRangeElements internally to only draw a certain range of lines. renderer.queueNode(node, mesh = layer_data, mode = RenderBatch.RenderMode.Lines, range = (start, end)) - # We currently recreate the current "solid" layers every time a - if not self._current_layer_mesh: - self._current_layer_mesh = MeshData() - for i in range(self._solid_layers): - layer = self._current_layer_num - i - if layer < 0: - continue - try: - layer_mesh = layer_data.getLayer(layer).createMesh() - if not layer_mesh or layer_mesh.getVertices() is None: - continue - except: - continue - if self._current_layer_mesh: #Threading thing; Switching between views can cause the current layer mesh to be deleted. - self._current_layer_mesh.addVertices(layer_mesh.getVertices()) - - # Scale layer color by a brightness factor based on the current layer number - # This will result in a range of 0.5 - 1.0 to multiply colors by. - brightness = (2.0 - (i / self._solid_layers)) / 2.0 - if self._current_layer_mesh: - self._current_layer_mesh.addColors(layer_mesh.getColors() * brightness) if self._current_layer_mesh: renderer.queueNode(node, mesh = self._current_layer_mesh) - if not self._current_layer_jumps: - self._current_layer_jumps = MeshData() - for i in range(1): - layer = self._current_layer_num - i - if layer < 0: - continue - try: - layer_mesh = layer_data.getLayer(layer).createJumps() - if not layer_mesh or layer_mesh.getVertices() is None: - continue - except: - continue - - self._current_layer_jumps.addVertices(layer_mesh.getVertices()) - - # Scale layer color by a brightness factor based on the current layer number - # This will result in a range of 0.5 - 1.0 to multiply colors by. - brightness = (2.0 - (i / self._solid_layers)) / 2.0 - self._current_layer_jumps.addColors(layer_mesh.getColors() * brightness) - - renderer.queueNode(node, mesh = self._current_layer_jumps) + if self._current_layer_jumps: + renderer.queueNode(node, mesh = self._current_layer_jumps) def setLayer(self, value): if self._current_layer_num != value: @@ -145,6 +130,9 @@ class LayerView(View): self._current_layer_mesh = None self._current_layer_jumps = None + + self._top_layer_timer.start() + self.currentLayerNumChanged.emit() currentLayerNumChanged = Signal() @@ -177,21 +165,22 @@ class LayerView(View): else: self.setLayer(int(self._max_layers)) self.maxLayersChanged.emit() + self._top_layer_timer.start() maxLayersChanged = Signal() currentLayerNumChanged = Signal() - + ## Hackish way to ensure the proxy is already created, which ensures that the layerview.qml is already created # as this caused some issues. def getProxy(self, engine, script_engine): return self._proxy - + def endRendering(self): pass - + def event(self, event): - modifiers = QtWidgets.QApplication.keyboardModifiers() - ctrl_is_active = modifiers == QtCore.Qt.ControlModifier + modifiers = QApplication.keyboardModifiers() + ctrl_is_active = modifiers == Qt.ControlModifier if event.type == Event.KeyPressEvent and ctrl_is_active: if event.key == KeyEvent.UpKey: self.setLayer(self._current_layer_num + 1) @@ -199,3 +188,86 @@ class LayerView(View): if event.key == KeyEvent.DownKey: self.setLayer(self._current_layer_num - 1) return True + + def _startUpdateTopLayers(self): + if self._top_layers_job: + self._top_layers_job.finished.disconnect(self._updateCurrentLayerMesh) + self._top_layers_job.cancel() + + self.setBusy(True) + + self._top_layers_job = _CreateTopLayersJob(self._controller.getScene(), self._current_layer_num, self._solid_layers) + self._top_layers_job.finished.connect(self._updateCurrentLayerMesh) + self._top_layers_job.start() + + def _updateCurrentLayerMesh(self, job): + self.setBusy(False) + + if not job.getResult(): + return + + self._current_layer_mesh = job.getResult().get("layers") + self._current_layer_jumps = job.getResult().get("jumps") + self._controller.getScene().sceneChanged.emit(self._controller.getScene().getRoot()) + + self._top_layers_job = None + +class _CreateTopLayersJob(Job): + def __init__(self, scene, layer_number, solid_layers): + super().__init__() + + self._scene = scene + self._layer_number = layer_number + self._solid_layers = solid_layers + self._cancel = False + + def run(self): + layer_data = None + for node in DepthFirstIterator(self._scene.getRoot()): + layer_data = node.callDecoration("getLayerData") + if layer_data: + break + + if self._cancel or not layer_data: + return + + layer_mesh = MeshData() + for i in range(self._solid_layers): + layer_number = self._layer_number - i + if layer_number < 0: + continue + + try: + layer = layer_data.getLayer(layer_number).createMesh() + except Exception as e: + print(e) + return + + if not layer or layer.getVertices() is None: + continue + + layer_mesh.addVertices(layer.getVertices()) + + # Scale layer color by a brightness factor based on the current layer number + # This will result in a range of 0.5 - 1.0 to multiply colors by. + brightness = (2.0 - (i / self._solid_layers)) / 2.0 + layer_mesh.addColors(layer.getColors() * brightness) + + if self._cancel: + return + + Job.yieldThread() + + if self._cancel: + return + + Job.yieldThread() + jump_mesh = layer_data.getLayer(self._layer_number).createJumps() + if not jump_mesh or jump_mesh.getVertices() is None: + jump_mesh = None + + self.setResult({ "layers": layer_mesh, "jumps": jump_mesh }) + + def cancel(self): + self._cancel = True + super().cancel() diff --git a/plugins/LayerView/LayerView.qml b/plugins/LayerView/LayerView.qml index ad363af4aa..e1fc398da5 100644 --- a/plugins/LayerView/LayerView.qml +++ b/plugins/LayerView/LayerView.qml @@ -8,37 +8,98 @@ import QtQuick.Controls.Styles 1.1 import UM 1.0 as UM -Item +Item { - width: UM.Theme.sizes.button.width - height: UM.Theme.sizes.slider_layerview_size.height + width: UM.Theme.getSize("button").width + height: UM.Theme.getSize("slider_layerview_size").height - Slider + Slider { id: slider - width: UM.Theme.sizes.slider_layerview_size.width - height: UM.Theme.sizes.slider_layerview_size.height + width: UM.Theme.getSize("slider_layerview_size").width + height: UM.Theme.getSize("slider_layerview_size").height anchors.left: parent.left - anchors.leftMargin: UM.Theme.sizes.slider_layerview_margin.width/2 + anchors.leftMargin: UM.Theme.getSize("slider_layerview_margin").width/2 orientation: Qt.Vertical minimumValue: 0; maximumValue: UM.LayerView.numLayers; stepSize: 1 + property real pixelsPerStep: ((height - UM.Theme.getSize("slider_handle").height) / (maximumValue - minimumValue)) * stepSize; + value: UM.LayerView.currentLayer onValueChanged: UM.LayerView.setCurrentLayer(value) - style: UM.Theme.styles.layerViewSlider + style: UM.Theme.styles.slider; + + Rectangle + { + x: parent.width + UM.Theme.getSize("slider_layerview_background").width / 2; + y: parent.height - (parent.value * parent.pixelsPerStep) - UM.Theme.getSize("slider_handle").height * 1.25; + + height: UM.Theme.getSize("slider_handle").height + UM.Theme.getSize("default_margin").height + width: valueLabel.width + UM.Theme.getSize("default_margin").width + Behavior on height { NumberAnimation { duration: 50; } } + + border.width: UM.Theme.getSize("default_lining").width; + border.color: UM.Theme.getColor("slider_groove_border"); + + visible: UM.LayerView.getLayerActivity && Printer.getPlatformActivity ? true : false + + TextField + { + id: valueLabel + property string maxValue: slider.maximumValue + 1 + text: slider.value + 1 + horizontalAlignment: TextInput.AlignRight; + onEditingFinished: + { + if(valueLabel.text != '') + { + slider.value = valueLabel.text - 1 + } + } + validator: IntValidator { bottom: 1; top: slider.maximumValue + 1; } + + anchors.left: parent.left; + anchors.leftMargin: UM.Theme.getSize("default_margin").width / 2; + anchors.verticalCenter: parent.verticalCenter; + + width: UM.Theme.getSize("line").width * maxValue.length; + + style: TextFieldStyle + { + textColor: UM.Theme.getColor("setting_control_text"); + font: UM.Theme.getFont("default"); + background: Item { } + } + } + + BusyIndicator + { + id: busyIndicator; + anchors.left: parent.right; + anchors.leftMargin: UM.Theme.getSize("default_margin").width / 2; + anchors.verticalCenter: parent.verticalCenter; + + width: UM.Theme.getSize("slider_handle").height; + height: width; + + running: UM.LayerView.busy; + visible: UM.LayerView.busy; + } + } } + Rectangle { anchors.left: parent.left anchors.verticalCenter: parent.verticalCenter z: slider.z - 1 - width: UM.Theme.sizes.slider_layerview_background.width - height: slider.height + UM.Theme.sizes.default_margin.height * 2 - color: UM.Theme.colors.tool_panel_background; - border.width: UM.Theme.sizes.default_lining.width - border.color: UM.Theme.colors.lining + width: UM.Theme.getSize("slider_layerview_background").width + height: slider.height + UM.Theme.getSize("default_margin").height * 2 + color: UM.Theme.getColor("tool_panel_background"); + border.width: UM.Theme.getSize("default_lining").width + border.color: UM.Theme.getColor("lining") MouseArea { id: sliderMouseArea diff --git a/plugins/LayerView/LayerViewProxy.py b/plugins/LayerView/LayerViewProxy.py index 3d4d1d8278..bb9554ebf1 100644 --- a/plugins/LayerView/LayerViewProxy.py +++ b/plugins/LayerView/LayerViewProxy.py @@ -33,6 +33,15 @@ class LayerViewProxy(QObject): active_view = self._controller.getActiveView() if type(active_view) == LayerView.LayerView.LayerView: return active_view.getCurrentLayer() + + busyChanged = pyqtSignal() + @pyqtProperty(bool, notify = busyChanged) + def busy(self): + active_view = self._controller.getActiveView() + if type(active_view) == LayerView.LayerView.LayerView: + return active_view.isBusy() + + return False @pyqtSlot(int) def setCurrentLayer(self, layer_num): @@ -49,9 +58,13 @@ class LayerViewProxy(QObject): def _onMaxLayersChanged(self): self.maxLayersChanged.emit() + + def _onBusyChanged(self): + self.busyChanged.emit() def _onActiveViewChanged(self): active_view = self._controller.getActiveView() if type(active_view) == LayerView.LayerView.LayerView: active_view.currentLayerNumChanged.connect(self._onLayerChanged) active_view.maxLayersChanged.connect(self._onMaxLayersChanged) + active_view.busyChanged.connect(self._onBusyChanged) diff --git a/plugins/LegacyProfileReader/LegacyProfileReader.py b/plugins/LegacyProfileReader/LegacyProfileReader.py index 6b5a4a3aca..661646bf64 100644 --- a/plugins/LegacyProfileReader/LegacyProfileReader.py +++ b/plugins/LegacyProfileReader/LegacyProfileReader.py @@ -63,9 +63,10 @@ class LegacyProfileReader(ProfileReader): # file could not be read or didn't contain a valid profile, \code None # \endcode is returned. def read(self, file_name): + if file_name.split(".")[-1] != "ini": + return None Logger.log("i", "Importing legacy profile from file " + file_name + ".") profile = Profile(machine_manager = Application.getInstance().getMachineManager(), read_only = False) #Create an empty profile. - profile.setName("Imported Legacy Profile") parser = configparser.ConfigParser(interpolation = None) try: @@ -123,5 +124,5 @@ class LegacyProfileReader(ProfileReader): if len(profile.getChangedSettings()) == 0: Logger.log("i", "A legacy profile was imported but everything evaluates to the defaults, creating an empty profile.") - + profile.setDirty(True) return profile \ No newline at end of file diff --git a/plugins/PerObjectSettingsTool/PerObjectSettingsModel.py b/plugins/PerObjectSettingsTool/PerObjectSettingsModel.py index 97b769e65f..7f7cef049b 100644 --- a/plugins/PerObjectSettingsTool/PerObjectSettingsModel.py +++ b/plugins/PerObjectSettingsTool/PerObjectSettingsModel.py @@ -70,7 +70,7 @@ class PerObjectSettingsModel(ListModel): def _updateModel(self): self.clear() for node in BreadthFirstIterator(self._root): - if type(node) is not SceneNode or not node.getMeshData() or not node.isSelectable(): + if type(node) is not SceneNode or not node.isSelectable(): continue node_profile = node.callDecoration("getProfile") if not node_profile: diff --git a/plugins/PerObjectSettingsTool/PerObjectSettingsPanel.qml b/plugins/PerObjectSettingsTool/PerObjectSettingsPanel.qml index 41f9bdd779..85d631b82f 100644 --- a/plugins/PerObjectSettingsTool/PerObjectSettingsPanel.qml +++ b/plugins/PerObjectSettingsTool/PerObjectSettingsPanel.qml @@ -22,34 +22,12 @@ Item { anchors.top: parent.top; anchors.left: parent.left; - spacing: UM.Theme.sizes.default_margin.height; - - UM.SettingItem { - id: profileSelection - - width: UM.Theme.sizes.setting.width; - height: UM.Theme.sizes.setting.height; - - name: catalog.i18nc("@label", "Object profile") - type: "enum" - indent: false - - style: UM.Theme.styles.setting_item; - - options: UM.ProfilesModel { addUseGlobal: true } - - value: UM.ActiveTool.properties.getValue("Model").getItem(base.currentIndex).profile - - onItemValueChanged: { - var item = UM.ActiveTool.properties.getValue("Model").getItem(base.currentIndex); - UM.ActiveTool.properties.getValue("Model").setObjectProfile(item.id, value) - } - } + spacing: UM.Theme.getSize("default_margin").height; Column { id: customisedSettings - spacing: UM.Theme.sizes.default_lining.height; - width: UM.Theme.sizes.setting.width + UM.Theme.sizes.setting.height/2; + spacing: UM.Theme.getSize("default_lining").height; + width: UM.Theme.getSize("setting").width + UM.Theme.getSize("setting").height/2; Repeater { id: settings; @@ -57,8 +35,8 @@ Item { model: UM.ActiveTool.properties.getValue("Model").getItem(base.currentIndex).settings UM.SettingItem { - width: UM.Theme.sizes.setting.width; - height: UM.Theme.sizes.setting.height; + width: UM.Theme.getSize("setting").width; + height: UM.Theme.getSize("setting").height; name: model.label; type: model.type; @@ -66,6 +44,7 @@ Item { description: model.description; unit: model.unit; valid: model.valid; + visible: !model.global_only options: model.options indent: false @@ -79,8 +58,8 @@ Item { { anchors.left: parent.right; - width: UM.Theme.sizes.setting.height; - height: UM.Theme.sizes.setting.height; + width: UM.Theme.getSize("setting").height; + height: UM.Theme.getSize("setting").height; onClicked: UM.ActiveTool.properties.getValue("Model").removeSettingOverride(UM.ActiveTool.properties.getValue("Model").getItem(base.currentIndex).id, model.key) @@ -97,8 +76,8 @@ Item { height: parent.height/2 sourceSize.width: width sourceSize.height: width - color: control.hovered ? UM.Theme.colors.setting_control_button_hover : UM.Theme.colors.setting_control_button - source: UM.Theme.icons.cross1 + color: control.hovered ? UM.Theme.getColor("setting_control_button_hover") : UM.Theme.getColor("setting_control_button") + source: UM.Theme.getIcon("cross1") } } } @@ -110,8 +89,7 @@ Item { Button { id: customise_settings_button; - anchors.right: profileSelection.right; - height: UM.Theme.sizes.setting.height; + height: UM.Theme.getSize("setting").height; visible: parseInt(UM.Preferences.getValue("cura/active_mode")) == 1 text: catalog.i18nc("@action:button", "Add Setting"); @@ -122,16 +100,16 @@ Item { { width: control.width; height: control.height; - border.width: UM.Theme.sizes.default_lining.width; - border.color: control.pressed ? UM.Theme.colors.action_button_active_border : - control.hovered ? UM.Theme.colors.action_button_hovered_border : UM.Theme.colors.action_button_border - color: control.pressed ? UM.Theme.colors.action_button_active : - control.hovered ? UM.Theme.colors.action_button_hovered : UM.Theme.colors.action_button + border.width: UM.Theme.getSize("default_lining").width; + border.color: control.pressed ? UM.Theme.getColor("action_button_active_border") : + control.hovered ? UM.Theme.getColor("action_button_hovered_border") : UM.Theme.getColor("action_button_border") + color: control.pressed ? UM.Theme.getColor("action_button_active") : + control.hovered ? UM.Theme.getColor("action_button_hovered") : UM.Theme.getColor("action_button") } label: Label { text: control.text; - color: UM.Theme.colors.setting_control_text; + color: UM.Theme.getColor("setting_control_text"); anchors.centerIn: parent } } @@ -180,7 +158,7 @@ Item { } Column { - width: view.width - UM.Theme.sizes.default_margin.width * 2; + width: view.width - UM.Theme.getSize("default_margin").width * 2; height: childrenRect.height; Repeater { @@ -211,11 +189,11 @@ Item { } label: Row { - spacing: UM.Theme.sizes.default_margin.width; + spacing: UM.Theme.getSize("default_margin").width; Image { anchors.verticalCenter: parent.verticalCenter; - source: control.checked ? UM.Theme.icons.arrow_right : UM.Theme.icons.arrow_bottom; + source: control.checked ? UM.Theme.getIcon("arrow_right") : UM.Theme.getIcon("arrow_bottom"); } Label { @@ -259,7 +237,7 @@ Item { delegate: ToolButton { id: button; - x: model.depth * UM.Theme.sizes.default_margin.width; + x: model.depth * UM.Theme.getSize("default_margin").width; text: model.name; tooltip: model.description; visible: !model.global_only diff --git a/plugins/PerObjectSettingsTool/PerObjectSettingsTool.py b/plugins/PerObjectSettingsTool/PerObjectSettingsTool.py index d12d66a0e8..70b3d8bbe8 100644 --- a/plugins/PerObjectSettingsTool/PerObjectSettingsTool.py +++ b/plugins/PerObjectSettingsTool/PerObjectSettingsTool.py @@ -5,6 +5,7 @@ from UM.Tool import Tool from UM.Scene.Selection import Selection from UM.Application import Application from UM.Qt.ListModel import ListModel +from UM.Preferences import Preferences from . import PerObjectSettingsModel @@ -15,6 +16,9 @@ class PerObjectSettingsTool(Tool): self.setExposedProperties("Model", "SelectedIndex") + Preferences.getInstance().preferenceChanged.connect(self._onPreferenceChanged) + self._onPreferenceChanged("cura/active_mode") + def event(self, event): return False @@ -27,6 +31,17 @@ class PerObjectSettingsTool(Tool): return PerObjectSettingsModel.PerObjectSettingsModel(self._model) def getSelectedIndex(self): - selected_object_id = id(Selection.getSelectedObject(0)) + try: + selected_object = Selection.getSelectedObject(0) + if selected_object.getParent().callDecoration("isGroup"): + selected_object = selected_object.getParent() + except: + selected_object = None + selected_object_id = id(selected_object) index = self.getModel().find("id", selected_object_id) - return index \ No newline at end of file + return index + + def _onPreferenceChanged(self, preference): + if preference == "cura/active_mode": + enabled = Preferences.getInstance().getValue(preference)==1 + Application.getInstance().getController().toolEnabledChanged.emit(self._plugin_id, enabled) \ No newline at end of file diff --git a/plugins/PerObjectSettingsTool/SettingOverrideModel.py b/plugins/PerObjectSettingsTool/SettingOverrideModel.py index 74696f0ee6..860650015c 100644 --- a/plugins/PerObjectSettingsTool/SettingOverrideModel.py +++ b/plugins/PerObjectSettingsTool/SettingOverrideModel.py @@ -18,6 +18,7 @@ class SettingOverrideModel(ListModel): OptionsRole = Qt.UserRole + 8 WarningDescriptionRole = Qt.UserRole + 9 ErrorDescriptionRole = Qt.UserRole + 10 + GlobalOnlyRole = Qt.UserRole + 11 def __init__(self, node, parent = None): super().__init__(parent) @@ -28,6 +29,10 @@ class SettingOverrideModel(ListModel): self._node.decoratorsChanged.connect(self._onDecoratorsChanged) self._onDecoratorsChanged(None) + self._activeProfile = Application.getInstance().getMachineManager().getWorkingProfile() #To be able to get notified when a setting changes. + self._activeProfile.settingValueChanged.connect(self._onProfileSettingValueChanged) + Application.getInstance().getMachineManager().activeProfileChanged.connect(self._onProfileChanged) + self.addRoleName(self.KeyRole, "key") self.addRoleName(self.LabelRole, "label") self.addRoleName(self.DescriptionRole, "description") @@ -38,6 +43,7 @@ class SettingOverrideModel(ListModel): self.addRoleName(self.OptionsRole, "options") self.addRoleName(self.WarningDescriptionRole, "warning_description") self.addRoleName(self.ErrorDescriptionRole, "error_description") + self.addRoleName(self.GlobalOnlyRole, "global_only") @pyqtSlot(str, "QVariant") def setSettingValue(self, key, value): @@ -68,6 +74,35 @@ class SettingOverrideModel(ListModel): model.appendItem({"value": str(value), "name": str(name)}) return model + ## Updates the active profile in this model if the active profile is + # changed. + # + # This links the settingValueChanged of the new profile to this model's + # _onSettingValueChanged function, so that it properly listens to those + # events again. + def _onProfileChanged(self): + if self._activeProfile: #Unlink from the old profile. + self._activeProfile.settingValueChanged.disconnect(self._onProfileSettingValueChanged) + old_profile = self._activeProfile + self._activeProfile = Application.getInstance().getMachineManager().getWorkingProfile() + self._activeProfile.settingValueChanged.connect(self._onProfileSettingValueChanged) #Re-link to the new profile. + for setting_name in old_profile.getChangedSettings().keys(): #Update all changed settings in the old and new profiles. + self._onProfileSettingValueChanged(setting_name) + for setting_name in self._activeProfile.getChangedSettings().keys(): + self._onProfileSettingValueChanged(setting_name) + + ## Updates the global_only property of a setting once a setting value + # changes. + # + # This method should only get called on settings that are dependent on the + # changed setting. + # + # \param setting_name The setting that needs to be updated. + def _onProfileSettingValueChanged(self, setting_name): + index = self.find("key", setting_name) + if index != -1: + self.setProperty(index, "global_only", Application.getInstance().getMachineManager().getActiveMachineInstance().getMachineDefinition().getSetting(setting_name).getGlobalOnly()) + def _onSettingsChanged(self): self.clear() @@ -84,7 +119,8 @@ class SettingOverrideModel(ListModel): "valid": setting.validate(value), "options": self._createOptionsModel(setting.getOptions()), "warning_description": setting.getWarningDescription(), - "error_description": setting.getErrorDescription() + "error_description": setting.getErrorDescription(), + "global_only": setting.getGlobalOnly() }) items.sort(key = lambda i: i["key"]) @@ -98,3 +134,4 @@ class SettingOverrideModel(ListModel): if index != -1: self.setProperty(index, "value", str(value)) self.setProperty(index, "valid", setting.validate(value)) + self.setProperty(index, "global_only", setting.getGlobalOnly()) \ No newline at end of file diff --git a/plugins/SolidView/SolidView.py b/plugins/SolidView/SolidView.py index beb2780d14..607455c7b3 100644 --- a/plugins/SolidView/SolidView.py +++ b/plugins/SolidView/SolidView.py @@ -33,14 +33,17 @@ class SolidView(View): if not self._disabled_shader: self._disabled_shader = OpenGL.getInstance().createShaderProgram(Resources.getPath(Resources.Shaders, "overhang.shader")) self._disabled_shader.setUniformValue("u_diffuseColor", [0.68, 0.68, 0.68, 1.0]) + self._disabled_shader.setUniformValue("u_overhangAngle", math.cos(math.radians(0))) if Application.getInstance().getMachineManager().getWorkingProfile(): profile = Application.getInstance().getMachineManager().getWorkingProfile() - if profile.getSettingValue("support_enable") or not Preferences.getInstance().getValue("view/show_overhang"): + if Preferences.getInstance().getValue("view/show_overhang"): angle = profile.getSettingValue("support_angle") if angle != None: self._enabled_shader.setUniformValue("u_overhangAngle", math.cos(math.radians(90 - angle))) + else: + self._enabled_shader.setUniformValue("u_overhangAngle", math.cos(math.radians(0))) #Overhang angle of 0 causes no area at all to be marked as overhang. else: self._enabled_shader.setUniformValue("u_overhangAngle", math.cos(math.radians(0))) diff --git a/plugins/USBPrinting/ControlWindow.qml b/plugins/USBPrinting/ControlWindow.qml index efe1e21b25..553da23fed 100644 --- a/plugins/USBPrinting/ControlWindow.qml +++ b/plugins/USBPrinting/ControlWindow.qml @@ -21,7 +21,7 @@ UM.Dialog anchors.fill: parent; Row { - spacing: UM.Theme.sizes.default_margin.width; + spacing: UM.Theme.getSize("default_margin").width; Text { //: USB Printing dialog label, %1 is head temperature diff --git a/plugins/USBPrinting/FirmwareUpdateWindow.qml b/plugins/USBPrinting/FirmwareUpdateWindow.qml index 4ab1020a3a..e8f532d24a 100644 --- a/plugins/USBPrinting/FirmwareUpdateWindow.qml +++ b/plugins/USBPrinting/FirmwareUpdateWindow.qml @@ -52,12 +52,13 @@ UM.Dialog wrapMode: Text.Wrap; } - ProgressBar + ProgressBar { - id: prog; + id: prog value: manager.progress - minimumValue: 0; - maximumValue: 100; + minimumValue: 0 + maximumValue: 100 + indeterminate: manager.progress < 100 anchors { left: parent.left; @@ -65,7 +66,7 @@ UM.Dialog } } - + SystemPalette { id: palette; diff --git a/plugins/USBPrinting/USBPrinterManager.py b/plugins/USBPrinting/USBPrinterManager.py index 88c696c2c9..3a2beab0c8 100644 --- a/plugins/USBPrinting/USBPrinterManager.py +++ b/plugins/USBPrinting/USBPrinterManager.py @@ -106,6 +106,7 @@ class USBPrinterManager(QObject, SignalEmitter, OutputDevicePlugin, Extension): try: self._printer_connections[printer_connection].updateFirmware(Resources.getPath(CuraApplication.ResourceTypes.Firmware, self._getDefaultFirmwareName())) except FileNotFoundError: + self._printer_connections[printer_connection].setProgress(100, 100) Logger.log("w", "No firmware found for printer %s", printer_connection) continue @@ -132,31 +133,38 @@ class USBPrinterManager(QObject, SignalEmitter, OutputDevicePlugin, Extension): return USBPrinterManager._instance def _getDefaultFirmwareName(self): - machine_type = Application.getInstance().getMachineManager().getActiveMachineInstance().getMachineDefinition().getId() - firmware_name = "" + machine_instance = Application.getInstance().getMachineManager().getActiveMachineInstance() + machine_type = machine_instance.getMachineDefinition().getId() baudrate = 250000 if sys.platform.startswith("linux"): baudrate = 115200 if machine_type == "ultimaker_original": firmware_name = "MarlinUltimaker" + if machine_instance.getMachineSettingValue("machine_heated_bed"): #Has heated bed upgrade kit? + firmware_name += "-HBK" firmware_name += "-%d" % (baudrate) + return firmware_name + ".hex" elif machine_type == "ultimaker_original_plus": firmware_name = "MarlinUltimaker-UMOP-%d" % (baudrate) - elif machine_type == "Witbox": + return firmware_name + ".hex" + elif machine_type == "bq_witbox": return "MarlinWitbox.hex" - elif machine_type == "ultimaker2go": + elif machine_type == "ultimaker2_go": return "MarlinUltimaker2go.hex" - elif machine_type == "ultimaker2extended": + elif machine_type == "ultimaker2_extended": return "MarlinUltimaker2extended.hex" elif machine_type == "ultimaker2": return "MarlinUltimaker2.hex" + elif machine_type == "ultimaker2plus": + return "MarlinUltimaker2plus.hex" + elif machine_type == "ultimaker2_extended_plus": + return "MarlinUltimaker2extended-plus.hex" + else: + Logger.log("e", "I don't know of any firmware for machine %s.", machine_type) + raise FileNotFoundError() ##TODO: Add check for multiple extruders - if firmware_name != "": - firmware_name += ".hex" - return firmware_name - def _addRemovePorts(self, serial_ports): # First, find and add all new or changed keys for serial_port in list(serial_ports): diff --git a/resources/images/Ultimaker2ExtendedPlusbackplate.png b/resources/images/Ultimaker2ExtendedPlusbackplate.png new file mode 100644 index 0000000000..264e95b698 Binary files /dev/null and b/resources/images/Ultimaker2ExtendedPlusbackplate.png differ diff --git a/resources/images/Ultimaker2Extendedbackplate.png b/resources/images/Ultimaker2Extendedbackplate.png index a9c65585d3..e4590a9db4 100644 Binary files a/resources/images/Ultimaker2Extendedbackplate.png and b/resources/images/Ultimaker2Extendedbackplate.png differ diff --git a/resources/images/Ultimaker2Plusbackplate.png b/resources/images/Ultimaker2Plusbackplate.png new file mode 100644 index 0000000000..ee5e41153a Binary files /dev/null and b/resources/images/Ultimaker2Plusbackplate.png differ diff --git a/resources/images/ultimaker2plus_backplate.png b/resources/images/ultimaker2plus_backplate.png deleted file mode 100644 index bb431c316a..0000000000 Binary files a/resources/images/ultimaker2plus_backplate.png and /dev/null differ diff --git a/resources/machines/RigidBot.json b/resources/machines/RigidBot.json index d3e8c845a3..9fd47a19c0 100644 --- a/resources/machines/RigidBot.json +++ b/resources/machines/RigidBot.json @@ -1,5 +1,5 @@ { - "id": "rigidbotbig", + "id": "rigidbot", "version": 1, "name": "RigidBot", "manufacturer": "Other", @@ -8,7 +8,7 @@ "file_formats": "text/x-gcode", "inherits": "fdmprinter.json", - "overrides": { + "machine_settings": { "machine_width": { "default": 254 }, "machine_depth": { "default": 254 }, @@ -32,8 +32,10 @@ }, "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 }, @@ -49,7 +51,7 @@ "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 }, + "speed_layer_0": { "min_value": "0.1", "default": 15.0, "visible": true }, "infill_overlap": { "default": 0.04, "inherit_function": "0.1 * line_width if infill_sparse_density < 95 else 0" }, "cool_fan_enabled": { "default": false, "visible": true }, "cool_fan_speed": { "default": 0.0, "visible": true }, diff --git a/resources/machines/RigidBotBig.json b/resources/machines/RigidBotBig.json index f9e552fc59..2a730375cc 100644 --- a/resources/machines/RigidBotBig.json +++ b/resources/machines/RigidBotBig.json @@ -8,7 +8,7 @@ "file_formats": "text/x-gcode", "inherits": "fdmprinter.json", - "overrides": { + "machine_settings": { "machine_width": { "default": 400 }, "machine_depth": { "default": 300 }, @@ -30,8 +30,10 @@ }, "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 }, @@ -47,8 +49,8 @@ "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": 0.04, "inherit_function": "0.1 * line_width if infill_sparse_density < 95 else 0" }, + "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" } }, diff --git a/resources/machines/dual_extrusion_printer.json b/resources/machines/dual_extrusion_printer.json index a37d0d7718..93fd43c957 100644 --- a/resources/machines/dual_extrusion_printer.json +++ b/resources/machines/dual_extrusion_printer.json @@ -45,7 +45,8 @@ "max_value_warning": "150", "default": 60, "visible": false, - "enabled": "prime_tower_enable" + "enabled": "prime_tower_enable", + "global_only": true } } }, @@ -61,7 +62,8 @@ "default": 0.4, "type": "float", "visible": false, - "enabled": "prime_tower_enable" + "enabled": "prime_tower_enable", + "global_only": true } } } @@ -88,7 +90,8 @@ "type": "int", "default": 0, "min_value": "0", - "max_value": "16" + "max_value": "16", + "global_only": true }, "support_extruder_nr": { "label": "Support Extruder", @@ -97,6 +100,7 @@ "default": 0, "min_value": "0", "max_value": "16", + "global_only": true, "children": { "support_infill_extruder_nr": { "label": "Support Infill Extruder", @@ -104,7 +108,8 @@ "type": "int", "default": 0, "min_value": "0", - "max_value": "16" + "max_value": "16", + "global_only": true }, "support_extruder_nr_layer_0": { "label": "First Layer Support Extruder", @@ -112,7 +117,8 @@ "type": "int", "default": 0, "min_value": "0", - "max_value": "16" + "max_value": "16", + "global_only": true }, "support_roof_extruder_nr": { "label": "Support Roof Extruder", @@ -122,6 +128,7 @@ "min_value": "0", "max_value": "16", "enabled": "support_roof_enable" + "global_only": true } } } @@ -132,7 +139,8 @@ "description": "Print a tower next to the print which serves to prime the material after each nozzle switch.", "type": "boolean", "visible": true, - "default": false + "default": false, + "global_only": true }, "prime_tower_size": { "label": "Prime Tower Size", @@ -144,7 +152,8 @@ "min_value": "0", "max_value_warning": "20", "inherit_function": "15 if prime_tower_enable else 0", - "enabled": "prime_tower_enable" + "enabled": "prime_tower_enable", + "global_only": true }, "prime_tower_position_x": { "label": "Prime Tower X Position", @@ -155,7 +164,8 @@ "default": 200, "min_value_warning": "-1000", "max_value_warning": "1000", - "enabled": "prime_tower_enable" + "enabled": "prime_tower_enable", + "global_only": true }, "prime_tower_position_y": { "label": "Prime Tower Y Position", @@ -166,7 +176,8 @@ "default": 200, "min_value_warning": "-1000", "max_value_warning": "1000", - "enabled": "prime_tower_enable" + "enabled": "prime_tower_enable", + "global_only": true }, "prime_tower_flow": { "label": "Prime Tower Flow", @@ -178,14 +189,16 @@ "min_value": "5", "min_value_warning": "50", "max_value_warning": "150", - "enabled": "prime_tower_enable" + "enabled": "prime_tower_enable", + "global_only": 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, - "enabled": "prime_tower_enable" + "enabled": "prime_tower_enable", + "global_only": true }, "multiple_mesh_overlap": { "label": "Dual Extrusion Overlap", @@ -195,13 +208,15 @@ "unit": "mm", "default": 0.15, "min_value": "0", - "max_value_warning": "1.0" + "max_value_warning": "1.0", + "global_only": 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 + "default": false, + "global_only": true }, "ooze_shield_angle": { "label": "Ooze Shield Angle", @@ -212,7 +227,8 @@ "max_value": "90", "default": 60, "visible": false, - "enabled": "ooze_shield_enabled" + "enabled": "ooze_shield_enabled", + "global_only": true }, "ooze_shield_dist": { "label": "Ooze Shields Distance", @@ -223,12 +239,24 @@ "max_value_warning": "30", "default": 2, "visible": false, - "enabled": "ooze_shield_enabled" + "enabled": "ooze_shield_enabled", + "global_only": true } } }, "material": { - "settings": { + "settings": { + "material_standby_temperature": { + "label": "Standby Temperature", + "description": "The temperature of the nozzle when another nozzle is currently used for printing.", + "unit": "°C", + "type": "float", + "default": 150, + "min_value": "0", + "max_value_warning": "260", + "global_only": "True", + "visible": false + }, "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.", @@ -239,7 +267,8 @@ "max_value_warning": "100", "visible": false, "inherit_function": "machine_heat_zone_length", - "enabled": "retraction_enable" + "enabled": "retraction_enable", + "global_only": true }, "switch_extruder_retraction_speeds": { "label": "Nozzle Switch Retraction Speed", @@ -252,6 +281,7 @@ "visible": false, "inherit": false, "enabled": "retraction_enable", + "global_only": true, "children": { "switch_extruder_retraction_speed": { "label": "Nozzle Switch Retract Speed", @@ -262,7 +292,8 @@ "min_value": "0.1", "max_value_warning": "300", "visible": false, - "enabled": "retraction_enable" + "enabled": "retraction_enable", + "global_only": true }, "switch_extruder_prime_speed": { "label": "Nozzle Switch Prime Speed", @@ -273,7 +304,8 @@ "min_value": "0.1", "max_value_warning": "300", "visible": false, - "enabled": "retraction_enable" + "enabled": "retraction_enable", + "global_only": true } } } diff --git a/resources/machines/fdmprinter.json b/resources/machines/fdmprinter.json index 253dee010b..b96385c7bc 100644 --- a/resources/machines/fdmprinter.json +++ b/resources/machines/fdmprinter.json @@ -182,7 +182,7 @@ "machine": { "label": "Machine", "visible": true, - "icon": "category_layer_height", + "icon": "category_machine", "settings": { "machine_nozzle_size": { "label": "Nozzle Diameter", @@ -210,8 +210,8 @@ "default": 0.1, "min_value": "0.001", "min_value_warning": "0.04", - "max_value_warning": "0.32", - "global_only": "print_sequence != \"one_at_a_time\"" + "max_value_warning": "0.8 * machine_nozzle_size", + "global_only": "True" }, "layer_height_0": { "label": "Initial Layer Height", @@ -221,9 +221,9 @@ "default": 0.3, "min_value": "0.001", "min_value_warning": "0.04", - "max_value_warning": "0.32", + "max_value_warning": "0.8 * machine_nozzle_size", "visible": false, - "global_only": "print_sequence != \"one_at_a_time\"" + "global_only": "True" }, "line_width": { "label": "Line Width", @@ -231,7 +231,7 @@ "unit": "mm", "min_value": "0.0001", "min_value_warning": "0.2", - "max_value_warning": "5", + "max_value_warning": "2 * machine_nozzle_size", "default": 0.4, "type": "float", "visible": false, @@ -281,7 +281,8 @@ "max_value_warning": "5", "default": 0.4, "type": "float", - "visible": false + "visible": false, + "global_only": true }, "skin_line_width": { "label": "Top/bottom line width", @@ -315,7 +316,8 @@ "default": 0.4, "type": "float", "visible": false, - "enabled": "support_enable" + "enabled": "support_enable", + "global_only": true }, "support_roof_line_width": { "label": "Support Roof line width", @@ -326,7 +328,8 @@ "max_value_warning": "machine_nozzle_size * 2", "type": "float", "visible": false, - "enabled": "support_roof_enable" + "enabled": "support_roof_enable", + "global_only": true } } } @@ -346,6 +349,7 @@ "min_value": "0", "min_value_warning": "0.2", "max_value_warning": "5", + "visible": false, "children": { "wall_thickness": { "label": "Wall Thickness", @@ -356,7 +360,7 @@ "min_value_warning": "0.2", "max_value_warning": "5", "type": "float", - "visible": false, + "visible": true, "children": { "wall_line_count": { "label": "Wall Line Count", @@ -365,7 +369,7 @@ "min_value": "0", "type": "int", "visible": false, - "inherit_function": "max(1, round((wall_thickness - wall_line_width_0) / wall_line_width_x) + 1)" + "inherit_function": "1 if magic_spiralize else max(1, round((wall_thickness - wall_line_width_0) / wall_line_width_x) + 1)" } } }, @@ -386,7 +390,7 @@ "max_value": "5", "min_value_warning": "0.6", "type": "float", - "visible": false, + "visible": true, "children": { "top_thickness": { "label": "Top Thickness", @@ -463,7 +467,7 @@ "label": "Compensate Wall Overlaps", "description": "Compensate the flow for parts of a wall being laid down where there already is a piece of a wall. These overlaps occur in thin pieces in a model. Gcode generation might be slowed down considerably.", "type": "boolean", - "default": false, + "default": true, "visible": false }, "fill_perimeter_gaps": { @@ -630,7 +634,9 @@ "description": "Change the temperature for each layer automatically with the average flow speed of that layer.", "type": "boolean", "default": false, - "visible": true + "visible": false, + "enabled": "False", + "global_only": true }, "material_print_temperature": { "label": "Printing Temperature", @@ -648,7 +654,8 @@ "unit": "", "type": "string", "default": "[[3.5,200],[7.0,240]]", - "enabled": "material_flow_dependent_temperature" + "enabled": "material_flow_dependent_temperature", + "global_only": true }, "material_standby_temperature": { "label": "Standby Temperature", @@ -658,7 +665,7 @@ "default": 150, "min_value": "0", "max_value_warning": "260", - "global_only": "print_sequence != \"one_at_a_time\"" + "global_only": true }, "material_extrusion_cool_down_speed": { "label": "Extrusion Cool Down Speed Modifier", @@ -668,7 +675,9 @@ "default": 0.5, "min_value": "0", "max_value_warning": "10.0", - "global_only": "print_sequence != \"one_at_a_time\"" + "global_only": "True", + "enabled": "material_flow_dependent_temperature or machine_extruder_count > 1", + "visible": false }, "material_bed_temperature": { "label": "Bed Temperature", @@ -679,7 +688,7 @@ "min_value": "0", "max_value_warning": "260", "enabled": "machine_heated_bed", - "global_only": "print_sequence != \"one_at_a_time\"" + "global_only": "True" }, "material_diameter": { "label": "Diameter", @@ -690,7 +699,7 @@ "min_value": "0.0001", "min_value_warning": "0.4", "max_value_warning": "3.5", - "global_only": "print_sequence != \"one_at_a_time\"" + "global_only": "True" }, "material_flow": { "label": "Flow", @@ -786,7 +795,7 @@ "description": "This setting limits the number of retractions occurring within the Minimum Extrusion Distance Window. Further retractions within this window will be ignored. This avoids retracting repeatedly on the same piece of filament, as that can flatten the filament and cause grinding issues.", "default": 8, "min_value": "0", - "max_value_warning": "20", + "max_value_warning": "100", "type": "int", "visible": false, "inherit": false, @@ -909,7 +918,8 @@ "max_value_warning": "150", "visible": false, "inherit": true, - "enabled": "support_roof_enable" + "enabled": "support_roof_enable", + "global_only": true }, "speed_support_roof": { "label": "Support Roof Speed", @@ -922,7 +932,8 @@ "visible": false, "inherit": false, "enabled": "support_roof_enable", - "inherit_function": "parent_value / 60 * 40" + "inherit_function": "parent_value / 60 * 40", + "global_only": true } } } @@ -936,7 +947,8 @@ "default": 120, "min_value": "0.1", "max_value_warning": "300", - "inherit_function": "speed_print if magic_spiralize else 120" + "inherit_function": "speed_print if magic_spiralize else 120", + "global_only": true }, "speed_layer_0": { "label": "Bottom Layer Speed", @@ -957,7 +969,8 @@ "min_value": "0.1", "max_value_warning": "300", "visible": false, - "inherit_function": "speed_layer_0" + "inherit_function": "speed_layer_0", + "global_only": true }, "speed_slowdown_layers": { "label": "Number of Slower Layers", @@ -966,7 +979,8 @@ "default": 4, "min_value": "0", "max_value_warning": "300", - "visible": false + "visible": false, + "global_only": true } } }, @@ -980,7 +994,8 @@ "description": "Combing keeps the head within the interior of the print whenever possible when traveling from one part of the print to another and does not use retraction. If combing is disabled, the print head moves straight from the start point to the end point and it will always retract.", "type": "boolean", "default": true, - "visible": false + "visible": false, + "global_only": true }, "travel_avoid_other_parts": { "label": "Avoid Printed Parts", @@ -989,7 +1004,7 @@ "default": true, "visible": false, "enabled": "retraction_combing", - "global_only": "print_sequence != \"one_at_a_time\"", + "global_only": "True", "children": { "travel_avoid_distance": { "label": "Avoid Distance", @@ -1002,7 +1017,7 @@ "visible": false, "inherit": false, "enabled": "retraction_combing", - "global_only": "print_sequence != \"one_at_a_time\"" + "global_only": "True" } } }, @@ -1011,7 +1026,8 @@ "description": "Coasting replaces the last part of an extrusion path with a travel path. The oozed material is used to lay down the last piece of the extrusion path in order to reduce stringing.", "type": "boolean", "default": false, - "visible": true + "visible": false, + "global_only": true }, "coasting_volume": { "label": "Coasting Volume", @@ -1023,7 +1039,8 @@ "max_value_warning": "2.0", "visible": false, "inherit": false, - "enabled": "coasting_enable" + "enabled": "coasting_enable", + "global_only": true }, "coasting_min_volume": { "label": "Minimal Volume Before Coasting", @@ -1034,7 +1051,8 @@ "min_value": "0", "max_value_warning": "10.0", "visible": false, - "enabled": "coasting_enable" + "enabled": "coasting_enable", + "global_only": true }, "coasting_speed": { "label": "Coasting Speed", @@ -1046,7 +1064,8 @@ "max_value_warning": "100", "visible": false, "inherit": false, - "enabled": "coasting_enable" + "enabled": "coasting_enable", + "global_only": true } } }, @@ -1060,7 +1079,7 @@ "description": "Enable the cooling fan during the print. The extra cooling from the cooling fan helps parts with small cross sections that print each layer quickly.", "type": "boolean", "default": true, - "global_only": "print_sequence != \"one_at_a_time\"", + "global_only": "True", "children": { "cool_fan_speed": { "label": "Fan Speed", @@ -1072,11 +1091,11 @@ "default": 100, "visible": false, "inherit_function": "100.0 if parent_value else 0.0", - "global_only": "print_sequence != \"one_at_a_time\"", + "global_only": "True", "children": { "cool_fan_speed_min": { - "label": "Normal Fan Speed", - "description": "Normally the fan runs at the minimum fan speed. If a layer takes less than Shortest Layer Time Normal Fan Speed, the fan speed adjusts from Normal Fan Speed towards Maximum Fan Speed.", + "label": "Minimum Fan Speed", + "description": "Normally the fan runs at the minimum fan speed. If the layer is slowed down due to minimum layer time, the fan speed adjusts between minimum and maximum fan speed.", "unit": "%", "type": "float", "min_value": "0", @@ -1084,11 +1103,11 @@ "inherit_function": "parent_value", "default": 100, "visible": false, - "global_only": "print_sequence != \"one_at_a_time\"" + "global_only": "True" }, "cool_fan_speed_max": { "label": "Maximum Fan Speed", - "description": "If a layer is slowed down due to minimum layer time, the fan speed will be the Maximum Fan Speed.", + "description": "Normally the fan runs at the minimum fan speed. If the layer is slowed down due to minimum layer time, the fan speed adjusts between minimum and maximum fan speed.", "unit": "%", "type": "float", "min_value": "max(0, cool_fan_speed_min)", @@ -1096,33 +1115,33 @@ "inherit": false, "default": 100, "visible": false, - "global_only": "print_sequence != \"one_at_a_time\"" + "global_only": "True" } } } } }, "cool_fan_full_at_height": { - "label": "Slow Fan Down Below Height", - "description": "The height at which the fan is set to Normal Fan Speed. For the layers below this the fan speed is scaled linearly with the fan off on the first layer.", + "label": "Fan Full on at Height", + "description": "The height at which the fan is turned on completely. For the layers below this the fan speed is scaled linearly with the fan off for the first layer.", "unit": "mm", "type": "float", "default": 0.5, "min_value": "0", "max_value_warning": "10.0", "visible": false, - "global_only": "print_sequence != \"one_at_a_time\"", + "global_only": "True", "children": { "cool_fan_full_layer": { - "label": "Slow Fan Down Below Layer", - "description": "The layer number at which the fan is set to Normal Fan Speed. For the layers below this the fan speed is scaled linearly with the fan off on the first layer.", + "label": "Fan Full on at Layer", + "description": "The layer number at which the fan is turned on completely. For the layers below this the fan speed is scaled linearly with the fan off for the first layer.", "type": "int", "default": 4, "min_value": "0", "max_value_warning": "100", "visible": false, "inherit_function": "int((parent_value - layer_height_0 + 0.001) / layer_height)", - "global_only": "print_sequence != \"one_at_a_time\"" + "global_only": "True" } } }, @@ -1135,18 +1154,18 @@ "min_value": "0", "max_value_warning": "600", "visible": false, - "global_only": "print_sequence != \"one_at_a_time\"" + "global_only": "True" }, "cool_min_layer_time_fan_speed_max": { - "label": "Shortest Layer Time Normal Fan Speed", - "description": "The minimum time spent in a layer which will cause the fan to be at normal speed. All layers taking shorter than this time will get increased fan speeds, up to Maximum Fan Speed for layers taking Minmal Layer Time. All layers taking longer than this time will have Normal Fan Speed.", + "label": "Minimum Layer Time Full Fan Speed", + "description": "The minimum time spent in a layer which will cause the fan to be at maximum speed. The fan speed increases linearly from minimum fan speed for layers taking the minimum layer time to maximum fan speed for layers taking the time specified here.", "unit": "sec", "type": "float", "default": 10, "min_value": "cool_min_layer_time", "max_value_warning": "600", "visible": false, - "global_only": "print_sequence != \"one_at_a_time\"" + "global_only": "True" }, "cool_min_speed": { "label": "Minimum Speed", @@ -1157,7 +1176,7 @@ "min_value": "0", "max_value_warning": "100", "visible": false, - "global_only": "print_sequence != \"one_at_a_time\"" + "global_only": "True" }, "cool_lift_head": { "label": "Lift Head", @@ -1165,13 +1184,14 @@ "type": "boolean", "default": false, "visible": false, - "global_only": "print_sequence != \"one_at_a_time\"" + "global_only": "True" }, "draft_shield_enabled": { "label": "Enable Draft Shield", "description": "Enable exterior draft shield. This will create a wall around the object which traps (hot) air and shields against gusts of wind. Especially useful for materials which warp easily.", "type": "boolean", - "default": false + "default": false, + "global_only": true }, "draft_shield_dist": { "label": "Draft Shield X/Y Distance", @@ -1182,7 +1202,8 @@ "max_value_warning": "100", "default": 10, "visible": false, - "enabled": "draft_shield_enabled" + "enabled": "draft_shield_enabled", + "global_only": true }, "draft_shield_height_limitation": { "label": "Draft Shield Limitation", @@ -1194,7 +1215,8 @@ }, "default": "full", "visible": false, - "enabled": "draft_shield_enabled" + "enabled": "draft_shield_enabled", + "global_only": true }, "draft_shield_height": { "label": "Draft Shield Height", @@ -1206,7 +1228,8 @@ "default": 0, "inherit_function": "9999 if draft_shield_height_limitation == 'full' and draft_shield_enabled else 0.0", "visible": false, - "enabled": "draft_shield_height_limitation == \"limited\"" + "enabled": "draft_shield_height_limitation == \"limited\"", + "global_only": true } } }, @@ -1219,7 +1242,7 @@ "label": "Enable Support", "description": "Enable exterior support structures. This will build up supporting structures below the model to prevent the model from sagging or printing in mid air.", "type": "boolean", - "default": true + "default": false }, "support_type": { "label": "Placement", @@ -1239,7 +1262,7 @@ "type": "float", "min_value": "0", "max_value": "90", - "default": 60, + "default": 50, "visible": false, "enabled": "support_enable" }, @@ -1304,6 +1327,8 @@ "unit": "°", "type": "float", "min_value": "-90", + "min_value_warning": "-45", + "max_value_warning": "45", "max_value": "90", "default": 30, "visible": false, @@ -1393,6 +1418,7 @@ "min_value": "0", "max_value_warning": "100", "enabled":"support_roof_enable", + "global_only": true, "children": { "support_roof_line_distance": { "label": "Support Roof Line Distance", @@ -1403,7 +1429,8 @@ "min_value": "0", "visible": false, "inherit_function": "0 if parent_value == 0 else (support_roof_line_width * 100) / parent_value", - "enabled": "support_roof_enable" + "enabled": "support_roof_enable", + "global_only": true } } }, @@ -1420,7 +1447,8 @@ "zigzag": "Zig Zag" }, "default": "concentric", - "enabled": "support_roof_enable" + "enabled": "support_roof_enable", + "global_only": true }, "support_use_towers": { "label": "Use towers", @@ -1446,12 +1474,27 @@ "description": "The diameter of a special tower.", "unit": "mm", "type": "float", - "default": 1, + "default": 3.0, "min_value": "0", "min_value_warning": "support_minimal_diameter", "max_value_warning": "10", "visible": false, - "enabled": "support_enable" + "enabled": "support_enable and support_use_towers", + "children": { + "support_minimal_diameter": { + "label": "Minimum Diameter", + "description": "Minimum diameter in the X/Y directions of a small area which is to be supported by a specialized support tower.", + "unit": "mm", + "type": "float", + "default": 3.0, + "min_value": "0", + "max_value_warning": "10", + "max_value": "support_tower_diameter", + "inherit": true, + "visible": false, + "enabled": "support_enable and support_use_towers" + } + } }, "support_tower_roof_angle": { "label": "Tower Roof Angle", @@ -1477,7 +1520,8 @@ }, "default": "zigzag", "visible": false, - "enabled": "support_enable" + "enabled": "support_enable", + "global_only": true }, "support_connect_zigzags": { "label": "Connect ZigZags", @@ -1485,7 +1529,8 @@ "type": "boolean", "default": true, "visible": false, - "enabled": "support_enable" + "enabled": "support_enable", + "global_only": true }, "support_infill_rate": { "label": "Fill Amount", @@ -1497,7 +1542,7 @@ "default": 15, "visible": false, "enabled": "support_enable", - + "global_only": true, "children": { "support_line_distance": { "label": "Line distance", @@ -1508,7 +1553,8 @@ "default": 2.66, "visible": false, "enabled": "support_enable", - "inherit_function": "(support_line_width * 100) / parent_value" + "inherit_function": "(support_line_width * 100) / parent_value", + "global_only": true } } } @@ -1528,7 +1574,8 @@ "brim": "Brim", "raft": "Raft" }, - "default": "skirt" + "default": "skirt", + "global_only": "True" }, "skirt_line_count": { "label": "Skirt Line Count", @@ -1538,7 +1585,8 @@ "min_value": "0", "max_value_warning": "10", "enabled": "adhesion_type == \"skirt\"", - "global_only": "print_sequence != \"one_at_a_time\"" + "global_only": "True", + "visible": false }, "skirt_gap": { "label": "Skirt Distance", @@ -1549,7 +1597,8 @@ "min_value_warning": "0", "max_value_warning": "100", "enabled": "adhesion_type == \"skirt\"", - "global_only": "print_sequence != \"one_at_a_time\"" + "global_only": "True", + "visible": false }, "skirt_minimal_length": { "label": "Skirt Minimum Length", @@ -1561,29 +1610,32 @@ "min_value_warning": "25", "max_value_warning": "2500", "enabled": "adhesion_type == \"skirt\"", - "global_only": "print_sequence != \"one_at_a_time\"" + "global_only": "True", + "visible": false }, "brim_width": { "label": "Brim Width", "description": "The distance from the model to the end of the brim. A larger brim sticks better to the build platform, but also makes your effective print area smaller.", "type": "float", "unit": "mm", - "default": 5.0, + "default": 8.0, "min_value": "0.0", "max_value_warning": "100.0", "enabled": "adhesion_type == \"brim\"", - "global_only": "print_sequence != \"one_at_a_time\"", + "global_only": "True", + "visible": true, "children": { "brim_line_count": { "label": "Brim Line Count", "description": "The number of lines used for a brim. More lines means a larger brim which sticks better to the build plate, but this also makes your effective print area smaller.", "type": "int", - "default": 13, + "default": 20, "min_value": "0", "max_value_warning": "300", "inherit_function": "math.ceil(parent_value / skirt_line_width)", "enabled": "adhesion_type == \"brim\"", - "global_only": "print_sequence != \"one_at_a_time\"" + "global_only": "True", + "visible": false } } }, @@ -1595,7 +1647,9 @@ "default": 5, "min_value_warning": "0", "max_value_warning": "10", - "enabled": "adhesion_type == \"raft\"" + "enabled": "adhesion_type == \"raft\"", + "global_only": "True", + "visible": false }, "raft_airgap": { "label": "Raft Air-gap", @@ -1605,7 +1659,9 @@ "default": 0.35, "min_value": "0", "max_value_warning": "1.0", - "enabled": "adhesion_type == \"raft\"" + "enabled": "adhesion_type == \"raft\"", + "global_only": "True", + "visible": true }, "raft_surface_layers": { "label": "Raft Top Layers", @@ -1614,7 +1670,9 @@ "default": 2, "min_value": "0", "max_value_warning": "20", - "enabled": "adhesion_type == \"raft\"" + "enabled": "adhesion_type == \"raft\"", + "global_only": "True", + "visible": true }, "raft_surface_thickness": { "label": "Raft Top Layer Thickness", @@ -1624,7 +1682,9 @@ "default": 0.1, "min_value": "0", "max_value_warning": "2.0", - "enabled": "adhesion_type == \"raft\"" + "enabled": "adhesion_type == \"raft\"", + "global_only": "True", + "visible": false }, "raft_surface_line_width": { "label": "Raft Top Line Width", @@ -1634,7 +1694,9 @@ "default": 0.3, "min_value": "0.0001", "max_value_warning": "machine_nozzle_size * 2", - "enabled": "adhesion_type == \"raft\"" + "enabled": "adhesion_type == \"raft\"", + "global_only": "True", + "visible": false }, "raft_surface_line_spacing": { "label": "Raft Top Spacing", @@ -1645,7 +1707,9 @@ "min_value": "0.0001", "max_value_warning": "5.0", "enabled": "adhesion_type == \"raft\"", - "inherit_function": "raft_surface_line_width" + "inherit_function": "raft_surface_line_width", + "global_only": "True", + "visible": false }, "raft_interface_thickness": { "label": "Raft Middle Thickness", @@ -1655,7 +1719,9 @@ "default": 0.27, "min_value": "0", "max_value_warning": "5.0", - "enabled": "adhesion_type == \"raft\"" + "enabled": "adhesion_type == \"raft\"", + "global_only": "True", + "visible": false }, "raft_interface_line_width": { "label": "Raft Middle Line Width", @@ -1665,7 +1731,9 @@ "default": 1, "min_value": "0.0001", "max_value_warning": "machine_nozzle_size * 2", - "enabled": "adhesion_type == \"raft\"" + "enabled": "adhesion_type == \"raft\"", + "global_only": "True", + "visible": false }, "raft_interface_line_spacing": { "label": "Raft Middle Spacing", @@ -1675,7 +1743,9 @@ "default": 1.0, "min_value": "0", "max_value_warning": "15.0", - "enabled": "adhesion_type == \"raft\"" + "enabled": "adhesion_type == \"raft\"", + "global_only": "True", + "visible": false }, "raft_base_thickness": { "label": "Raft Base Thickness", @@ -1685,7 +1755,9 @@ "default": 0.3, "min_value": "0", "max_value_warning": "5.0", - "enabled": "adhesion_type == \"raft\"" + "enabled": "adhesion_type == \"raft\"", + "global_only": "True", + "visible": false }, "raft_base_line_width": { "label": "Raft Base Line Width", @@ -1695,7 +1767,9 @@ "default": 1, "min_value": "0.0001", "max_value_warning": "machine_nozzle_size * 2", - "enabled": "adhesion_type == \"raft\"" + "enabled": "adhesion_type == \"raft\"", + "global_only": "True", + "visible": false }, "raft_base_line_spacing": { "label": "Raft Line Spacing", @@ -1705,7 +1779,9 @@ "default": 3.0, "min_value": "0.0001", "max_value_warning": "100", - "enabled": "adhesion_type == \"raft\"" + "enabled": "adhesion_type == \"raft\"", + "global_only": "True", + "visible": false }, "raft_speed": { "label": "Raft Print Speed", @@ -1717,6 +1793,8 @@ "max_value_warning": "200", "enabled": "adhesion_type == \"raft\"", "inherit_function": "speed_print / 60 * 30", + "global_only": "True", + "visible": false, "children": { "raft_surface_speed": { "label": "Raft Surface Print Speed", @@ -1727,7 +1805,9 @@ "min_value": "0.1", "max_value_warning": "100", "enabled": "adhesion_type == \"raft\"", - "inherit_function": "parent_value" + "inherit_function": "parent_value", + "global_only": "True", + "visible": false }, "raft_interface_speed": { "label": "Raft Interface Print Speed", @@ -1738,7 +1818,9 @@ "min_value": "0.1", "max_value_warning": "150", "enabled": "adhesion_type == \"raft\"", - "inherit_function": "0.5 * parent_value" + "inherit_function": "0.5 * parent_value", + "global_only": "True", + "visible": false }, "raft_base_speed": { "label": "Raft Base Print Speed", @@ -1749,7 +1831,9 @@ "min_value": "0.1", "max_value_warning": "200", "enabled": "adhesion_type == \"raft\"", - "inherit_function": "0.5 * parent_value" + "inherit_function": "0.5 * parent_value", + "global_only": "True", + "visible": false } } }, @@ -1761,6 +1845,7 @@ "min_value": "0", "max_value": "100", "default": 100, + "global_only": "True", "visible": false, "enabled": "adhesion_type == \"raft\"", "children": { @@ -1772,6 +1857,7 @@ "min_value": "0", "max_value": "100", "default": 100, + "global_only": "True", "visible": false, "inherit": true, "enabled": "adhesion_type == \"raft\"" @@ -1784,6 +1870,7 @@ "min_value": "0", "max_value": "100", "default": 100, + "global_only": "True", "visible": false, "inherit": true, "enabled": "adhesion_type == \"raft\"" @@ -1796,6 +1883,7 @@ "min_value": "0", "max_value": "100", "default": 100, + "global_only": "True", "visible": false, "inherit": true, "enabled": "adhesion_type == \"raft\"" @@ -1865,7 +1953,7 @@ "surface": "Surface", "both": "Both" }, - "default": "Normal", + "default": "normal", "visible": false }, "magic_spiralize": { @@ -1874,7 +1962,7 @@ "type": "boolean", "default": false, "visible": false, - "global_only": "print_sequence != \"one_at_a_time\"" + "global_only": "True" }, "magic_fuzzy_skin_enabled": { "label": "Fuzzy Skin", @@ -1926,7 +2014,7 @@ "type": "boolean", "default": false, "visible": false, - "global_only": "print_sequence != \"one_at_a_time\"" + "global_only": "True" }, "wireframe_height": { "label": "WP Connection Height", @@ -1938,7 +2026,7 @@ "max_value_warning": "20", "visible": false, "enabled": "wireframe_enabled", - "global_only": "print_sequence != \"one_at_a_time\"" + "global_only": "True" }, "wireframe_roof_inset": { "label": "WP Roof Inset Distance", @@ -1952,7 +2040,7 @@ "visible": false, "enabled": "wireframe_enabled", "inherit_function": "wireframe_height", - "global_only": "print_sequence != \"one_at_a_time\"" + "global_only": "True" }, "wireframe_printspeed": { "label": "WP speed", @@ -1964,7 +2052,7 @@ "max_value_warning": "50", "visible": false, "enabled": "wireframe_enabled", - "global_only": "print_sequence != \"one_at_a_time\"", + "global_only": "True", "children": { "wireframe_printspeed_bottom": { "label": "WP Bottom Printing Speed", @@ -1977,7 +2065,7 @@ "visible": false, "inherit": true, "enabled": "wireframe_enabled", - "global_only": "print_sequence != \"one_at_a_time\"" + "global_only": "True" }, "wireframe_printspeed_up": { "label": "WP Upward Printing Speed", @@ -1990,7 +2078,7 @@ "visible": false, "inherit": true, "enabled": "wireframe_enabled", - "global_only": "print_sequence != \"one_at_a_time\"" + "global_only": "True" }, "wireframe_printspeed_down": { "label": "WP Downward Printing Speed", @@ -2003,7 +2091,7 @@ "visible": false, "inherit": true, "enabled": "wireframe_enabled", - "global_only": "print_sequence != \"one_at_a_time\"" + "global_only": "True" }, "wireframe_printspeed_flat": { "label": "WP Horizontal Printing Speed", @@ -2016,7 +2104,7 @@ "visible": false, "inherit": true, "enabled": "wireframe_enabled", - "global_only": "print_sequence != \"one_at_a_time\"" + "global_only": "True" } } }, @@ -2030,7 +2118,7 @@ "type": "float", "visible": false, "enabled": "wireframe_enabled", - "global_only": "print_sequence != \"one_at_a_time\"", + "global_only": "True", "children": { "wireframe_flow_connection": { "label": "WP Connection Flow", @@ -2042,7 +2130,7 @@ "type": "float", "visible": false, "enabled": "wireframe_enabled", - "global_only": "print_sequence != \"one_at_a_time\"" + "global_only": "True" }, "wireframe_flow_flat": { "label": "WP Flat Flow", @@ -2054,7 +2142,7 @@ "type": "float", "visible": false, "enabled": "wireframe_enabled", - "global_only": "print_sequence != \"one_at_a_time\"" + "global_only": "True" } } }, @@ -2068,7 +2156,7 @@ "max_value_warning": "1", "visible": false, "enabled": "wireframe_enabled", - "global_only": "print_sequence != \"one_at_a_time\"" + "global_only": "True" }, "wireframe_bottom_delay": { "label": "WP Bottom Delay", @@ -2080,7 +2168,7 @@ "max_value_warning": "1", "visible": false, "enabled": "wireframe_enabled", - "global_only": "print_sequence != \"one_at_a_time\"" + "global_only": "True" }, "wireframe_flat_delay": { "label": "WP Flat Delay", @@ -2092,7 +2180,7 @@ "max_value_warning": "0.5", "visible": false, "enabled": "wireframe_enabled", - "global_only": "print_sequence != \"one_at_a_time\"" + "global_only": "True" }, "wireframe_up_half_speed": { "label": "WP Ease Upward", @@ -2104,7 +2192,7 @@ "max_value_warning": "5.0", "visible": false, "enabled": "wireframe_enabled", - "global_only": "print_sequence != \"one_at_a_time\"" + "global_only": "True" }, "wireframe_top_jump": { "label": "WP Knot Size", @@ -2116,7 +2204,7 @@ "max_value_warning": "2.0", "visible": false, "enabled": "wireframe_enabled", - "global_only": "print_sequence != \"one_at_a_time\"" + "global_only": "True" }, "wireframe_fall_down": { "label": "WP Fall Down", @@ -2128,7 +2216,7 @@ "max_value_warning": "wireframe_height", "visible": false, "enabled": "wireframe_enabled", - "global_only": "print_sequence != \"one_at_a_time\"" + "global_only": "True" }, "wireframe_drag_along": { "label": "WP Drag along", @@ -2140,7 +2228,7 @@ "max_value_warning": "wireframe_height", "visible": false, "enabled": "wireframe_enabled", - "global_only": "print_sequence != \"one_at_a_time\"" + "global_only": "True" }, "wireframe_strategy": { "label": "WP Strategy", @@ -2154,7 +2242,7 @@ "default": "compensate", "visible": false, "enabled": "wireframe_enabled", - "global_only": "print_sequence != \"one_at_a_time\"" + "global_only": "True" }, "wireframe_straight_before_down": { "label": "WP Straighten Downward Lines", @@ -2166,7 +2254,7 @@ "max_value": "100", "visible": false, "enabled": "wireframe_enabled", - "global_only": "print_sequence != \"one_at_a_time\"" + "global_only": "True" }, "wireframe_roof_fall_down": { "label": "WP Roof Fall Down", @@ -2178,7 +2266,7 @@ "max_value_warning": "wireframe_roof_inset", "visible": false, "enabled": "wireframe_enabled", - "global_only": "print_sequence != \"one_at_a_time\"" + "global_only": "True" }, "wireframe_roof_drag_along": { "label": "WP Roof Drag Along", @@ -2190,7 +2278,7 @@ "max_value_warning": "10", "visible": false, "enabled": "wireframe_enabled", - "global_only": "print_sequence != \"one_at_a_time\"" + "global_only": "True" }, "wireframe_roof_outer_delay": { "label": "WP Roof Outer Delay", @@ -2202,7 +2290,7 @@ "max_value_warning": "2.0", "visible": false, "enabled": "wireframe_enabled", - "global_only": "print_sequence != \"one_at_a_time\"" + "global_only": "True" }, "wireframe_nozzle_clearance": { "label": "WP Nozzle Clearance", @@ -2214,7 +2302,7 @@ "max_value_warning": "10.0", "visible": false, "enabled": "wireframe_enabled", - "global_only": "print_sequence != \"one_at_a_time\"" + "global_only": "True" } } } diff --git a/resources/settings/innovo-inventor.json b/resources/machines/innovo-inventor.json similarity index 91% rename from resources/settings/innovo-inventor.json rename to resources/machines/innovo-inventor.json index 23b5c0acaf..eca2ca96e6 100644 --- a/resources/settings/innovo-inventor.json +++ b/resources/machines/innovo-inventor.json @@ -1,18 +1,18 @@ { "id": "innovo-inventor", - "name": "Innovo INVENTOR", - "manufacturer": "INNOVO", - "author": "AR", "version": 1, - "icon": "", + "name": "Innovo INVENTOR", + "manufacturer": "Other", + "author": "AR", "platform": "inventor_platform.stl", - "platform_texture": "", + "file_formats": "text/x-gcode", "inherits": "fdmprinter.json", + "machine_settings": { "machine_width": {"default": 340}, "machine_height": {"default": 290}, "machine_depth": {"default": 300}, - "machine_heated_bed": { "default": true }, + "machine_heated_bed": { "default": true}, "machine_center_is_zero": {"default": false}, "machine_nozzle_size": {"default": 0.4}, "machine_head_shape_min_x": {"default": 43.7}, @@ -24,7 +24,8 @@ "machine_nozzle_offset_y_1": {"default": 15}, "machine_gcode_flavor": {"default": "RepRap (Marlin/Sprinter)"}, "machine_start_gcode": {"default": "G28 ; Home extruder\nM107 ; Turn off fan\nG90 ; Absolute positioning\nM82 ; Extruder in absolute mode\n{IF_BED}M190 S{BED}\n{IF_EXT0}M104 T0 S{TEMP0}\n{IF_EXT0}M109 T0 S{TEMP0}\n{IF_EXT1}M104 T1 S{TEMP1}\n{IF_EXT1}M109 T1 S{TEMP1}\nG32 S3 ; auto level\nG92 E0 ; Reset extruder position"}, - "machine_end_gcode": {"default": "M104 S0\nG91 ; relative positioning\nG1 E-2 F5000; retract 2mm\nG28 Z; move bed down\nG90 ; absolute positioning\nM84 ; disable motors"} + "machine_end_gcode": {"default": "M104 S0\nG91 ; relative positioning\nG1 E-2 F5000; retract 2mm\nG28 Z; move bed down\nG90 ; absolute positioning\nM84 ; disable motors"}, + "machine_platform_offset": {"default": [-180, -0.25, 160]} }, "overrides": { @@ -46,4 +47,4 @@ "speed_layer_0": { "min_value": 0.1, "default": 30.0, "visible": true }, "infill_overlap": { "default": 0.04, "inherit_function": "0.1 * line_width if infill_sparse_density < 95 else 0" } } -} +} \ No newline at end of file diff --git a/resources/machines/ultimaker.json b/resources/machines/ultimaker.json new file mode 100644 index 0000000000..a7a9cd3994 --- /dev/null +++ b/resources/machines/ultimaker.json @@ -0,0 +1,15 @@ +{ + "id": "ultimaker_base", + "version": 1, + "visible": false, + "name": "Ultimaker", + "manufacturer": "Ultimaker", + "author": "Ultimaker", + "inherits": "fdmprinter.json", + + "machine_preferences": { + "prefered_profile": "Normal Quality", + "prefered_variant": "0.4 mm", + "prefered_material": "PLA" + } +} diff --git a/resources/machines/ultimaker2.json b/resources/machines/ultimaker2.json index 2671d1fe6b..16867145cb 100644 --- a/resources/machines/ultimaker2.json +++ b/resources/machines/ultimaker2.json @@ -1,6 +1,6 @@ { "id": "ultimaker2", - "version": 1, + "version": 1, "name": "Ultimaker 2", "manufacturer": "Ultimaker", "author": "Ultimaker", @@ -9,16 +9,19 @@ "platform_texture": "Ultimaker2backplate.png", "file_formats": "text/x-gcode", - "inherits": "fdmprinter.json", + "inherits": "ultimaker.json", - - "machine_extruder_trains": { - "0": { - "machine_nozzle_heat_up_speed": { - "default": 2.0 + "pages": [ + "SelectUpgradedPartsUM2" + ], + + "machine_extruder_trains": [ + { + "machine_nozzle_heat_up_speed": { + "default": 2.0 }, - "machine_nozzle_cool_down_speed": { - "default": 2.0 + "machine_nozzle_cool_down_speed": { + "default": 2.0 }, "machine_nozzle_tip_outer_diameter": { "default": 1 @@ -29,12 +32,12 @@ "machine_nozzle_expansion_angle": { "default": 45 }, - "machine_heat_zone_length": { + "machine_heat_zone_length": { "default": 16 } } - }, - "overrides": { + ], + "machine_settings": { "machine_start_gcode" : { "default": "" }, "machine_end_gcode" : { "default": "" }, "machine_width": { "default": 230 }, @@ -77,14 +80,20 @@ [[ 115.0, -112.5], [ 108.0, -112.5], [ 110.0, -104.5], [ 115.0, -104.5]] ]}, "machine_platform_offset": { "default": [9.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 }, - + "machine_nozzle_expansion_angle": { "default": 45 } + }, + + "overrides": { "material_print_temperature": { "enabled": "False" }, "material_bed_temperature": { "enabled": "False" }, "material_diameter": { "enabled": "False" }, - "material_flow": { "enabled": "False" } + "material_flow": { "enabled": "False" }, + "retraction_amount": { "enabled": "False" }, + "retraction_speed": { "enabled": "False" }, + "retraction_retract_speed": { "enabled": "False" }, + "retraction_prime_speed": { "enabled": "False" } } } diff --git a/resources/machines/ultimaker2_extended.json b/resources/machines/ultimaker2_extended.json index 696a303326..cb81b51fc6 100644 --- a/resources/machines/ultimaker2_extended.json +++ b/resources/machines/ultimaker2_extended.json @@ -10,7 +10,11 @@ "file_formats": "text/x-gcode", "inherits": "ultimaker2.json", - "overrides": { + "pages": [ + "SelectUpgradedPartsUM2" + ], + + "machine_settings": { "machine_width": { "default": 230 }, "machine_depth": { "default": 225 }, "machine_height": { "default": 315 } diff --git a/resources/machines/ultimaker2_extended_olsson.json b/resources/machines/ultimaker2_extended_olsson.json new file mode 100644 index 0000000000..50e95b7f67 --- /dev/null +++ b/resources/machines/ultimaker2_extended_olsson.json @@ -0,0 +1,20 @@ +{ + "id": "ultimaker2_extended_olsson_base", + "version": 1, + "name": "Ultimaker 2 Extended with Olsson Block", + "manufacturer": "Ultimaker", + "author": "Ultimaker", + "platform": "ultimaker2_platform.obj", + "platform_texture": "Ultimaker2backplate.png", + "visible": false, + "file_formats": "text/x-gcode", + "inherits": "ultimaker2.json", + + "machine_settings": { + "machine_width": { "default": 230 }, + "machine_depth": { "default": 225 }, + "machine_height": { "default": 310 }, + "machine_show_variants": { "default": true }, + "gantry_height": { "default": 50 } + } +} diff --git a/resources/machines/ultimaker2_extended_olsson_025.json b/resources/machines/ultimaker2_extended_olsson_025.json new file mode 100644 index 0000000000..7d5e1ba384 --- /dev/null +++ b/resources/machines/ultimaker2_extended_olsson_025.json @@ -0,0 +1,17 @@ +{ + "id": "ultimaker2_extended_olsson", + "version": 1, + "name": "Ultimaker 2 Extended with Olsson Block", + "manufacturer": "Ultimaker", + "author": "Ultimaker", + "platform": "ultimaker2_platform.obj", + "platform_texture": "Ultimaker2backplate.png", + "visible": false, + "file_formats": "text/x-gcode", + "inherits": "ultimaker2_extended_olsson.json", + "variant": "0.25 mm", + "profiles_machine": "ultimaker2_olsson", + "machine_settings": { + "machine_nozzle_size": { "default": 0.25 } + } +} diff --git a/resources/machines/ultimaker2_extended_olsson_040.json b/resources/machines/ultimaker2_extended_olsson_040.json new file mode 100644 index 0000000000..c031c5a7f4 --- /dev/null +++ b/resources/machines/ultimaker2_extended_olsson_040.json @@ -0,0 +1,18 @@ +{ + "id": "ultimaker2_extended_olsson", + "version": 1, + "name": "Ultimaker 2 Extended with Olsson Block", + "manufacturer": "Ultimaker", + "author": "Ultimaker", + "platform": "ultimaker2_platform.obj", + "platform_texture": "Ultimaker2backplate.png", + "visible": false, + "file_formats": "text/x-gcode", + "inherits": "ultimaker2_extended_olsson.json", + + "variant": "0.4 mm", + "profiles_machine": "ultimaker2_olsson", + "machine_settings": { + "machine_nozzle_size": { "default": 0.40 } + } +} diff --git a/resources/machines/ultimaker2_extended_olsson_060.json b/resources/machines/ultimaker2_extended_olsson_060.json new file mode 100644 index 0000000000..ce811fa556 --- /dev/null +++ b/resources/machines/ultimaker2_extended_olsson_060.json @@ -0,0 +1,18 @@ +{ + "id": "ultimaker2_extended_olsson", + "version": 1, + "name": "Ultimaker 2 Extended with Olsson Block", + "manufacturer": "Ultimaker", + "author": "Ultimaker", + "platform": "ultimaker2_platform.obj", + "platform_texture": "Ultimaker2backplate.png", + "visible": false, + "file_formats": "text/x-gcode", + "inherits": "ultimaker2_extended_olsson.json", + + "variant": "0.6 mm", + "profiles_machine": "ultimaker2_olsson", + "machine_settings": { + "machine_nozzle_size": { "default": 0.60 } + } +} diff --git a/resources/machines/ultimaker2_extended_olsson_080.json b/resources/machines/ultimaker2_extended_olsson_080.json new file mode 100644 index 0000000000..a7b703f051 --- /dev/null +++ b/resources/machines/ultimaker2_extended_olsson_080.json @@ -0,0 +1,18 @@ +{ + "id": "ultimaker2_extended_olsson", + "version": 1, + "name": "Ultimaker 2 Extended with Olsson Block", + "manufacturer": "Ultimaker", + "author": "Ultimaker", + "platform": "ultimaker2_platform.obj", + "platform_texture": "Ultimaker2backplate.png", + "file_formats": "text/x-gcode", + "visible": false, + "inherits": "ultimaker2_extended_olsson.json", + + "variant": "0.8 mm", + "profiles_machine": "ultimaker2_olsson", + "machine_settings": { + "machine_nozzle_size": { "default": 0.80 } + } +} diff --git a/resources/machines/ultimaker2_extended_plus.json b/resources/machines/ultimaker2_extended_plus.json index 5f74df23c7..89efeddabe 100644 --- a/resources/machines/ultimaker2_extended_plus.json +++ b/resources/machines/ultimaker2_extended_plus.json @@ -5,7 +5,7 @@ "manufacturer": "Ultimaker", "author": "Ultimaker", "platform": "ultimaker2_platform.obj", - "platform_texture": "ultimaker2plus_backplate.png", + "platform_texture": "Ultimaker2ExtendedPlusbackplate.png", "visible": false, "file_formats": "text/x-gcode", "inherits": "ultimaker2plus.json", diff --git a/resources/machines/ultimaker2_extended_plus_025.json b/resources/machines/ultimaker2_extended_plus_025.json index b73d923bb3..06c98a2c95 100644 --- a/resources/machines/ultimaker2_extended_plus_025.json +++ b/resources/machines/ultimaker2_extended_plus_025.json @@ -1,11 +1,11 @@ { "id": "ultimaker2_extended_plus", - "version": 1, + "version": 1, "name": "Ultimaker 2 Extended+", "manufacturer": "Ultimaker", "author": "Ultimaker", "platform": "ultimaker2_platform.obj", - "platform_texture": "ultimaker2plus_backplate.png", + "platform_texture": "Ultimaker2ExtendedPlusbackplate.png", "file_formats": "text/x-gcode", "inherits": "ultimaker2_extended_plus.json", "variant": "0.25 mm", diff --git a/resources/machines/ultimaker2_extended_plus_040.json b/resources/machines/ultimaker2_extended_plus_040.json index e0b652b702..6ad7be488e 100644 --- a/resources/machines/ultimaker2_extended_plus_040.json +++ b/resources/machines/ultimaker2_extended_plus_040.json @@ -1,11 +1,11 @@ { "id": "ultimaker2_extended_plus", - "version": 1, + "version": 1, "name": "Ultimaker 2 Extended+", "manufacturer": "Ultimaker", "author": "Ultimaker", "platform": "ultimaker2_platform.obj", - "platform_texture": "ultimaker2plus_backplate.png", + "platform_texture": "Ultimaker2ExtendedPlusbackplate.png", "file_formats": "text/x-gcode", "inherits": "ultimaker2_extended_plus.json", "variant": "0.4 mm", diff --git a/resources/machines/ultimaker2_extended_plus_060.json b/resources/machines/ultimaker2_extended_plus_060.json index 93d1409701..490a68e89c 100644 --- a/resources/machines/ultimaker2_extended_plus_060.json +++ b/resources/machines/ultimaker2_extended_plus_060.json @@ -1,11 +1,11 @@ { "id": "ultimaker2_extended_plus", - "version": 1, + "version": 1, "name": "Ultimaker 2 Extended+", "manufacturer": "Ultimaker", "author": "Ultimaker", "platform": "ultimaker2_platform.obj", - "platform_texture": "ultimaker2plus_backplate.png", + "platform_texture": "Ultimaker2ExtendedPlusbackplate.png", "file_formats": "text/x-gcode", "inherits": "ultimaker2_extended_plus.json", "variant": "0.6 mm", diff --git a/resources/machines/ultimaker2_extended_plus_080.json b/resources/machines/ultimaker2_extended_plus_080.json index 0e4d815d98..e92064a54b 100644 --- a/resources/machines/ultimaker2_extended_plus_080.json +++ b/resources/machines/ultimaker2_extended_plus_080.json @@ -1,11 +1,11 @@ { "id": "ultimaker2_extended_plus", - "version": 1, + "version": 1, "name": "Ultimaker 2 Extended+", "manufacturer": "Ultimaker", "author": "Ultimaker", "platform": "ultimaker2_platform.obj", - "platform_texture": "ultimaker2plus_backplate.png", + "platform_texture": "Ultimaker2ExtendedPlusbackplate.png", "file_formats": "text/x-gcode", "inherits": "ultimaker2_extended_plus.json", "variant": "0.8 mm", diff --git a/resources/machines/ultimaker2_olsson.json b/resources/machines/ultimaker2_olsson.json new file mode 100644 index 0000000000..ec6acd1a18 --- /dev/null +++ b/resources/machines/ultimaker2_olsson.json @@ -0,0 +1,16 @@ +{ + "id": "ultimaker2_olsson_base", + "version": 1, + "name": "Ultimaker 2 with Olsson Block", + "manufacturer": "Ultimaker", + "author": "Ultimaker", + "platform": "ultimaker2_platform.obj", + "platform_texture": "Ultimaker2backplate.png", + "visible": false, + "file_formats": "text/x-gcode", + "inherits": "ultimaker2.json", + + "overrides": { + "machine_show_variants": { "default": true } + } +} diff --git a/resources/machines/ultimaker2_olsson_025.json b/resources/machines/ultimaker2_olsson_025.json new file mode 100644 index 0000000000..cc70c21624 --- /dev/null +++ b/resources/machines/ultimaker2_olsson_025.json @@ -0,0 +1,21 @@ +{ + "id": "ultimaker2_olsson", + "version": 1, + "name": "Ultimaker 2 with Olsson Block", + "manufacturer": "Ultimaker", + "author": "Ultimaker", + "platform": "ultimaker2_platform.obj", + "platform_texture": "Ultimaker2backplate.png", + "visible": false, + "file_formats": "text/x-gcode", + "inherits": "ultimaker2_olsson.json", + + "variant": "0.25 mm", + + "overrides": { + "machine_nozzle_size": { "default": 0.25 }, + + "coasting_volume": { "default": 0.1 }, + "coasting_min_volume": { "default": 0.17 } + } +} diff --git a/resources/machines/ultimaker2_olsson_040.json b/resources/machines/ultimaker2_olsson_040.json new file mode 100644 index 0000000000..481ff00b3a --- /dev/null +++ b/resources/machines/ultimaker2_olsson_040.json @@ -0,0 +1,18 @@ +{ + "id": "ultimaker2_olsson", + "version": 1, + "name": "Ultimaker 2 with Olsson Block", + "manufacturer": "Ultimaker", + "author": "Ultimaker", + "platform": "ultimaker2_platform.obj", + "platform_texture": "Ultimaker2backplate.png", + "visible": false, + "file_formats": "text/x-gcode", + "inherits": "ultimaker2_olsson.json", + + "variant": "0.4 mm", + + "overrides": { + "machine_nozzle_size": { "default": 0.40 } + } +} diff --git a/resources/machines/ultimaker2_olsson_060.json b/resources/machines/ultimaker2_olsson_060.json new file mode 100644 index 0000000000..a0e2af8ee9 --- /dev/null +++ b/resources/machines/ultimaker2_olsson_060.json @@ -0,0 +1,19 @@ +{ + "id": "ultimaker2_olsson", + "version": 1, + "name": "Ultimaker 2 with Olsson Block", + "manufacturer": "Ultimaker", + "author": "Ultimaker", + "platform": "ultimaker2_platform.obj", + "platform_texture": "Ultimaker2backplate.png", + "visible": false, + "file_formats": "text/x-gcode", + "inherits": "ultimaker2_olsson.json", + + "variant": "0.6 mm", + + "overrides": { + "machine_nozzle_size": { "default": 0.60 }, + "coasting_volume": { "default": 1.36 } + } +} diff --git a/resources/machines/ultimaker2_olsson_080.json b/resources/machines/ultimaker2_olsson_080.json new file mode 100644 index 0000000000..9ab0497651 --- /dev/null +++ b/resources/machines/ultimaker2_olsson_080.json @@ -0,0 +1,19 @@ +{ + "id": "ultimaker2_olsson", + "version": 1, + "name": "Ultimaker 2 with Olsson Block", + "manufacturer": "Ultimaker", + "author": "Ultimaker", + "platform": "ultimaker2_platform.obj", + "platform_texture": "Ultimaker2backplate.png", + "visible": false, + "file_formats": "text/x-gcode", + "inherits": "ultimaker2_olsson.json", + + "variant": "0.8 mm", + + "overrides": { + "machine_nozzle_size": { "default": 0.80 }, + "coasting_volume": { "default": 3.22 } + } +} diff --git a/resources/machines/ultimaker2plus.json b/resources/machines/ultimaker2plus.json index 5be86d1a76..e3acccad6f 100644 --- a/resources/machines/ultimaker2plus.json +++ b/resources/machines/ultimaker2plus.json @@ -5,7 +5,7 @@ "manufacturer": "Ultimaker", "author": "Ultimaker", "platform": "ultimaker2_platform.obj", - "platform_texture": "ultimaker2plus_backplate.png", + "platform_texture": "Ultimaker2Plusbackplate.png", "visible": false, "file_formats": "text/x-gcode", "inherits": "ultimaker2.json", @@ -16,28 +16,26 @@ "machine_height": { "default": 200 }, "machine_show_variants": { "default": true }, "gantry_height": { "default": 50 }, - "shell_thickness": { "default": 1.2 }, - "top_bottom_thickness": { "inherit_function": "(parent_value / 3) * 2" }, - "travel_compensate_overlapping_walls_enabled": { "default": true }, - "skin_alternate_rotation": { "default": true }, - "skin_outline_count": { "default": 2 }, - "infill_sparse_density": { "default": 10 }, - "infill_overlap": { "default": 0.056, "inherit_function": "0.14 * line_width if infill_sparse_density < 95 else 0" }, - "infill_wipe_dist": { "default": 0.35, "inherit_function": "wall_line_width_0" }, - "retraction_amount": { "default": 6 }, - "retraction_min_travel": { "default": 4.5 }, - "retraction_count_max": { "default": 6 }, - "retraction_extrusion_window": { "default": 6.0 }, - "speed_print": { "default": 50 }, - "speed_wall": { "inherit_function": "parent_value / 50 * 30" }, - "speed_wall_x": { "inherit_function": "speed_print / 50 * 40" }, - "speed_topbottom": { "inherit_function": "parent_value / 50 * 20" }, - "speed_layer_0": { "default": 20 }, - "skirt_speed": { "default": 20 }, - "travel_avoid_distance": { "default": 1.0 }, - "coasting_enable": { "default": true }, - "coasting_volume": { "default": 0.4 }, - "support_angle": { "default": 50 }, - "adhesion_type": { "default": "brim" } + "machine_head_with_fans_polygon": + { + "default": [ + [ + -44, + 14 + ], + [ + -44, + -34 + ], + [ + 64, + 14 + ], + [ + 64, + -34 + ] + ] + } } } diff --git a/resources/machines/ultimaker2plus_025.json b/resources/machines/ultimaker2plus_025.json index b51af3cafc..0e13d8c34d 100644 --- a/resources/machines/ultimaker2plus_025.json +++ b/resources/machines/ultimaker2plus_025.json @@ -5,7 +5,7 @@ "manufacturer": "Ultimaker", "author": "Ultimaker", "platform": "ultimaker2_platform.obj", - "platform_texture": "ultimaker2plus_backplate.png", + "platform_texture": "Ultimaker2Plusbackplate.png", "file_formats": "text/x-gcode", "inherits": "ultimaker2plus.json", @@ -13,16 +13,6 @@ "overrides": { "machine_nozzle_size": { "default": 0.25 }, - - "layer_height": { "default": 0.06 }, - "layer_height_0": { "default": 0.15 }, - - "infill_sparse_density": { "default": 12 }, - "speed_print": { "default": 30 }, - "speed_wall": { "inherit_function": "parent_value / 30 * 20" }, - "speed_wall_x": { "inherit_function": "speed_print / 30 * 25" }, - "speed_topbottom": { "inherit_function": "parent_value / 30 * 20" }, - "coasting_volume": { "default": 0.1 }, "coasting_min_volume": { "default": 0.17 } } diff --git a/resources/machines/ultimaker2plus_040.json b/resources/machines/ultimaker2plus_040.json index 1cb7383b18..c98bde63d3 100644 --- a/resources/machines/ultimaker2plus_040.json +++ b/resources/machines/ultimaker2plus_040.json @@ -5,16 +5,13 @@ "manufacturer": "Ultimaker", "author": "Ultimaker", "platform": "ultimaker2_platform.obj", - "platform_texture": "ultimaker2plus_backplate.png", + "platform_texture": "Ultimaker2Plusbackplate.png", "file_formats": "text/x-gcode", "inherits": "ultimaker2plus.json", "variant": "0.4 mm", "overrides": { - "machine_nozzle_size": { "default": 0.40 }, - - "wall_line_width_0": { "inherit_function": "parent_value * 0.875" }, - "skin_line_width": { "inherit_function": "parent_value * 0.875" } + "machine_nozzle_size": { "default": 0.40 } } } diff --git a/resources/machines/ultimaker2plus_060.json b/resources/machines/ultimaker2plus_060.json index 132fcfff45..243241cb4c 100644 --- a/resources/machines/ultimaker2plus_060.json +++ b/resources/machines/ultimaker2plus_060.json @@ -5,7 +5,7 @@ "manufacturer": "Ultimaker", "author": "Ultimaker", "platform": "ultimaker2_platform.obj", - "platform_texture": "ultimaker2plus_backplate.png", + "platform_texture": "Ultimaker2Plusbackplate.png", "file_formats": "text/x-gcode", "inherits": "ultimaker2plus.json", @@ -13,18 +13,6 @@ "overrides": { "machine_nozzle_size": { "default": 0.60 }, - - "layer_height": { "default": 0.15 }, - "layer_height_0": { "default": 0.4 }, - - "shell_thickness": { "default": 1.8 }, - - "infill_sparse_density": { "default": 15 }, - "speed_print": { "default": 55 }, - "speed_wall": { "inherit_function": "parent_value / 55 * 25" }, - "speed_wall_x": { "inherit_function": "speed_print / 55 * 40" }, - "speed_topbottom": { "inherit_function": "parent_value / 55 * 20" }, - "coasting_volume": { "default": 1.36 } } } diff --git a/resources/machines/ultimaker2plus_080.json b/resources/machines/ultimaker2plus_080.json index 02d5607552..be08f5c5a3 100644 --- a/resources/machines/ultimaker2plus_080.json +++ b/resources/machines/ultimaker2plus_080.json @@ -5,7 +5,7 @@ "manufacturer": "Ultimaker", "author": "Ultimaker", "platform": "ultimaker2_platform.obj", - "platform_texture": "ultimaker2plus_backplate.png", + "platform_texture": "Ultimaker2Plusbackplate.png", "file_formats": "text/x-gcode", "inherits": "ultimaker2plus.json", @@ -13,19 +13,6 @@ "overrides": { "machine_nozzle_size": { "default": 0.80 }, - - "layer_height": { "default": 0.2 }, - "layer_height_0": { "default": 0.5 }, - - "shell_thickness": { "default": 2.4 }, - "top_bottom_thickness": { "inherit_function": "parent_value / 2" }, - - "infill_sparse_density": { "default": 16 }, - "speed_print": { "default": 40 }, - "speed_wall": { "inherit_function": "parent_value / 40 * 20" }, - "speed_wall_x": { "inherit_function": "speed_print / 40 * 30" }, - "speed_topbottom": { "inherit_function": "parent_value / 40 * 20" }, - "coasting_volume": { "default": 3.22 } } } diff --git a/resources/machines/ultimaker_original.json b/resources/machines/ultimaker_original.json index 2eca316c1d..c27fb8e5b7 100644 --- a/resources/machines/ultimaker_original.json +++ b/resources/machines/ultimaker_original.json @@ -7,7 +7,7 @@ "icon": "icon_ultimaker.png", "platform": "ultimaker_platform.stl", "file_formats": "text/x-gcode", - "inherits": "fdmprinter.json", + "inherits": "ultimaker.json", "pages": [ "SelectUpgradedParts", diff --git a/resources/meshes/inventor_platform.STL b/resources/meshes/inventor_platform.stl similarity index 100% rename from resources/meshes/inventor_platform.STL rename to resources/meshes/inventor_platform.stl diff --git a/resources/profiles/materials/abs.cfg b/resources/profiles/materials/abs.cfg index 2ec46947a0..89095c0024 100644 --- a/resources/profiles/materials/abs.cfg +++ b/resources/profiles/materials/abs.cfg @@ -5,7 +5,7 @@ name = ABS [settings] material_bed_temperature = 100 -platform_adhesion = Brim +platform_adhesion = brim material_flow = 107 material_print_temperature = 250 cool_fan_speed = 50 diff --git a/resources/profiles/materials/cpe.cfg b/resources/profiles/materials/cpe.cfg index 508bd39fcf..431a6d38d7 100644 --- a/resources/profiles/materials/cpe.cfg +++ b/resources/profiles/materials/cpe.cfg @@ -5,7 +5,7 @@ name = CPE [settings] material_bed_temperature = 60 -platform_adhesion = Brim +platform_adhesion = brim material_flow = 100 material_print_temperature = 250 cool_fan_speed = 50 diff --git a/resources/profiles/materials/pla.cfg b/resources/profiles/materials/pla.cfg index a8d8c6a400..99a06e5e1b 100644 --- a/resources/profiles/materials/pla.cfg +++ b/resources/profiles/materials/pla.cfg @@ -5,7 +5,7 @@ name = PLA [settings] material_bed_temperature = 60 -platform_adhesion = Skirt +platform_adhesion = skirt material_flow = 100 material_print_temperature = 210 cool_fan_speed = 100 diff --git a/resources/profiles/ultimaker2+/abs_0.25_normal.curaprofile b/resources/profiles/ultimaker2+/abs_0.25_normal.curaprofile new file mode 100644 index 0000000000..dad488661a --- /dev/null +++ b/resources/profiles/ultimaker2+/abs_0.25_normal.curaprofile @@ -0,0 +1,26 @@ +[general] +version = 1 +name = Normal Quality +machine_type = ultimaker2plus +machine_variant = 0.25 mm +material = ABS + +[settings] +layer_height = 0.06 +top_bottom_thickness = 0.72 +layer_height_0 = 0.15 +speed_wall_x = 25 +wall_thickness = 0.88 +speed_infill = 30 +speed_topbottom = 20 +adhesion_type = brim +speed_print = 20 +cool_min_speed = 25 +line_width = 0.22 +infill_sparse_density = 22 +machine_nozzle_size = 0.22 +speed_wall_0 = 20 +cool_min_layer_time = 2 +cool_lift_head = True +cool_fan_speed_min = 50 + diff --git a/resources/profiles/ultimaker2+/abs_0.4_fast.curaprofile b/resources/profiles/ultimaker2+/abs_0.4_fast.curaprofile index d0afe8742e..444c168b86 100644 --- a/resources/profiles/ultimaker2+/abs_0.4_fast.curaprofile +++ b/resources/profiles/ultimaker2+/abs_0.4_fast.curaprofile @@ -1,51 +1,26 @@ [general] version = 1 -name = Fast Prints +name = Fast Print machine_type = ultimaker2plus machine_variant = 0.4 mm material = ABS [settings] -raft_surface_thickness = 0.27 -raft_base_line_width = 1.0 -raft_margin = 5.0 -cool_min_layer_time = 3 -support_enable = False -retraction_combing = All -speed_travel = 150 -cool_min_speed = 20 -brim_line_count = 20 -top_thickness = 0.75 -material_flow = 100.0 -cool_lift_head = True -speed_print = 40 -retraction_hop = 0.0 -machine_nozzle_size = 0.35 layer_height = 0.15 -speed_wall_0 = 30 -raft_interface_line_spacing = 3.0 -speed_topbottom = 30 -speed_infill = 55 -infill_before_walls = False -retraction_speed = 40.0 -skin_no_small_gaps_heuristic = False -infill_sparse_density = 18 -shell_thickness = 0.7 -cool_fan_speed_max = 100 -raft_airgap = 0.0 -material_bed_temperature = 70 -infill_overlap = 0.0525 -speed_wall_x = 40 -skirt_minimal_length = 150.0 -bottom_thickness = 0.75 -layer_height_0 = 0.26 -magic_mesh_surface_mode = False -cool_fan_speed_min = 50 top_bottom_thickness = 0.75 -skirt_gap = 3.0 -raft_interface_line_width = 0.4 +layer_height_0 = 0.26 +speed_print = 40 +speed_wall_x = 40 +wall_thickness = 0.7 +speed_infill = 55 +speed_topbottom = 30 +cool_min_layer_time = 3 +cool_min_speed = 20 +line_width = 0.35 +infill_sparse_density = 18 +machine_nozzle_size = 0.35 +speed_travel = 150 +speed_wall_0 = 30 adhesion_type = brim -support_pattern = lines -raft_surface_line_width = 0.4 -raft_surface_line_spacing = 3.0 - +cool_lift_head = True +cool_fan_speed_min = 50 \ No newline at end of file diff --git a/resources/profiles/ultimaker2+/abs_0.4_high.curaprofile b/resources/profiles/ultimaker2+/abs_0.4_high.curaprofile index c67f924158..4fb2b49fe3 100644 --- a/resources/profiles/ultimaker2+/abs_0.4_high.curaprofile +++ b/resources/profiles/ultimaker2+/abs_0.4_high.curaprofile @@ -6,46 +6,21 @@ machine_variant = 0.4 mm material = ABS [settings] -raft_surface_thickness = 0.27 -raft_base_line_width = 1.0 -raft_margin = 5.0 -cool_min_layer_time = 3 -support_enable = False -retraction_combing = All -cool_min_speed = 20 -brim_line_count = 20 -top_thickness = 0.72 -material_flow = 100.0 -cool_lift_head = True -speed_print = 30 -retraction_hop = 0.0 -machine_nozzle_size = 0.35 layer_height = 0.06 -speed_wall_0 = 20 -raft_interface_line_spacing = 3.0 -speed_topbottom = 20 -speed_infill = 45 -infill_before_walls = False -retraction_speed = 40.0 -skin_no_small_gaps_heuristic = False -infill_sparse_density = 22 -shell_thickness = 1.05 -cool_fan_speed_max = 100 -raft_airgap = 0.0 -material_bed_temperature = 70 -infill_overlap = 0.0525 -speed_wall_x = 30 -skirt_minimal_length = 150.0 -speed_layer_0 = 20 -bottom_thickness = 0.72 -layer_height_0 = 0.26 -magic_mesh_surface_mode = False -cool_fan_speed_min = 50 top_bottom_thickness = 0.72 -skirt_gap = 3.0 -raft_interface_line_width = 0.4 +layer_height_0 = 0.26 +speed_print = 30 +speed_wall_x = 30 +wall_thickness = 1.05 +speed_infill = 45 +speed_topbottom = 20 adhesion_type = brim -support_pattern = lines -raft_surface_line_width = 0.4 -raft_surface_line_spacing = 3.0 +cool_min_speed = 20 +line_width = 0.35 +infill_sparse_density = 22 +machine_nozzle_size = 0.35 +speed_wall_0 = 20 +cool_min_layer_time = 3 +cool_lift_head = True +cool_fan_speed_min = 50 diff --git a/resources/profiles/ultimaker2+/abs_0.4_normal.curaprofile b/resources/profiles/ultimaker2+/abs_0.4_normal.curaprofile index d34b91b446..a8d63d07db 100644 --- a/resources/profiles/ultimaker2+/abs_0.4_normal.curaprofile +++ b/resources/profiles/ultimaker2+/abs_0.4_normal.curaprofile @@ -6,41 +6,18 @@ machine_variant = 0.4 mm material = ABS [settings] -raft_surface_thickness = 0.27 -raft_base_line_width = 1.0 -raft_margin = 5.0 -support_enable = False -retraction_combing = All -cool_min_speed = 20 -brim_line_count = 20 -material_flow = 100.0 -cool_lift_head = True +layer_height_0 = 0.26 speed_print = 30 -retraction_hop = 0.0 +speed_wall_x = 30 +wall_thickness = 1.05 +speed_infill = 45 +speed_topbottom = 20 +cool_min_layer_time = 3 +cool_min_speed = 20 +line_width = 0.35 machine_nozzle_size = 0.35 speed_wall_0 = 20 -raft_interface_line_spacing = 3.0 -speed_topbottom = 20 -speed_infill = 45 -infill_before_walls = False -retraction_speed = 40.0 -skin_no_small_gaps_heuristic = False -shell_thickness = 1.05 -cool_fan_speed_max = 100 -raft_airgap = 0.0 -material_bed_temperature = 70 -infill_overlap = 0.0525 -speed_wall_x = 30 -skirt_minimal_length = 150.0 -speed_layer_0 = 20 -layer_height_0 = 0.26 -magic_mesh_surface_mode = False -cool_fan_speed_min = 50 -cool_min_layer_time = 3 -skirt_gap = 3.0 -raft_interface_line_width = 0.4 adhesion_type = brim -support_pattern = lines -raft_surface_line_width = 0.4 -raft_surface_line_spacing = 3.0 +cool_lift_head = True +cool_fan_speed_min = 50 diff --git a/resources/profiles/ultimaker2+/abs_0.6_normal.curaprofile b/resources/profiles/ultimaker2+/abs_0.6_normal.curaprofile index 801fe7f29b..a0aa77129b 100644 --- a/resources/profiles/ultimaker2+/abs_0.6_normal.curaprofile +++ b/resources/profiles/ultimaker2+/abs_0.6_normal.curaprofile @@ -6,45 +6,20 @@ machine_variant = 0.6 mm material = ABS [settings] -raft_surface_thickness = 0.27 -raft_base_line_width = 1.0 -raft_margin = 5.0 -cool_min_layer_time = 3 -support_enable = False -retraction_combing = All -cool_min_speed = 20 -brim_line_count = 14 -top_thickness = 1.2 -material_flow = 100.0 -cool_lift_head = True -speed_print = 25 -retraction_hop = 0.0 -machine_nozzle_size = 0.53 layer_height = 0.15 -speed_wall_0 = 20 -raft_interface_line_spacing = 3.0 -speed_topbottom = 20 -speed_infill = 55 -infill_before_walls = False -retraction_speed = 40.0 -skin_no_small_gaps_heuristic = False -shell_thickness = 1.59 -cool_fan_speed_max = 100 -raft_airgap = 0.0 -material_bed_temperature = 70 -infill_overlap = 0.0795 -speed_wall_x = 30 -skirt_minimal_length = 150.0 -speed_layer_0 = 20 -bottom_thickness = 1.2 -layer_height_0 = 0.39 -magic_mesh_surface_mode = False -cool_fan_speed_min = 50 top_bottom_thickness = 1.2 -skirt_gap = 3.0 -raft_interface_line_width = 0.4 +layer_height_0 = 0.39 +speed_print = 25 +speed_wall_x = 30 +wall_thickness = 1.59 +speed_infill = 55 +speed_topbottom = 20 adhesion_type = brim -support_pattern = lines -raft_surface_line_width = 0.4 -raft_surface_line_spacing = 3.0 +cool_min_speed = 20 +line_width = 0.53 +machine_nozzle_size = 0.53 +speed_wall_0 = 20 +cool_min_layer_time = 3 +cool_lift_head = True +cool_fan_speed_min = 50 diff --git a/resources/profiles/ultimaker2+/abs_0.8_normal.curaprofile b/resources/profiles/ultimaker2+/abs_0.8_normal.curaprofile new file mode 100644 index 0000000000..94e08a790c --- /dev/null +++ b/resources/profiles/ultimaker2+/abs_0.8_normal.curaprofile @@ -0,0 +1,25 @@ +[general] +version = 1 +name = Normal Quality +machine_type = ultimaker2plus +machine_variant = 0.8 mm +material = ABS + +[settings] +layer_height = 0.2 +top_bottom_thickness = 1.2 +layer_height_0 = 0.5 +speed_print = 20 +speed_wall_x = 30 +wall_thickness = 2.1 +speed_infill = 40 +speed_topbottom = 20 +adhesion_type = brim +cool_min_speed = 15 +line_width = 0.7 +machine_nozzle_size = 0.7 +speed_wall_0 = 20 +cool_min_layer_time = 3 +cool_lift_head = True +cool_fan_speed_min = 50 + diff --git a/resources/profiles/ultimaker2+/cpe_0.25_normal.curaprofile b/resources/profiles/ultimaker2+/cpe_0.25_normal.curaprofile new file mode 100644 index 0000000000..f5f5e24d61 --- /dev/null +++ b/resources/profiles/ultimaker2+/cpe_0.25_normal.curaprofile @@ -0,0 +1,26 @@ +[general] +version = 1 +name = Normal Quality +machine_type = ultimaker2plus +machine_variant = 0.25 mm +material = CPE + +[settings] +infill_overlap = 17 +layer_height = 0.06 +wall_thickness = 0.88 +layer_height_0 = 0.15 +speed_wall_x = 25 +top_bottom_thickness = 0.72 +speed_infill = 30 +speed_topbottom = 20 +cool_min_layer_time = 2 +speed_print = 20 +line_width = 0.22 +infill_sparse_density = 22 +machine_nozzle_size = 0.22 +speed_wall_0 = 20 +adhesion_type = brim +cool_lift_head = True +cool_fan_speed_min = 50 + diff --git a/resources/profiles/ultimaker2+/cpe_0.4_fast.curaprofile b/resources/profiles/ultimaker2+/cpe_0.4_fast.curaprofile index 82df8ce412..7880c2584c 100644 --- a/resources/profiles/ultimaker2+/cpe_0.4_fast.curaprofile +++ b/resources/profiles/ultimaker2+/cpe_0.4_fast.curaprofile @@ -1,50 +1,27 @@ [general] version = 1 -name = Fast Prints +name = Fast Print machine_type = ultimaker2plus machine_variant = 0.4 mm material = CPE [settings] -cool_fan_speed_min = 50 -retraction_hop = 0.0 -skin_no_small_gaps_heuristic = False -raft_airgap = 0.0 -speed_travel = 150 -raft_surface_thickness = 0.27 -raft_interface_line_spacing = 3.0 -support_enable = False -raft_surface_line_width = 0.4 -raft_surface_line_spacing = 3.0 -retraction_combing = All -adhesion_type = brim +infill_overlap = 17 cool_min_layer_time = 3 layer_height = 0.15 -raft_margin = 5.0 -speed_infill = 45 -bottom_thickness = 0.75 -brim_line_count = 20 -cool_lift_head = True -retraction_speed = 40.0 -cool_fan_speed_max = 100 -magic_mesh_surface_mode = False -speed_print = 30 -shell_thickness = 0.7 -speed_wall_0 = 30 -material_flow = 100.0 -support_pattern = lines -infill_sparse_density = 18 -raft_interface_line_width = 0.4 +wall_thickness = 0.7 layer_height_0 = 0.26 -material_bed_temperature = 70 -top_thickness = 0.75 -top_bottom_thickness = 0.75 +speed_print = 30 speed_wall_x = 40 -infill_overlap = 0.0595 -infill_before_walls = False -skirt_minimal_length = 150.0 +top_bottom_thickness = 0.75 +speed_infill = 45 speed_topbottom = 20 -skirt_gap = 3.0 -raft_base_line_width = 1.0 +speed_travel = 150 +line_width = 0.35 +infill_sparse_density = 18 machine_nozzle_size = 0.35 +speed_wall_0 = 30 +adhesion_type = brim +cool_lift_head = True +cool_fan_speed_min = 50 diff --git a/resources/profiles/ultimaker2+/cpe_0.4_high.curaprofile b/resources/profiles/ultimaker2+/cpe_0.4_high.curaprofile index 31a47bf22c..d4aad942ca 100644 --- a/resources/profiles/ultimaker2+/cpe_0.4_high.curaprofile +++ b/resources/profiles/ultimaker2+/cpe_0.4_high.curaprofile @@ -6,45 +6,20 @@ machine_variant = 0.4 mm material = CPE [settings] -cool_fan_speed_min = 50 -retraction_hop = 0.0 -support_enable = False -raft_airgap = 0.0 -raft_surface_thickness = 0.27 -raft_interface_line_spacing = 3.0 -skin_no_small_gaps_heuristic = False -bottom_thickness = 0.72 -raft_surface_line_spacing = 3.0 -retraction_combing = All -adhesion_type = brim -cool_min_layer_time = 3 layer_height = 0.06 -raft_margin = 5.0 -speed_infill = 45 -speed_layer_0 = 20 -brim_line_count = 20 -cool_lift_head = True -retraction_speed = 40.0 -cool_fan_speed_max = 100 -magic_mesh_surface_mode = False -speed_print = 20 -shell_thickness = 1.05 -speed_wall_0 = 20 -material_flow = 100.0 -support_pattern = lines -infill_sparse_density = 22 -raft_interface_line_width = 0.4 -layer_height_0 = 0.26 -material_bed_temperature = 70 -top_thickness = 0.72 top_bottom_thickness = 0.72 +layer_height_0 = 0.26 +speed_print = 20 speed_wall_x = 30 -infill_overlap = 0.0525 -infill_before_walls = False -raft_surface_line_width = 0.4 -skirt_minimal_length = 150.0 +wall_thickness = 1.05 +speed_infill = 45 speed_topbottom = 20 -skirt_gap = 3.0 -raft_base_line_width = 1.0 +adhesion_type = brim +line_width = 0.35 +infill_sparse_density = 22 machine_nozzle_size = 0.35 +speed_wall_0 = 20 +cool_min_layer_time = 3 +cool_lift_head = True +cool_fan_speed_min = 50 diff --git a/resources/profiles/ultimaker2+/cpe_0.4_normal.curaprofile b/resources/profiles/ultimaker2+/cpe_0.4_normal.curaprofile index 171c2c2f62..ae721733e5 100644 --- a/resources/profiles/ultimaker2+/cpe_0.4_normal.curaprofile +++ b/resources/profiles/ultimaker2+/cpe_0.4_normal.curaprofile @@ -6,40 +6,17 @@ machine_variant = 0.4 mm material = CPE [settings] -retraction_hop = 0.0 -support_enable = False -raft_airgap = 0.0 -raft_surface_thickness = 0.27 -support_pattern = lines -raft_interface_line_spacing = 3.0 -skin_no_small_gaps_heuristic = False -raft_surface_line_width = 0.4 -cool_fan_speed_min = 50 -retraction_combing = All -adhesion_type = brim -cool_min_layer_time = 3 -infill_before_walls = False -speed_layer_0 = 20 -brim_line_count = 20 -cool_lift_head = True -raft_interface_line_width = 0.4 -cool_fan_speed_max = 100 -magic_mesh_surface_mode = False -speed_print = 20 -shell_thickness = 1.05 -speed_wall_0 = 20 -material_flow = 100.0 -raft_surface_line_spacing = 3.0 -raft_margin = 5.0 -retraction_speed = 40.0 layer_height_0 = 0.26 -material_bed_temperature = 70 +speed_print = 20 speed_wall_x = 30 -infill_overlap = 0.0525 +wall_thickness = 1.05 speed_infill = 45 -skirt_minimal_length = 150.0 speed_topbottom = 20 -skirt_gap = 3.0 -raft_base_line_width = 1.0 +cool_min_layer_time = 3 +line_width = 0.35 machine_nozzle_size = 0.35 +speed_wall_0 = 20 +adhesion_type = brim +cool_lift_head = True +cool_fan_speed_min = 50 diff --git a/resources/profiles/ultimaker2+/cpe_0.6_normal.curaprofile b/resources/profiles/ultimaker2+/cpe_0.6_normal.curaprofile index 58e5bbced0..56738c556f 100644 --- a/resources/profiles/ultimaker2+/cpe_0.6_normal.curaprofile +++ b/resources/profiles/ultimaker2+/cpe_0.6_normal.curaprofile @@ -6,44 +6,20 @@ machine_variant = 0.6 mm material = CPE [settings] -cool_fan_speed_min = 50 -retraction_hop = 0.0 -support_enable = False -raft_airgap = 0.0 -raft_surface_thickness = 0.27 -raft_interface_line_spacing = 3.0 -skin_no_small_gaps_heuristic = False -bottom_thickness = 1.2 -support_pattern = lines -retraction_combing = All -adhesion_type = brim -cool_min_layer_time = 3 +infill_overlap = 17 layer_height = 0.15 -speed_infill = 40 -speed_layer_0 = 20 -brim_line_count = 14 -cool_lift_head = True -retraction_speed = 40.0 -cool_fan_speed_max = 100 -magic_mesh_surface_mode = False -speed_print = 20 -shell_thickness = 1.59 -speed_wall_0 = 20 -material_flow = 100.0 -raft_surface_line_spacing = 3.0 -raft_margin = 5.0 -raft_interface_line_width = 0.4 -layer_height_0 = 0.39 -material_bed_temperature = 70 -top_thickness = 1.2 top_bottom_thickness = 1.2 +layer_height_0 = 0.39 speed_wall_x = 30 -infill_overlap = 0.0901 -infill_before_walls = False -raft_surface_line_width = 0.4 -skirt_minimal_length = 150.0 +wall_thickness = 1.59 +speed_infill = 40 speed_topbottom = 20 -skirt_gap = 3.0 -raft_base_line_width = 1.0 +cool_min_layer_time = 3 +speed_print = 20 +line_width = 0.53 machine_nozzle_size = 0.53 +speed_wall_0 = 20 +adhesion_type = brim +cool_lift_head = True +cool_fan_speed_min = 50 diff --git a/resources/profiles/ultimaker2+/cpe_0.8_normal.curaprofile b/resources/profiles/ultimaker2+/cpe_0.8_normal.curaprofile new file mode 100644 index 0000000000..054c5dbe88 --- /dev/null +++ b/resources/profiles/ultimaker2+/cpe_0.8_normal.curaprofile @@ -0,0 +1,25 @@ +[general] +version = 1 +name = Normal Quality +machine_type = ultimaker2plus +machine_variant = 0.8 mm +material = CPE + +[settings] +infill_overlap = 17 +layer_height = 0.2 +top_bottom_thickness = 1.2 +layer_height_0 = 0.5 +speed_wall_x = 30 +wall_thickness = 2.1 +speed_infill = 40 +speed_topbottom = 20 +cool_min_layer_time = 3 +speed_print = 20 +line_width = 0.7 +machine_nozzle_size = 0.7 +speed_wall_0 = 20 +adhesion_type = brim +cool_lift_head = True +cool_fan_speed_min = 50 + diff --git a/resources/profiles/ultimaker2+/pla_0.25_normal.curaprofile b/resources/profiles/ultimaker2+/pla_0.25_normal.curaprofile new file mode 100644 index 0000000000..da48907c11 --- /dev/null +++ b/resources/profiles/ultimaker2+/pla_0.25_normal.curaprofile @@ -0,0 +1,31 @@ +[general] +version = 1 +name = Normal Quality +machine_type = ultimaker2plus +machine_variant = 0.25 mm +material = PLA + +[settings] +machine_nozzle_size = 0.22 +layer_height = 0.06 +layer_height_0 = 0.15 +shell_thickness = 0.88 +top_bottom_thickness = 0.72 +top_bottom_pattern = lines +infill_sparse_density = 22 +infill_wipe_dist = 0.1 +retraction_amount = 6 +retraction_min_travel = 0.5 +retraction_count_max = 30 +retraction_extrusion_window = 6 +speed_infill = 30 +speed_wall_0 = 20 +speed_wall_x = 25 +speed_topbottom = 20 +speed_layer_0 = 25 +skirt_speed = 25 +speed_slowdown_layers = 2 +travel_avoid_distance = 1 +cool_fan_full_layer = 2 +cool_min_layer_time_fan_speed_max = 15 +adhesion_type = brim diff --git a/resources/profiles/ultimaker2+/pla_0.4_fast.curaprofile b/resources/profiles/ultimaker2+/pla_0.4_fast.curaprofile index 4edf925732..43bc715372 100644 --- a/resources/profiles/ultimaker2+/pla_0.4_fast.curaprofile +++ b/resources/profiles/ultimaker2+/pla_0.4_fast.curaprofile @@ -1,47 +1,32 @@ [general] version = 1 -name = Fast Prints +name = Fast Print machine_type = ultimaker2plus machine_variant = 0.4 mm material = PLA [settings] -retraction_combing = All -top_thickness = 0.75 -speed_print = 40 -speed_wall_0 = 40 -raft_surface_line_spacing = 3.0 -shell_thickness = 0.7 -infill_sparse_density = 18 -retraction_hop = 0.0 -material_bed_temperature = 70 -skin_no_small_gaps_heuristic = False -retraction_speed = 40.0 -raft_surface_line_width = 0.4 -raft_base_line_width = 1.0 -raft_margin = 5.0 -adhesion_type = brim -skirt_minimal_length = 150.0 -layer_height = 0.15 -brim_line_count = 22 -infill_before_walls = False -raft_surface_thickness = 0.27 -raft_airgap = 0.0 -infill_overlap = 0.0525 -raft_interface_line_width = 0.4 -speed_topbottom = 30 -support_pattern = lines -layer_height_0 = 0.26 -raft_interface_line_spacing = 3.0 -material_flow = 100.0 -cool_fan_speed_min = 100 -cool_fan_speed_max = 100 -speed_travel = 150 -skirt_gap = 3.0 -magic_mesh_surface_mode = False -bottom_thickness = 0.75 -speed_wall_x = 50 machine_nozzle_size = 0.35 -top_bottom_thickness = 0.75 -support_enable = False - +layer_height = 0.15 +layer_height_0 = 0.26 +shell_thickness = 0.7 +top_bottom_thickness = 0.6 +top_bottom_pattern = lines +infill_sparse_density = 18 +infill_wipe_dist = 0.2 +retraction_amount = 5.5 +retraction_min_travel = 0.5 +retraction_count_max = 30 +retraction_extrusion_window = 6 +speed_infill = 60 +speed_wall_0 = 40 +speed_wall_x = 50 +speed_topbottom = 30 +speed_travel = 150 +speed_layer_0 = 25 +skirt_speed = 25 +speed_slowdown_layers = 2 +travel_avoid_distance = 1 +cool_fan_full_layer = 2 +cool_min_layer_time_fan_speed_max = 15 +adhesion_type = brim diff --git a/resources/profiles/ultimaker2+/pla_0.4_high.curaprofile b/resources/profiles/ultimaker2+/pla_0.4_high.curaprofile index 9de62fbc69..d97fba3de9 100644 --- a/resources/profiles/ultimaker2+/pla_0.4_high.curaprofile +++ b/resources/profiles/ultimaker2+/pla_0.4_high.curaprofile @@ -6,43 +6,26 @@ machine_variant = 0.4 mm material = PLA [settings] -retraction_combing = All -top_thickness = 0.72 -speed_layer_0 = 20 -speed_print = 30 -speed_wall_0 = 30 -raft_interface_line_spacing = 3.0 -shell_thickness = 1.05 -infill_overlap = 0.0525 -retraction_hop = 0.0 -material_bed_temperature = 70 -skin_no_small_gaps_heuristic = False -retraction_speed = 40.0 -raft_surface_line_width = 0.4 -raft_base_line_width = 1.0 -raft_margin = 5.0 -adhesion_type = brim -skirt_minimal_length = 150.0 -layer_height = 0.06 -brim_line_count = 22 -infill_before_walls = False -raft_surface_thickness = 0.27 -raft_airgap = 0.0 -skirt_gap = 3.0 -raft_interface_line_width = 0.4 -speed_topbottom = 20 -support_pattern = lines -layer_height_0 = 0.26 -infill_sparse_density = 22 -material_flow = 100.0 -cool_fan_speed_min = 100 -top_bottom_thickness = 0.72 -cool_fan_speed_max = 100 -speed_infill = 50 -magic_mesh_surface_mode = False -bottom_thickness = 0.72 -speed_wall_x = 40 machine_nozzle_size = 0.35 -raft_surface_line_spacing = 3.0 -support_enable = False - +layer_height = 0.06 +layer_height_0 = 0.26 +shell_thickness = 1.05 +top_bottom_thickness = 0.84 +top_bottom_pattern = lines +infill_sparse_density = 22 +infill_wipe_dist = 0.2 +retraction_amount = 5.5 +retraction_min_travel = 0.5 +retraction_count_max = 30 +retraction_extrusion_window = 6 +speed_infill = 50 +speed_wall_0 = 30 +speed_wall_x = 40 +speed_topbottom = 20 +speed_layer_0 = 25 +skirt_speed = 25 +speed_slowdown_layers = 2 +travel_avoid_distance = 1 +cool_fan_full_layer = 2 +cool_min_layer_time_fan_speed_max = 15 +adhesion_type = brim \ No newline at end of file diff --git a/resources/profiles/ultimaker2+/pla_0.4_normal.curaprofile b/resources/profiles/ultimaker2+/pla_0.4_normal.curaprofile index c45cc2ec61..6f46ec4c7a 100644 --- a/resources/profiles/ultimaker2+/pla_0.4_normal.curaprofile +++ b/resources/profiles/ultimaker2+/pla_0.4_normal.curaprofile @@ -6,38 +6,26 @@ machine_variant = 0.4 mm material = PLA [settings] -retraction_combing = All -shell_thickness = 1.05 -speed_print = 30 -speed_wall_0 = 30 -raft_interface_line_spacing = 3.0 -speed_layer_0 = 20 -layer_height_0 = 0.26 -retraction_hop = 0.0 -material_bed_temperature = 70 -skirt_gap = 3.0 -retraction_speed = 40.0 -raft_surface_line_width = 0.4 -raft_base_line_width = 1.0 -raft_margin = 5.0 -adhesion_type = brim -skirt_minimal_length = 150.0 -brim_line_count = 22 -infill_before_walls = False -raft_surface_thickness = 0.27 -raft_airgap = 0.0 -infill_overlap = 0.0525 -raft_interface_line_width = 0.4 -speed_topbottom = 20 -support_pattern = lines -speed_infill = 50 -material_flow = 100.0 -cool_fan_speed_min = 100 -cool_fan_speed_max = 100 -skin_no_small_gaps_heuristic = False -magic_mesh_surface_mode = False -speed_wall_x = 40 machine_nozzle_size = 0.35 -raft_surface_line_spacing = 3.0 -support_enable = False - +layer_height = 0.1 +layer_height_0 = 0.26 +shell_thickness = 1.05 +top_bottom_thickness = 0.8 +top_bottom_pattern = lines +infill_sparse_density = 20 +infill_wipe_dist = 0.2 +retraction_amount = 5.5 +retraction_min_travel = 0.5 +retraction_count_max = 30 +retraction_extrusion_window = 6 +speed_infill = 50 +speed_wall_0 = 30 +speed_wall_x = 40 +speed_topbottom = 20 +speed_layer_0 = 25 +skirt_speed = 25 +speed_slowdown_layers = 2 +travel_avoid_distance = 1 +cool_fan_full_layer = 2 +cool_min_layer_time_fan_speed_max = 15 +adhesion_type = brim diff --git a/resources/profiles/ultimaker2+/pla_0.4_ulti.curaprofile b/resources/profiles/ultimaker2+/pla_0.4_ulti.curaprofile new file mode 100644 index 0000000000..b342b8cde4 --- /dev/null +++ b/resources/profiles/ultimaker2+/pla_0.4_ulti.curaprofile @@ -0,0 +1,31 @@ +[general] +version = 1 +name = Ulti Quality +machine_type = ultimaker2plus +machine_variant = 0.4 mm +material = PLA + +[settings] +machine_nozzle_size = 0.35 +layer_height = 0.04 +layer_height_0 = 0.26 +shell_thickness = 1.4 +top_bottom_thickness = 1.12 +top_bottom_pattern = lines +infill_sparse_density = 25 +infill_wipe_dist = 0.2 +retraction_amount = 5.5 +retraction_min_travel = 0.5 +retraction_count_max = 30 +retraction_extrusion_window = 6 +speed_infill = 50 +speed_wall_0 = 30 +speed_wall_x = 40 +speed_topbottom = 20 +speed_layer_0 = 25 +skirt_speed = 25 +speed_slowdown_layers = 2 +travel_avoid_distance = 1 +cool_fan_full_layer = 2 +cool_min_layer_time_fan_speed_max = 15 +adhesion_type = brim diff --git a/resources/profiles/ultimaker2+/pla_0.6_normal.curaprofile b/resources/profiles/ultimaker2+/pla_0.6_normal.curaprofile index 7ec4c4b513..0a4d760a61 100644 --- a/resources/profiles/ultimaker2+/pla_0.6_normal.curaprofile +++ b/resources/profiles/ultimaker2+/pla_0.6_normal.curaprofile @@ -6,42 +6,26 @@ machine_variant = 0.6 mm material = PLA [settings] -retraction_combing = All -top_thickness = 1.2 -speed_layer_0 = 20 -speed_print = 25 -speed_wall_0 = 25 -raft_interface_line_spacing = 3.0 -shell_thickness = 1.59 -infill_overlap = 0.0795 -retraction_hop = 0.0 -material_bed_temperature = 70 -skin_no_small_gaps_heuristic = False -retraction_speed = 40.0 -raft_surface_line_width = 0.4 -raft_base_line_width = 1.0 -raft_margin = 5.0 -adhesion_type = brim -skirt_minimal_length = 150.0 -layer_height = 0.15 -brim_line_count = 15 -infill_before_walls = False -raft_surface_thickness = 0.27 -raft_airgap = 0.0 -skirt_gap = 3.0 -raft_interface_line_width = 0.4 -speed_topbottom = 20 -support_pattern = lines -layer_height_0 = 0.39 -material_flow = 100.0 -cool_fan_speed_min = 100 -top_bottom_thickness = 1.2 -cool_fan_speed_max = 100 -speed_infill = 55 -magic_mesh_surface_mode = False -bottom_thickness = 1.2 -speed_wall_x = 40 machine_nozzle_size = 0.53 -raft_surface_line_spacing = 3.0 -support_enable = False - +layer_height = 0.15 +layer_height_0 = 0.4 +shell_thickness = 1.59 +top_bottom_thickness = 1.2 +top_bottom_pattern = lines +infill_sparse_density = 20 +infill_wipe_dist = 0.3 +retraction_amount = 6 +retraction_min_travel = 0.5 +retraction_count_max = 30 +retraction_extrusion_window = 6 +speed_infill = 55 +speed_wall_0 = 25 +speed_wall_x = 40 +speed_topbottom = 20 +speed_layer_0 = 25 +skirt_speed = 25 +speed_slowdown_layers = 2 +travel_avoid_distance = 1.2 +cool_fan_full_layer = 2 +cool_min_layer_time_fan_speed_max = 20 +adhesion_type = brim diff --git a/resources/profiles/ultimaker2+/pla_0.8_normal.curaprofile b/resources/profiles/ultimaker2+/pla_0.8_normal.curaprofile new file mode 100644 index 0000000000..b8d88fabfc --- /dev/null +++ b/resources/profiles/ultimaker2+/pla_0.8_normal.curaprofile @@ -0,0 +1,31 @@ +[general] +version = 1 +name = Normal Quality +machine_type = ultimaker2plus +machine_variant = 0.8 mm +material = PLA + +[settings] +machine_nozzle_size = 0.7 +layer_height = 0.2 +layer_height_0 = 0.5 +shell_thickness = 2.1 +top_bottom_thickness = 1.6 +top_bottom_pattern = lines +infill_sparse_density = 20 +infill_wipe_dist = 0.4 +retraction_amount = 6 +retraction_min_travel = 0.5 +retraction_count_max = 30 +retraction_extrusion_window = 6 +speed_infill = 40 +speed_wall_0 = 20 +speed_wall_x = 30 +speed_topbottom = 20 +speed_layer_0 = 25 +skirt_speed = 25 +speed_slowdown_layers = 2 +travel_avoid_distance = 1.6 +cool_fan_full_layer = 2 +cool_min_layer_time_fan_speed_max = 25 +adhesion_type = brim diff --git a/resources/profiles/ultimaker2_olsson/0.25_normal.curaprofile b/resources/profiles/ultimaker2_olsson/0.25_normal.curaprofile new file mode 100644 index 0000000000..11f354a043 --- /dev/null +++ b/resources/profiles/ultimaker2_olsson/0.25_normal.curaprofile @@ -0,0 +1,31 @@ +[general] +version = 1 +name = Normal Quality +machine_type = ultimaker2_olsson +machine_variant = 0.25 mm + +[settings] +machine_nozzle_size = 0.22 +layer_height = 0.06 +layer_height_0 = 0.15 +shell_thickness = 0.88 +top_bottom_thickness = 0.72 +top_bottom_pattern = lines +infill_sparse_density = 22 +infill_overlap = 0.022 +infill_wipe_dist = 0.1 +retraction_amount = 6 +retraction_min_travel = 0.5 +retraction_count_max = 30 +retraction_extrusion_window = 6 +speed_infill = 30 +speed_wall_0 = 20 +speed_wall_x = 25 +speed_topbottom = 20 +speed_layer_0 = 25 +skirt_speed = 25 +speed_slowdown_layers = 2 +travel_avoid_distance = 1 +cool_fan_full_layer = 2 +cool_min_layer_time_fan_speed_max = 15 +adhesion_type = brim diff --git a/resources/profiles/ultimaker2_olsson/0.4_fast.curaprofile b/resources/profiles/ultimaker2_olsson/0.4_fast.curaprofile new file mode 100644 index 0000000000..2c4a2b2146 --- /dev/null +++ b/resources/profiles/ultimaker2_olsson/0.4_fast.curaprofile @@ -0,0 +1,32 @@ +[general] +version = 1 +name = Fast Print +machine_type = ultimaker2_olsson +machine_variant = 0.4 mm + +[settings] +machine_nozzle_size = 0.35 +layer_height = 0.15 +layer_height_0 = 0.26 +shell_thickness = 0.7 +top_bottom_thickness = 0.6 +top_bottom_pattern = lines +infill_sparse_density = 18 +infill_overlap = 0.035 +infill_wipe_dist = 0.2 +retraction_amount = 5.5 +retraction_min_travel = 0.5 +retraction_count_max = 30 +retraction_extrusion_window = 6 +speed_infill = 60 +speed_wall_0 = 40 +speed_wall_x = 50 +speed_topbottom = 30 +speed_travel = 150 +speed_layer_0 = 25 +skirt_speed = 25 +speed_slowdown_layers = 2 +travel_avoid_distance = 1 +cool_fan_full_layer = 2 +cool_min_layer_time_fan_speed_max = 15 +adhesion_type = brim diff --git a/resources/profiles/ultimaker2_olsson/0.4_high.curaprofile b/resources/profiles/ultimaker2_olsson/0.4_high.curaprofile new file mode 100644 index 0000000000..3c3d8325c9 --- /dev/null +++ b/resources/profiles/ultimaker2_olsson/0.4_high.curaprofile @@ -0,0 +1,31 @@ +[general] +version = 1 +name = High Quality +machine_type = ultimaker2_olsson +machine_variant = 0.4 mm + +[settings] +machine_nozzle_size = 0.35 +layer_height = 0.06 +layer_height_0 = 0.26 +shell_thickness = 1.05 +top_bottom_thickness = 0.84 +top_bottom_pattern = lines +infill_sparse_density = 22 +infill_overlap = 0.035 +infill_wipe_dist = 0.2 +retraction_amount = 5.5 +retraction_min_travel = 0.5 +retraction_count_max = 30 +retraction_extrusion_window = 6 +speed_infill = 50 +speed_wall_0 = 30 +speed_wall_x = 40 +speed_topbottom = 20 +speed_layer_0 = 25 +skirt_speed = 25 +speed_slowdown_layers = 2 +travel_avoid_distance = 1 +cool_fan_full_layer = 2 +cool_min_layer_time_fan_speed_max = 15 +adhesion_type = brim diff --git a/resources/profiles/ultimaker2_olsson/0.4_normal.curaprofile b/resources/profiles/ultimaker2_olsson/0.4_normal.curaprofile new file mode 100644 index 0000000000..53a716b0ff --- /dev/null +++ b/resources/profiles/ultimaker2_olsson/0.4_normal.curaprofile @@ -0,0 +1,31 @@ +[general] +version = 1 +name = Normal Quality +machine_type = ultimaker2_olsson +machine_variant = 0.4 mm + +[settings] +machine_nozzle_size = 0.35 +layer_height = 0.1 +layer_height_0 = 0.26 +shell_thickness = 1.05 +top_bottom_thickness = 0.8 +top_bottom_pattern = lines +infill_sparse_density = 20 +infill_overlap = 0.035 +infill_wipe_dist = 0.2 +retraction_amount = 5.5 +retraction_min_travel = 0.5 +retraction_count_max = 30 +retraction_extrusion_window = 6 +speed_infill = 50 +speed_wall_0 = 30 +speed_wall_x = 40 +speed_topbottom = 20 +speed_layer_0 = 25 +skirt_speed = 25 +speed_slowdown_layers = 2 +travel_avoid_distance = 1 +cool_fan_full_layer = 2 +cool_min_layer_time_fan_speed_max = 15 +adhesion_type = brim diff --git a/resources/profiles/ultimaker2_olsson/0.4_ulti.curaprofile b/resources/profiles/ultimaker2_olsson/0.4_ulti.curaprofile new file mode 100644 index 0000000000..c51d49b80d --- /dev/null +++ b/resources/profiles/ultimaker2_olsson/0.4_ulti.curaprofile @@ -0,0 +1,31 @@ +[general] +version = 1 +name = Ulti Quality +machine_type = ultimaker2_olsson +machine_variant = 0.4 mm + +[settings] +machine_nozzle_size = 0.35 +layer_height = 0.04 +layer_height_0 = 0.26 +shell_thickness = 1.4 +top_bottom_thickness = 1.12 +top_bottom_pattern = lines +infill_sparse_density = 25 +infill_overlap = 0.035 +infill_wipe_dist = 0.2 +retraction_amount = 5.5 +retraction_min_travel = 0.5 +retraction_count_max = 30 +retraction_extrusion_window = 6 +speed_infill = 50 +speed_wall_0 = 30 +speed_wall_x = 40 +speed_topbottom = 20 +speed_layer_0 = 25 +skirt_speed = 25 +speed_slowdown_layers = 2 +travel_avoid_distance = 1 +cool_fan_full_layer = 2 +cool_min_layer_time_fan_speed_max = 15 +adhesion_type = brim diff --git a/resources/profiles/ultimaker2_olsson/0.6_normal.curaprofile b/resources/profiles/ultimaker2_olsson/0.6_normal.curaprofile new file mode 100644 index 0000000000..055ebd13fe --- /dev/null +++ b/resources/profiles/ultimaker2_olsson/0.6_normal.curaprofile @@ -0,0 +1,31 @@ +[general] +version = 1 +name = Normal Quality +machine_type = ultimaker2_olsson +machine_variant = 0.6 mm + +[settings] +machine_nozzle_size = 0.53 +layer_height = 0.15 +layer_height_0 = 0.4 +shell_thickness = 1.59 +top_bottom_thickness = 1.2 +top_bottom_pattern = lines +infill_sparse_density = 20 +infill_overlap = 0.053 +infill_wipe_dist = 0.3 +retraction_amount = 6 +retraction_min_travel = 0.5 +retraction_count_max = 30 +retraction_extrusion_window = 6 +speed_infill = 55 +speed_wall_0 = 25 +speed_wall_x = 40 +speed_topbottom = 20 +speed_layer_0 = 25 +skirt_speed = 25 +speed_slowdown_layers = 2 +travel_avoid_distance = 1.2 +cool_fan_full_layer = 2 +cool_min_layer_time_fan_speed_max = 20 +adhesion_type = brim diff --git a/resources/profiles/ultimaker2_olsson/0.8_normal.curaprofile b/resources/profiles/ultimaker2_olsson/0.8_normal.curaprofile new file mode 100644 index 0000000000..d346d3105b --- /dev/null +++ b/resources/profiles/ultimaker2_olsson/0.8_normal.curaprofile @@ -0,0 +1,31 @@ +[general] +version = 1 +name = Normal Quality +machine_type = ultimaker2_olsson +machine_variant = 0.8 mm + +[settings] +machine_nozzle_size = 0.7 +layer_height = 0.2 +layer_height_0 = 0.5 +shell_thickness = 2.1 +top_bottom_thickness = 1.6 +top_bottom_pattern = lines +infill_sparse_density = 20 +infill_overlap = 0.07 +infill_wipe_dist = 0.4 +retraction_amount = 6 +retraction_min_travel = 0.5 +retraction_count_max = 30 +retraction_extrusion_window = 6 +speed_infill = 40 +speed_wall_0 = 20 +speed_wall_x = 30 +speed_topbottom = 20 +speed_layer_0 = 25 +skirt_speed = 25 +speed_slowdown_layers = 2 +travel_avoid_distance = 1.6 +cool_fan_full_layer = 2 +cool_min_layer_time_fan_speed_max = 25 +adhesion_type = brim diff --git a/resources/qml/AboutDialog.qml b/resources/qml/AboutDialog.qml index 48ecdf0563..eb8795c5a6 100644 --- a/resources/qml/AboutDialog.qml +++ b/resources/qml/AboutDialog.qml @@ -24,7 +24,7 @@ UM.Dialog width: parent.width * 0.75 height: width * (1/4.25) - source: UM.Theme.images.logo + source: UM.Theme.getImage("logo") sourceSize.width: width sourceSize.height: height @@ -38,7 +38,7 @@ UM.Dialog id: version text: "Cura %1".arg(UM.Application.version) - font: UM.Theme.fonts.large + font: UM.Theme.getFont("large") anchors.horizontalCenter : logo.horizontalCenter anchors.horizontalCenterOffset : (logo.width * 0.25) anchors.top: logo.bottom diff --git a/resources/qml/Cura.qml b/resources/qml/Cura.qml index a1e1ce4909..279a9180e0 100644 --- a/resources/qml/Cura.qml +++ b/resources/qml/Cura.qml @@ -92,7 +92,7 @@ UM.MainWindow text: catalog.i18nc("@action:inmenu menubar:file", "&Save Selection to File"); enabled: UM.Selection.hasSelection; iconName: "document-save-as"; - onTriggered: UM.OutputDeviceManager.requestWriteSelectionToDevice("local_file", Printer.jobName, false); + onTriggered: UM.OutputDeviceManager.requestWriteSelectionToDevice("local_file", Printer.jobName, { "filter_by_machine": false }); } Menu { @@ -108,7 +108,7 @@ UM.MainWindow MenuItem { text: model.description; - onTriggered: UM.OutputDeviceManager.requestWriteToDevice(model.id, Printer.jobName, false); + onTriggered: UM.OutputDeviceManager.requestWriteToDevice(model.id, Printer.jobName, { "filter_by_machine": false }); } onObjectAdded: saveAllMenu.insertItem(index, object) onObjectRemoved: saveAllMenu.removeItem(object) @@ -214,13 +214,24 @@ UM.MainWindow Instantiator { + id: profileMenuInstantiator model: UM.ProfilesModel { } MenuItem { text: model.name; checkable: true; checked: model.active; exclusiveGroup: profileMenuGroup; - onTriggered: UM.MachineManager.setActiveProfile(model.name) + onTriggered: + { + UM.MachineManager.setActiveProfile(model.name); + if (!model.active) { + //Selecting a profile was canceled; undo menu selection + profileMenuInstantiator.model.setProperty(index, "active", false); + var activeProfileName = UM.MachineManager.activeProfile; + var activeProfileIndex = profileMenuInstantiator.model.find("name", activeProfileName); + profileMenuInstantiator.model.setProperty(activeProfileIndex, "active", true); + } + } } onObjectAdded: profileMenu.insertItem(index, object) onObjectRemoved: profileMenu.removeItem(object) @@ -326,8 +337,8 @@ UM.MainWindow { bottom: parent.bottom; right: sidebar.left; - bottomMargin: UM.Theme.sizes.default_margin.height; - rightMargin: UM.Theme.sizes.default_margin.width; + bottomMargin: UM.Theme.getSize("default_margin").height; + rightMargin: UM.Theme.getSize("default_margin").width; } } @@ -336,7 +347,7 @@ UM.MainWindow anchors { horizontalCenter: parent.horizontalCenter - horizontalCenterOffset: -(UM.Theme.sizes.sidebar.width/ 2) + horizontalCenterOffset: -(UM.Theme.getSize("sidebar").width/ 2) top: parent.verticalCenter; bottom: parent.bottom; } @@ -350,10 +361,10 @@ UM.MainWindow //anchors.right: parent.right; //anchors.bottom: parent.bottom anchors.top: viewModeButton.bottom - anchors.topMargin: UM.Theme.sizes.default_margin.height; + anchors.topMargin: UM.Theme.getSize("default_margin").height; anchors.left: viewModeButton.left; //anchors.bottom: buttons.top; - //anchors.bottomMargin: UM.Theme.sizes.default_margin.height; + //anchors.bottomMargin: UM.Theme.getSize("default_margin").height; height: childrenRect.height; @@ -365,15 +376,15 @@ UM.MainWindow id: openFileButton; //style: UM.Backend.progress < 0 ? UM.Theme.styles.open_file_button : UM.Theme.styles.tool_button; text: catalog.i18nc("@action:button","Open File"); - iconSource: UM.Theme.icons.load + iconSource: UM.Theme.getIcon("load") style: UM.Theme.styles.tool_button tooltip: ''; anchors { top: parent.top; - //topMargin: UM.Theme.sizes.loadfile_margin.height + //topMargin: UM.Theme.getSize("loadfile_margin").height left: parent.left; - //leftMargin: UM.Theme.sizes.loadfile_margin.width + //leftMargin: UM.Theme.getSize("loadfile_margin").width } action: actions.open; } @@ -384,14 +395,14 @@ UM.MainWindow anchors { left: parent.left - leftMargin: UM.Theme.sizes.default_margin.width; + leftMargin: UM.Theme.getSize("default_margin").width; bottom: parent.bottom - bottomMargin: UM.Theme.sizes.default_margin.height; + bottomMargin: UM.Theme.getSize("default_margin").height; } - source: UM.Theme.images.logo; - width: UM.Theme.sizes.logo.width; - height: UM.Theme.sizes.logo.height; + source: UM.Theme.getImage("logo"); + width: UM.Theme.getSize("logo").width; + height: UM.Theme.getSize("logo").height; z: -1; sourceSize.width: width; @@ -405,11 +416,11 @@ UM.MainWindow anchors { top: toolbar.bottom; - topMargin: UM.Theme.sizes.window_margin.height; + topMargin: UM.Theme.getSize("window_margin").height; left: parent.left; } text: catalog.i18nc("@action:button","View Mode"); - iconSource: UM.Theme.icons.viewmode; + iconSource: UM.Theme.getIcon("viewmode"); style: UM.Theme.styles.tool_button; tooltip: ''; @@ -442,7 +453,7 @@ UM.MainWindow anchors { top: openFileButton.bottom; - topMargin: UM.Theme.sizes.window_margin.height; + topMargin: UM.Theme.getSize("window_margin").height; left: parent.left; } } @@ -458,18 +469,28 @@ UM.MainWindow right: parent.right; } - width: UM.Theme.sizes.sidebar.width; + width: UM.Theme.getSize("sidebar").width; addMachineAction: actions.addMachine; configureMachinesAction: actions.configureMachines; addProfileAction: actions.addProfile; manageProfilesAction: actions.manageProfiles; + + configureSettingsAction: Action + { + onTriggered: + { + preferences.visible = true; + preferences.setPage(2); + preferences.getCurrentItem().scrollToSection(source.key); + } + } } Rectangle { - x: base.mouseX + UM.Theme.sizes.default_margin.width; - y: base.mouseY + UM.Theme.sizes.default_margin.height; + x: base.mouseX + UM.Theme.getSize("default_margin").width; + y: base.mouseY + UM.Theme.getSize("default_margin").height; width: childrenRect.width; height: childrenRect.height; @@ -491,25 +512,22 @@ UM.MainWindow { //; Remove & re-add the general page as we want to use our own instead of uranium standard. removePage(0); - insertPage(0, catalog.i18nc("@title:tab","General"), generalPage); + insertPage(0, catalog.i18nc("@title:tab","General"), Qt.resolvedUrl("GeneralPage.qml")); //: View preferences page title - insertPage(1, catalog.i18nc("@title:tab","View"), viewPage); + insertPage(1, catalog.i18nc("@title:tab","View"), Qt.resolvedUrl("ViewPage.qml")); //Force refresh setPage(0) } - Item { - visible: false - GeneralPage + onVisibleChanged: + { + if(!visible) { - id: generalPage - } - - ViewPage - { - id: viewPage + // When the dialog closes, switch to the General page. + // This prevents us from having a heavy page like Setting Visiblity active in the background. + setPage(0); } } } @@ -582,7 +600,7 @@ UM.MainWindow addMachine.onTriggered: addMachineWizard.visible = true; addProfile.onTriggered: { UM.MachineManager.createProfile(); preferences.visible = true; preferences.setPage(4); } - preferences.onTriggered: { preferences.visible = true; preferences.setPage(0); } + preferences.onTriggered: { preferences.visible = true; } configureMachines.onTriggered: { preferences.visible = true; preferences.setPage(3); } manageProfiles.onTriggered: { preferences.visible = true; preferences.setPage(4); } @@ -649,7 +667,7 @@ UM.MainWindow //TODO: Support multiple file selection, workaround bug in KDE file dialog //selectMultiple: true nameFilters: UM.MeshFileHandler.supportedReadFileTypes; - + folder: Printer.getDefaultPath() onAccepted: { //Because several implementations of the file dialog only update the folder @@ -688,11 +706,6 @@ UM.MainWindow } } - Component.onCompleted: - { - UM.Theme.load(UM.Resources.getPath(UM.Resources.Themes, "cura")) - } - Timer { id: startupTimer; diff --git a/resources/qml/JobSpecs.qml b/resources/qml/JobSpecs.qml index 81df2bb08a..041ad160e2 100644 --- a/resources/qml/JobSpecs.qml +++ b/resources/qml/JobSpecs.qml @@ -25,7 +25,6 @@ Rectangle { property variant printDuration: PrintInformation.currentPrintTime; property real printMaterialAmount: PrintInformation.materialAmount; - width: UM.Theme.sizes.jobspecs.width height: childrenRect.height color: "transparent" @@ -80,7 +79,7 @@ Rectangle { id: jobNameRow anchors.top: parent.top anchors.right: parent.right - height: UM.Theme.sizes.jobspecs_line.height + height: UM.Theme.getSize("jobspecs_line").height visible: base.activity Item @@ -93,8 +92,8 @@ Rectangle { id: printJobPencilIcon anchors.right: parent.right anchors.verticalCenter: parent.verticalCenter - width: UM.Theme.sizes.save_button_specs_icons.width - height: UM.Theme.sizes.save_button_specs_icons.height + width: UM.Theme.getSize("save_button_specs_icons").width + height: UM.Theme.getSize("save_button_specs_icons").height onClicked: { @@ -108,30 +107,31 @@ Rectangle { color: "transparent" UM.RecolorImage { - width: UM.Theme.sizes.save_button_specs_icons.width - height: UM.Theme.sizes.save_button_specs_icons.height + width: UM.Theme.getSize("save_button_specs_icons").width + height: UM.Theme.getSize("save_button_specs_icons").height sourceSize.width: width sourceSize.height: width - color: control.hovered ? UM.Theme.colors.setting_control_button_hover : UM.Theme.colors.text - source: UM.Theme.icons.pencil; + color: control.hovered ? UM.Theme.getColor("setting_control_button_hover") : UM.Theme.getColor("text"); + source: UM.Theme.getIcon("pencil"); } } } } - TextField + TextField { id: printJobTextfield anchors.right: printJobPencilIcon.left - anchors.rightMargin: UM.Theme.sizes.default_margin.width/2 - height: UM.Theme.sizes.jobspecs_line.height - width: base.width + anchors.rightMargin: UM.Theme.getSize("default_margin").width/2 + height: UM.Theme.getSize("jobspecs_line").height + width: __contentWidth + UM.Theme.getSize("default_margin").width + maximumLength: 120 property int unremovableSpacing: 5 text: '' horizontalAlignment: TextInput.AlignRight onTextChanged: { if(text != ''){ - //this prevent that is sets an empty string as jobname + //Prevent that jobname is set to an empty string Printer.setJobName(text) } } @@ -144,8 +144,8 @@ Rectangle { regExp: /^[^\\ \/ \.]*$/ } style: TextFieldStyle{ - textColor: UM.Theme.colors.setting_control_text; - font: UM.Theme.fonts.default_bold; + textColor: UM.Theme.getColor("setting_control_text"); + font: UM.Theme.getFont("default_bold"); background: Rectangle { opacity: 0 border.width: 0 @@ -159,10 +159,10 @@ Rectangle { id: boundingSpec anchors.top: jobNameRow.bottom anchors.right: parent.right - height: UM.Theme.sizes.jobspecs_line.height + height: UM.Theme.getSize("jobspecs_line").height verticalAlignment: Text.AlignVCenter - font: UM.Theme.fonts.small - color: UM.Theme.colors.text_subtext + font: UM.Theme.getFont("small") + color: UM.Theme.getColor("text_subtext") text: Printer.getSceneBoundingBoxString } @@ -170,7 +170,7 @@ Rectangle { id: specsRow anchors.top: boundingSpec.bottom anchors.right: parent.right - height: UM.Theme.sizes.jobspecs_line.height + height: UM.Theme.getSize("jobspecs_line").height Item{ width: parent.width @@ -179,42 +179,42 @@ Rectangle { UM.RecolorImage { id: timeIcon anchors.right: timeSpec.left - anchors.rightMargin: UM.Theme.sizes.default_margin.width/2 + anchors.rightMargin: UM.Theme.getSize("default_margin").width/2 anchors.verticalCenter: parent.verticalCenter - width: UM.Theme.sizes.save_button_specs_icons.width - height: UM.Theme.sizes.save_button_specs_icons.height + width: UM.Theme.getSize("save_button_specs_icons").width + height: UM.Theme.getSize("save_button_specs_icons").height sourceSize.width: width sourceSize.height: width - color: UM.Theme.colors.text_subtext - source: UM.Theme.icons.print_time; + color: UM.Theme.getColor("text_subtext") + source: UM.Theme.getIcon("print_time"); } Label{ id: timeSpec anchors.right: lengthIcon.left - anchors.rightMargin: UM.Theme.sizes.default_margin.width + anchors.rightMargin: UM.Theme.getSize("default_margin").width anchors.verticalCenter: parent.verticalCenter - font: UM.Theme.fonts.small - color: UM.Theme.colors.text_subtext + font: UM.Theme.getFont("small") + color: UM.Theme.getColor("text_subtext") text: (!base.printDuration || !base.printDuration.valid) ? catalog.i18nc("@label", "00h 00min") : base.printDuration.getDisplayString(UM.DurationFormat.Short) } UM.RecolorImage { id: lengthIcon anchors.right: lengthSpec.left - anchors.rightMargin: UM.Theme.sizes.default_margin.width/2 + anchors.rightMargin: UM.Theme.getSize("default_margin").width/2 anchors.verticalCenter: parent.verticalCenter - width: UM.Theme.sizes.save_button_specs_icons.width - height: UM.Theme.sizes.save_button_specs_icons.height + width: UM.Theme.getSize("save_button_specs_icons").width + height: UM.Theme.getSize("save_button_specs_icons").height sourceSize.width: width sourceSize.height: width - color: UM.Theme.colors.text_subtext - source: UM.Theme.icons.category_material; + color: UM.Theme.getColor("text_subtext") + source: UM.Theme.getIcon("category_material"); } Label{ id: lengthSpec anchors.right: parent.right anchors.verticalCenter: parent.verticalCenter - font: UM.Theme.fonts.small - color: UM.Theme.colors.text_subtext + font: UM.Theme.getFont("small") + color: UM.Theme.getColor("text_subtext") text: base.printMaterialAmount <= 0 ? catalog.i18nc("@label", "0.0 m") : catalog.i18nc("@label", "%1 m").arg(base.printMaterialAmount) } } diff --git a/resources/qml/ProfileSetup.qml b/resources/qml/ProfileSetup.qml index 52e9bc0827..e8d966ae40 100644 --- a/resources/qml/ProfileSetup.qml +++ b/resources/qml/ProfileSetup.qml @@ -18,18 +18,18 @@ Item{ Rectangle{ id: globalProfileRow anchors.top: base.top - height: UM.Theme.sizes.sidebar_setup.height + height: UM.Theme.getSize("sidebar_setup").height width: base.width Label{ id: globalProfileLabel anchors.left: parent.left - anchors.leftMargin: UM.Theme.sizes.default_margin.width; + anchors.leftMargin: UM.Theme.getSize("default_margin").width; anchors.verticalCenter: parent.verticalCenter text: catalog.i18nc("@label","Profile:"); width: parent.width/100*45 - font: UM.Theme.fonts.default; - color: UM.Theme.colors.text; + font: UM.Theme.getFont("default"); + color: UM.Theme.getColor("text"); } @@ -37,9 +37,9 @@ Item{ id: globalProfileSelection text: UM.MachineManager.activeProfile width: parent.width/100*55 - height: UM.Theme.sizes.setting_control.height + height: UM.Theme.getSize("setting_control").height anchors.right: parent.right - anchors.rightMargin: UM.Theme.sizes.default_margin.width + anchors.rightMargin: UM.Theme.getSize("default_margin").width anchors.verticalCenter: parent.verticalCenter tooltip: UM.MachineManager.activeProfile style: UM.Theme.styles.sidebar_header_button @@ -49,6 +49,7 @@ Item{ id: profileSelectionMenu Instantiator { + id: profileSelectionInstantiator model: UM.ProfilesModel { } MenuItem { @@ -56,7 +57,17 @@ Item{ checkable: true; checked: model.active; exclusiveGroup: profileSelectionMenuGroup; - onTriggered: UM.MachineManager.setActiveProfile(model.name) + onTriggered: + { + UM.MachineManager.setActiveProfile(model.name); + if (!model.active) { + //Selecting a profile was canceled; undo menu selection + profileSelectionInstantiator.model.setProperty(index, "active", false); + var activeProfileName = UM.MachineManager.activeProfile; + var activeProfileIndex = profileSelectionInstantiator.model.find("name", activeProfileName); + profileSelectionInstantiator.model.setProperty(activeProfileIndex, "active", true); + } + } } onObjectAdded: profileSelectionMenu.insertItem(index, object) onObjectRemoved: profileSelectionMenu.removeItem(object) diff --git a/resources/qml/SaveButton.qml b/resources/qml/SaveButton.qml index 4a29325007..acdb43d67b 100644 --- a/resources/qml/SaveButton.qml +++ b/resources/qml/SaveButton.qml @@ -16,7 +16,7 @@ Rectangle { property int backendState: UM.Backend.state; property bool activity: Printer.getPlatformActivity; //Behavior on progress { NumberAnimation { duration: 250; } } - property int totalHeight: childrenRect.height + UM.Theme.sizes.default_margin.height + property int totalHeight: childrenRect.height + UM.Theme.getSize("default_margin").height property string fileBaseName property string statusText: { if(base.backendState == 0) { @@ -34,32 +34,32 @@ Rectangle { Label { id: statusLabel - width: parent.width - 2 * UM.Theme.sizes.default_margin.width + width: parent.width - 2 * UM.Theme.getSize("default_margin").width anchors.top: parent.top anchors.left: parent.left - anchors.leftMargin: UM.Theme.sizes.default_margin.width + anchors.leftMargin: UM.Theme.getSize("default_margin").width - color: UM.Theme.colors.text - font: UM.Theme.fonts.large + color: UM.Theme.getColor("text") + font: UM.Theme.getFont("large") text: statusText; } Rectangle{ id: progressBar - width: parent.width - 2 * UM.Theme.sizes.default_margin.width - height: UM.Theme.sizes.progressbar.height + width: parent.width - 2 * UM.Theme.getSize("default_margin").width + height: UM.Theme.getSize("progressbar").height anchors.top: statusLabel.bottom - anchors.topMargin: UM.Theme.sizes.default_margin.height/4 + anchors.topMargin: UM.Theme.getSize("default_margin").height/4 anchors.left: parent.left - anchors.leftMargin: UM.Theme.sizes.default_margin.width - radius: UM.Theme.sizes.progressbar_radius.width - color: UM.Theme.colors.progressbar_background + anchors.leftMargin: UM.Theme.getSize("default_margin").width + radius: UM.Theme.getSize("progressbar_radius").width + color: UM.Theme.getColor("progressbar_background") Rectangle{ width: Math.max(parent.width * base.progress) height: parent.height - color: UM.Theme.colors.progressbar_control - radius: UM.Theme.sizes.progressbar_radius.width + color: UM.Theme.getColor("progressbar_control") + radius: UM.Theme.getSize("progressbar_radius").width visible: base.backendState == 1 ? true : false } } @@ -69,48 +69,48 @@ Rectangle { width: base.width height: saveToButton.height anchors.top: progressBar.bottom - anchors.topMargin: UM.Theme.sizes.default_margin.height + anchors.topMargin: UM.Theme.getSize("default_margin").height anchors.left: parent.left Button { id: saveToButton - property int resizedWidth - x: base.width - saveToButton.resizedWidth - UM.Theme.sizes.default_margin.width - UM.Theme.sizes.save_button_save_to_button.height + UM.Theme.sizes.save_button_save_to_button.width + tooltip: UM.OutputDeviceManager.activeDeviceDescription; enabled: base.backendState == 2 && base.activity == true - height: UM.Theme.sizes.save_button_save_to_button.height - width: 150 - anchors.top:parent.top + height: UM.Theme.getSize("save_button_save_to_button").height + + anchors.top: parent.top + anchors.right: deviceSelectionMenu.left; + anchors.rightMargin: -3 * UM.Theme.getSize("default_lining").width; + text: UM.OutputDeviceManager.activeDeviceShortDescription onClicked: { - UM.OutputDeviceManager.requestWriteToDevice(UM.OutputDeviceManager.activeDevice, Printer.jobName, true) + UM.OutputDeviceManager.requestWriteToDevice(UM.OutputDeviceManager.activeDevice, Printer.jobName, { "filter_by_machine": true }) } style: ButtonStyle { - background: Rectangle { - //opacity: control.enabled ? 1.0 : 0.5 - //Behavior on opacity { NumberAnimation { duration: 50; } } - border.width: UM.Theme.sizes.default_lining.width - border.color: !control.enabled ? UM.Theme.colors.action_button_disabled_border : - control.pressed ? UM.Theme.colors.action_button_active_border : - control.hovered ? UM.Theme.colors.action_button_hovered_border : UM.Theme.colors.action_button_border - color: !control.enabled ? UM.Theme.colors.action_button_disabled : - control.pressed ? UM.Theme.colors.action_button_active : - control.hovered ? UM.Theme.colors.action_button_hovered : UM.Theme.colors.action_button + background: + Rectangle + { + border.width: UM.Theme.getSize("default_lining").width + border.color: !control.enabled ? UM.Theme.getColor("action_button_disabled_border") : + control.pressed ? UM.Theme.getColor("action_button_active_border") : + control.hovered ? UM.Theme.getColor("action_button_hovered_border") : UM.Theme.getColor("action_button_border") + color: !control.enabled ? UM.Theme.getColor("action_button_disabled") : + control.pressed ? UM.Theme.getColor("action_button_active") : + control.hovered ? UM.Theme.getColor("action_button_hovered") : UM.Theme.getColor("action_button") Behavior on color { ColorAnimation { duration: 50; } } - width: { - saveToButton.resizedWidth = actualLabel.width + (UM.Theme.sizes.default_margin.width * 2) - return saveToButton.resizedWidth - } + + implicitWidth: actualLabel.contentWidth + (UM.Theme.getSize("default_margin").width * 2) + Label { id: actualLabel - //Behavior on opacity { NumberAnimation { duration: 50; } } anchors.centerIn: parent - color: !control.enabled ? UM.Theme.colors.action_button_disabled_text : - control.pressed ? UM.Theme.colors.action_button_active_text : - control.hovered ? UM.Theme.colors.action_button_hovered_text : UM.Theme.colors.action_button_text - font: UM.Theme.fonts.action_button + color: !control.enabled ? UM.Theme.getColor("action_button_disabled_text") : + control.pressed ? UM.Theme.getColor("action_button_active_text") : + control.hovered ? UM.Theme.getColor("action_button_hovered_text") : UM.Theme.getColor("action_button_text") + font: UM.Theme.getFont("action_button") text: control.text; } } @@ -121,41 +121,43 @@ Rectangle { Button { id: deviceSelectionMenu tooltip: catalog.i18nc("@info:tooltip","Select the active output device"); - anchors.top:parent.top + anchors.top: parent.top anchors.right: parent.right - anchors.rightMargin: UM.Theme.sizes.default_margin.width - width: UM.Theme.sizes.save_button_save_to_button.height - height: UM.Theme.sizes.save_button_save_to_button.height + + anchors.rightMargin: UM.Theme.getSize("default_margin").width + width: UM.Theme.getSize("save_button_save_to_button").height + height: UM.Theme.getSize("save_button_save_to_button").height enabled: base.backendState == 2 && base.activity == true + //iconSource: UM.Theme.icons[UM.OutputDeviceManager.activeDeviceIconName]; style: ButtonStyle { background: Rectangle { id: deviceSelectionIcon - border.width: UM.Theme.sizes.default_lining.width - border.color: !control.enabled ? UM.Theme.colors.action_button_disabled_border : - control.pressed ? UM.Theme.colors.action_button_active_border : - control.hovered ? UM.Theme.colors.action_button_hovered_border : UM.Theme.colors.action_button_border - color: !control.enabled ? UM.Theme.colors.action_button_disabled : - control.pressed ? UM.Theme.colors.action_button_active : - control.hovered ? UM.Theme.colors.action_button_hovered : UM.Theme.colors.action_button + border.width: UM.Theme.getSize("default_lining").width + border.color: !control.enabled ? UM.Theme.getColor("action_button_disabled_border") : + control.pressed ? UM.Theme.getColor("action_button_active_border") : + control.hovered ? UM.Theme.getColor("action_button_hovered_border") : UM.Theme.getColor("action_button_border") + color: !control.enabled ? UM.Theme.getColor("action_button_disabled") : + control.pressed ? UM.Theme.getColor("action_button_active") : + control.hovered ? UM.Theme.getColor("action_button_hovered") : UM.Theme.getColor("action_button") Behavior on color { ColorAnimation { duration: 50; } } anchors.left: parent.left - anchors.leftMargin: UM.Theme.sizes.save_button_text_margin.width / 2; + anchors.leftMargin: UM.Theme.getSize("save_button_text_margin").width / 2; width: parent.height height: parent.height UM.RecolorImage { anchors.verticalCenter: parent.verticalCenter anchors.horizontalCenter: parent.horizontalCenter - width: UM.Theme.sizes.standard_arrow.width - height: UM.Theme.sizes.standard_arrow.height + width: UM.Theme.getSize("standard_arrow").width + height: UM.Theme.getSize("standard_arrow").height sourceSize.width: width sourceSize.height: height - color: !control.enabled ? UM.Theme.colors.action_button_disabled_text : - control.pressed ? UM.Theme.colors.action_button_active_text : - control.hovered ? UM.Theme.colors.action_button_hovered_text : UM.Theme.colors.action_button_text; - source: UM.Theme.icons.arrow_bottom; + color: !control.enabled ? UM.Theme.getColor("action_button_disabled_text") : + control.pressed ? UM.Theme.getColor("action_button_active_text") : + control.hovered ? UM.Theme.getColor("action_button_hovered_text") : UM.Theme.getColor("action_button_text"); + source: UM.Theme.getIcon("arrow_bottom"); } } label: Label{ } diff --git a/resources/qml/Sidebar.qml b/resources/qml/Sidebar.qml index 2778e9d779..742fadb34e 100644 --- a/resources/qml/Sidebar.qml +++ b/resources/qml/Sidebar.qml @@ -16,9 +16,10 @@ Rectangle property Action configureMachinesAction; property Action addProfileAction; property Action manageProfilesAction; + property Action configureSettingsAction; property int currentModeIndex; - color: UM.Theme.colors.sidebar; + color: UM.Theme.getColor("sidebar"); UM.I18nCatalog { id: catalog; name:"cura"} function showTooltip(item, position, text) @@ -56,10 +57,10 @@ Rectangle Rectangle { id: headerSeparator width: parent.width - height: UM.Theme.sizes.sidebar_lining.height - color: UM.Theme.colors.sidebar_lining + height: UM.Theme.getSize("sidebar_lining").height + color: UM.Theme.getColor("sidebar_lining") anchors.top: header.bottom - anchors.topMargin: UM.Theme.sizes.default_margin.height + anchors.topMargin: UM.Theme.getSize("default_margin").height } ProfileSetup { @@ -67,7 +68,7 @@ Rectangle addProfileAction: base.addProfileAction manageProfilesAction: base.manageProfilesAction anchors.top: settingsModeSelection.bottom - anchors.topMargin: UM.Theme.sizes.default_margin.height + anchors.topMargin: UM.Theme.getSize("default_margin").height width: parent.width height: totalHeightProfileSetup } @@ -94,22 +95,22 @@ Rectangle id: settingsModeLabel text: catalog.i18nc("@label:listbox","Setup"); anchors.left: parent.left - anchors.leftMargin: UM.Theme.sizes.default_margin.width; + anchors.leftMargin: UM.Theme.getSize("default_margin").width; anchors.top: headerSeparator.bottom - anchors.topMargin: UM.Theme.sizes.default_margin.height + anchors.topMargin: UM.Theme.getSize("default_margin").height width: parent.width/100*45 - font: UM.Theme.fonts.large; - color: UM.Theme.colors.text + font: UM.Theme.getFont("large"); + color: UM.Theme.getColor("text") } Rectangle { id: settingsModeSelection width: parent.width/100*55 - height: UM.Theme.sizes.sidebar_header_mode_toggle.height + height: UM.Theme.getSize("sidebar_header_mode_toggle").height anchors.right: parent.right - anchors.rightMargin: UM.Theme.sizes.default_margin.width + anchors.rightMargin: UM.Theme.getSize("default_margin").width anchors.top: headerSeparator.bottom - anchors.topMargin: UM.Theme.sizes.default_margin.height + anchors.topMargin: UM.Theme.getSize("default_margin").height Component{ id: wizardDelegate Button { @@ -126,20 +127,20 @@ Rectangle style: ButtonStyle { background: Rectangle { - border.width: UM.Theme.sizes.default_lining.width - border.color: control.checked ? UM.Theme.colors.toggle_checked_border : - control.pressed ? UM.Theme.colors.toggle_active_border : - control.hovered ? UM.Theme.colors.toggle_hovered_border : UM.Theme.colors.toggle_unchecked_border - color: control.checked ? UM.Theme.colors.toggle_checked : - control.pressed ? UM.Theme.colors.toggle_active : - control.hovered ? UM.Theme.colors.toggle_hovered : UM.Theme.colors.toggle_unchecked + border.width: UM.Theme.getSize("default_lining").width + border.color: control.checked ? UM.Theme.getColor("toggle_checked_border") : + control.pressed ? UM.Theme.getColor("toggle_active_border") : + control.hovered ? UM.Theme.getColor("toggle_hovered_border") : UM.Theme.getColor("toggle_unchecked_border") + color: control.checked ? UM.Theme.getColor("toggle_checked") : + control.pressed ? UM.Theme.getColor("toggle_active") : + control.hovered ? UM.Theme.getColor("toggle_hovered") : UM.Theme.getColor("toggle_unchecked") Behavior on color { ColorAnimation { duration: 50; } } Label { anchors.centerIn: parent - color: control.checked ? UM.Theme.colors.toggle_checked_text : - control.pressed ? UM.Theme.colors.toggle_active_text : - control.hovered ? UM.Theme.colors.toggle_hovered_text : UM.Theme.colors.toggle_unchecked_text - font: UM.Theme.fonts.default + color: control.checked ? UM.Theme.getColor("toggle_checked_text") : + control.pressed ? UM.Theme.getColor("toggle_active_text") : + control.hovered ? UM.Theme.getColor("toggle_hovered_text") : UM.Theme.getColor("toggle_unchecked_text") + font: UM.Theme.getFont("default") text: control.text; } } @@ -165,7 +166,7 @@ Rectangle anchors.bottom: footerSeparator.top anchors.top: profileItem.bottom - anchors.topMargin: UM.Theme.sizes.default_margin.height + anchors.topMargin: UM.Theme.getSize("default_margin").height anchors.left: base.left anchors.right: base.right @@ -201,10 +202,10 @@ Rectangle Rectangle { id: footerSeparator width: parent.width - height: UM.Theme.sizes.sidebar_lining.height - color: UM.Theme.colors.sidebar_lining + height: UM.Theme.getSize("sidebar_lining").height + color: UM.Theme.getColor("sidebar_lining") anchors.bottom: saveButton.top - anchors.bottomMargin: UM.Theme.sizes.default_margin.height + anchors.bottomMargin: UM.Theme.getSize("default_margin").height } SaveButton @@ -239,7 +240,7 @@ Rectangle id: sidebarAdvanced; visible: false; - configureSettings: base.configureMachinesAction; + configureSettings: base.configureSettingsAction; onShowTooltip: base.showTooltip(item, location, text) onHideTooltip: base.hideTooltip() } diff --git a/resources/qml/SidebarHeader.qml b/resources/qml/SidebarHeader.qml index a921e8b002..adc29a3daf 100644 --- a/resources/qml/SidebarHeader.qml +++ b/resources/qml/SidebarHeader.qml @@ -21,27 +21,27 @@ Item width: base.width height: 0 anchors.top: parent.top - color: UM.Theme.colors.sidebar_header_bar + color: UM.Theme.getColor("sidebar_header_bar") } Label{ id: printjobTabLabel text: catalog.i18nc("@label:listbox","Print Job"); anchors.left: parent.left - anchors.leftMargin: UM.Theme.sizes.default_margin.width; + anchors.leftMargin: UM.Theme.getSize("default_margin").width; anchors.top: sidebarTabRow.bottom - anchors.topMargin: UM.Theme.sizes.default_margin.height + anchors.topMargin: UM.Theme.getSize("default_margin").height width: parent.width/100*45 - font: UM.Theme.fonts.large; - color: UM.Theme.colors.text + font: UM.Theme.getFont("large"); + color: UM.Theme.getColor("text") } Rectangle { id: machineSelectionRow width: base.width - height: UM.Theme.sizes.sidebar_setup.height + height: UM.Theme.getSize("sidebar_setup").height anchors.top: printjobTabLabel.bottom - anchors.topMargin: UM.Theme.sizes.default_margin.height + anchors.topMargin: UM.Theme.getSize("default_margin").height anchors.horizontalCenter: parent.horizontalCenter Label{ @@ -49,20 +49,20 @@ Item //: Machine selection label text: catalog.i18nc("@label:listbox","Printer:"); anchors.left: parent.left - anchors.leftMargin: UM.Theme.sizes.default_margin.width + anchors.leftMargin: UM.Theme.getSize("default_margin").width anchors.verticalCenter: parent.verticalCenter - font: UM.Theme.fonts.default; - color: UM.Theme.colors.text; + font: UM.Theme.getFont("default"); + color: UM.Theme.getColor("text"); } ToolButton { id: machineSelection text: UM.MachineManager.activeMachineInstance; width: parent.width/100*55 - height: UM.Theme.sizes.setting_control.height + height: UM.Theme.getSize("setting_control").height tooltip: UM.MachineManager.activeMachineInstance; anchors.right: parent.right - anchors.rightMargin: UM.Theme.sizes.default_margin.width + anchors.rightMargin: UM.Theme.getSize("default_margin").width anchors.verticalCenter: parent.verticalCenter style: UM.Theme.styles.sidebar_header_button @@ -97,30 +97,30 @@ Item Rectangle { id: variantRow anchors.top: machineSelectionRow.bottom - anchors.topMargin: UM.MachineManager.hasVariants ? UM.Theme.sizes.default_margin.height : 0 + anchors.topMargin: UM.MachineManager.hasVariants ? UM.Theme.getSize("default_margin").height : 0 width: base.width - height: UM.MachineManager.hasVariants ? UM.Theme.sizes.sidebar_setup.height : 0 + height: UM.MachineManager.hasVariants ? UM.Theme.getSize("sidebar_setup").height : 0 visible: UM.MachineManager.hasVariants Label{ id: variantLabel text: catalog.i18nc("@label","Nozzle:"); anchors.left: parent.left - anchors.leftMargin: UM.Theme.sizes.default_margin.width; + anchors.leftMargin: UM.Theme.getSize("default_margin").width; anchors.verticalCenter: parent.verticalCenter width: parent.width/100*45 - font: UM.Theme.fonts.default; - color: UM.Theme.colors.text; + font: UM.Theme.getFont("default"); + color: UM.Theme.getColor("text"); } ToolButton { id: variantSelection text: UM.MachineManager.activeMachineVariant width: parent.width/100*55 - height: UM.Theme.sizes.setting_control.height + height: UM.Theme.getSize("setting_control").height tooltip: UM.MachineManager.activeMachineVariant; anchors.right: parent.right - anchors.rightMargin: UM.Theme.sizes.default_margin.width + anchors.rightMargin: UM.Theme.getSize("default_margin").width anchors.verticalCenter: parent.verticalCenter style: UM.Theme.styles.sidebar_header_button @@ -129,6 +129,7 @@ Item id: variantsSelectionMenu Instantiator { + id: variantSelectionInstantiator model: UM.MachineVariantsModel { id: variantsModel } MenuItem { @@ -136,7 +137,17 @@ Item checkable: true; checked: model.active; exclusiveGroup: variantSelectionMenuGroup; - onTriggered: UM.MachineManager.setActiveMachineVariant(variantsModel.getItem(index).name) + onTriggered: + { + UM.MachineManager.setActiveMachineVariant(variantsModel.getItem(index).name); + if (typeof(model) !== "undefined" && !model.active) { + //Selecting a variant was canceled; undo menu selection + variantSelectionInstantiator.model.setProperty(index, "active", false); + var activeMachineVariantName = UM.MachineManager.activeMachineVariant; + var activeMachineVariantIndex = variantSelectionInstantiator.model.find("name", activeMachineVariantName); + variantSelectionInstantiator.model.setProperty(activeMachineVariantIndex, "active", true); + } + } } onObjectAdded: variantsSelectionMenu.insertItem(index, object) onObjectRemoved: variantsSelectionMenu.removeItem(object) @@ -150,30 +161,30 @@ Item Rectangle { id: materialSelectionRow anchors.top: variantRow.bottom - anchors.topMargin: UM.MachineManager.hasMaterials ? UM.Theme.sizes.default_margin.height : 0 + anchors.topMargin: UM.MachineManager.hasMaterials ? UM.Theme.getSize("default_margin").height : 0 width: base.width - height: UM.MachineManager.hasMaterials ? UM.Theme.sizes.sidebar_setup.height : 0 + height: UM.MachineManager.hasMaterials ? UM.Theme.getSize("sidebar_setup").height : 0 visible: UM.MachineManager.hasMaterials Label{ id: materialSelectionLabel text: catalog.i18nc("@label","Material:"); anchors.left: parent.left - anchors.leftMargin: UM.Theme.sizes.default_margin.width; + anchors.leftMargin: UM.Theme.getSize("default_margin").width; anchors.verticalCenter: parent.verticalCenter width: parent.width/100*45 - font: UM.Theme.fonts.default; - color: UM.Theme.colors.text; + font: UM.Theme.getFont("default"); + color: UM.Theme.getColor("text"); } ToolButton { id: materialSelection text: UM.MachineManager.activeMaterial width: parent.width/100*55 - height: UM.Theme.sizes.setting_control.height + height: UM.Theme.getSize("setting_control").height tooltip: UM.MachineManager.activeMaterial; anchors.right: parent.right - anchors.rightMargin: UM.Theme.sizes.default_margin.width + anchors.rightMargin: UM.Theme.getSize("default_margin").width anchors.verticalCenter: parent.verticalCenter style: UM.Theme.styles.sidebar_header_button @@ -182,6 +193,7 @@ Item id: materialSelectionMenu Instantiator { + id: materialSelectionInstantiator model: UM.MachineMaterialsModel { id: machineMaterialsModel } MenuItem { @@ -189,7 +201,17 @@ Item checkable: true; checked: model.active; exclusiveGroup: materialSelectionMenuGroup; - onTriggered: UM.MachineManager.setActiveMaterial(machineMaterialsModel.getItem(index).name) + onTriggered: + { + UM.MachineManager.setActiveMaterial(machineMaterialsModel.getItem(index).name); + if (typeof(model) !== "undefined" && !model.active) { + //Selecting a material was canceled; undo menu selection + materialSelectionInstantiator.model.setProperty(index, "active", false); + var activeMaterialName = UM.MachineManager.activeMaterial; + var activeMaterialIndex = materialSelectionInstantiator.model.find("name", activeMaterialName); + materialSelectionInstantiator.model.setProperty(activeMaterialIndex, "active", true); + } + } } onObjectAdded: materialSelectionMenu.insertItem(index, object) onObjectRemoved: materialSelectionMenu.removeItem(object) diff --git a/resources/qml/SidebarSimple.qml b/resources/qml/SidebarSimple.qml index 08baa7a2dc..c877b67f5b 100644 --- a/resources/qml/SidebarSimple.qml +++ b/resources/qml/SidebarSimple.qml @@ -27,19 +27,19 @@ Item id: infillCellLeft anchors.top: parent.top anchors.left: parent.left - width: base.width/100* 35 - UM.Theme.sizes.default_margin.width + width: base.width/100* 35 - UM.Theme.getSize("default_margin").width height: childrenRect.height Label{ id: infillLabel //: Infill selection label text: catalog.i18nc("@label","Infill:"); - font: UM.Theme.fonts.default; - color: UM.Theme.colors.text; + font: UM.Theme.getFont("default"); + color: UM.Theme.getColor("text"); anchors.top: parent.top - anchors.topMargin: UM.Theme.sizes.default_margin.height + anchors.topMargin: UM.Theme.getSize("default_margin").height anchors.left: parent.left - anchors.leftMargin: UM.Theme.sizes.default_margin.width + anchors.leftMargin: UM.Theme.getSize("default_margin").width } } @@ -48,7 +48,7 @@ Item height: childrenRect.height; width: base.width / 100 * 65 - spacing: UM.Theme.sizes.default_margin.width + spacing: UM.Theme.getSize("default_margin").width anchors.left: infillCellLeft.right anchors.top: infillCellLeft.top @@ -81,23 +81,32 @@ Item Rectangle{ id: infillIconLining - width: (infillCellRight.width - 3 * UM.Theme.sizes.default_margin.width) / 4; + width: (infillCellRight.width - 3 * UM.Theme.getSize("default_margin").width) / 4; height: width - border.color: (infillListView.activeIndex == index) ? UM.Theme.colors.setting_control_selected : - (mousearea.containsMouse ? UM.Theme.colors.setting_control_border_highlight : UM.Theme.colors.setting_control_border) - border.width: UM.Theme.sizes.default_lining.width - color: infillListView.activeIndex == index ? UM.Theme.colors.setting_control_selected : "transparent" + border.color: { + if(infillListView.activeIndex == index) + { + return UM.Theme.getColor("setting_control_selected") + } + else if(mousearea.containsMouse) + { + return UM.Theme.getColor("setting_control_border_highlight") + } + return UM.Theme.getColor("setting_control_border") + } + border.width: UM.Theme.getSize("default_lining").width + color: infillListView.activeIndex == index ? UM.Theme.getColor("setting_control_selected") : "transparent" UM.RecolorImage { id: infillIcon anchors.fill: parent; - anchors.margins: UM.Theme.sizes.infill_button_margin.width + anchors.margins: UM.Theme.getSize("infill_button_margin").width sourceSize.width: width sourceSize.height: width - source: UM.Theme.icons[model.icon]; - color: (infillListView.activeIndex == index) ? UM.Theme.colors.text_white : UM.Theme.colors.text + source: UM.Theme.getIcon(model.icon); + color: (infillListView.activeIndex == index) ? UM.Theme.getColor("text_white") : UM.Theme.getColor("text") } MouseArea { @@ -107,7 +116,6 @@ Item onClicked: { if (infillListView.activeIndex != index) { - infillListView.activeIndex = index UM.MachineManager.setSettingValue("infill_sparse_density", model.percentage) } } @@ -123,7 +131,7 @@ Item id: infillLabel anchors.top: infillIconLining.bottom anchors.horizontalCenter: infillIconLining.horizontalCenter - color: infillListView.activeIndex == index ? UM.Theme.colors.setting_control_text : UM.Theme.colors.setting_control_border + color: infillListView.activeIndex == index ? UM.Theme.getColor("setting_control_text") : UM.Theme.getColor("setting_control_border") text: name } } @@ -173,25 +181,25 @@ Item Rectangle { id: helpersCellLeft anchors.top: infillCellRight.bottom - anchors.topMargin: UM.Theme.sizes.default_margin.height + anchors.topMargin: UM.Theme.getSize("default_margin").height anchors.left: parent.left - width: parent.width/100*35 - UM.Theme.sizes.default_margin.width + width: parent.width/100*35 - UM.Theme.getSize("default_margin").width height: childrenRect.height Label{ anchors.left: parent.left - anchors.leftMargin: UM.Theme.sizes.default_margin.width + anchors.leftMargin: UM.Theme.getSize("default_margin").width //: Helpers selection label text: catalog.i18nc("@label:listbox","Helpers:"); - font: UM.Theme.fonts.default; - color: UM.Theme.colors.text; + font: UM.Theme.getFont("default"); + color: UM.Theme.getColor("text"); } } Rectangle { id: helpersCellRight anchors.top: helpersCellLeft.top anchors.left: helpersCellLeft.right - width: parent.width/100*65 - UM.Theme.sizes.default_margin.width + width: parent.width/100*65 - UM.Theme.getSize("default_margin").width height: childrenRect.height CheckBox{ @@ -211,8 +219,7 @@ Item hoverEnabled: true onClicked: { - parent.checked = !parent.checked - UM.MachineManager.setSettingValue("adhesion_type", parent.checked?"brim":"skirt") + UM.MachineManager.setSettingValue("adhesion_type", !parent.checked?"brim":"skirt") } onEntered: { @@ -232,7 +239,7 @@ Item property bool hovered_ex: false anchors.top: brimCheckBox.bottom - anchors.topMargin: UM.Theme.sizes.default_margin.height + anchors.topMargin: UM.Theme.getSize("default_margin").height anchors.left: parent.left //: Setting enable support checkbox @@ -245,8 +252,7 @@ Item hoverEnabled: true onClicked: { - parent.checked = !parent.checked - UM.MachineManager.setSettingValue("support_enable", parent.checked) + UM.MachineManager.setSettingValue("support_enable", !parent.checked) } onEntered: { diff --git a/resources/qml/SidebarTooltip.qml b/resources/qml/SidebarTooltip.qml index c51a33c611..1c7f4bcb76 100644 --- a/resources/qml/SidebarTooltip.qml +++ b/resources/qml/SidebarTooltip.qml @@ -11,11 +11,11 @@ import UM 1.0 as UM UM.PointingRectangle { id: base; - width: UM.Theme.sizes.tooltip.width; - height: label.height + UM.Theme.sizes.tooltip_margins.height * 2; - color: UM.Theme.colors.tooltip; + width: UM.Theme.getSize("tooltip").width; + height: label.height + UM.Theme.getSize("tooltip_margins").height * 2; + color: UM.Theme.getColor("tooltip"); - arrowSize: UM.Theme.sizes.default_arrow.width + arrowSize: UM.Theme.getSize("default_arrow").width opacity: 0; Behavior on opacity { NumberAnimation { duration: 100; } } @@ -28,7 +28,7 @@ UM.PointingRectangle { y = parent.height - base.height; } else { x = position.x - base.width; - y = position.y - UM.Theme.sizes.tooltip_arrow_margins.height; + y = position.y - UM.Theme.getSize("tooltip_arrow_margins").height; } base.opacity = 1; target = Qt.point(40 , position.y) @@ -42,14 +42,14 @@ UM.PointingRectangle { id: label; anchors { top: parent.top; - topMargin: UM.Theme.sizes.tooltip_margins.height; + topMargin: UM.Theme.getSize("tooltip_margins").height; left: parent.left; - leftMargin: UM.Theme.sizes.tooltip_margins.width; + leftMargin: UM.Theme.getSize("tooltip_margins").width; right: parent.right; - rightMargin: UM.Theme.sizes.tooltip_margins.width; + rightMargin: UM.Theme.getSize("tooltip_margins").width; } wrapMode: Text.Wrap; - font: UM.Theme.fonts.default; - color: UM.Theme.colors.tooltip_text; + font: UM.Theme.getFont("default"); + color: UM.Theme.getColor("tooltip_text"); } } diff --git a/resources/qml/Toolbar.qml b/resources/qml/Toolbar.qml index 46bafb9296..631445d987 100644 --- a/resources/qml/Toolbar.qml +++ b/resources/qml/Toolbar.qml @@ -20,7 +20,7 @@ Item { anchors.bottom: parent.bottom; anchors.left: parent.left; - spacing: UM.Theme.sizes.button_lining.width + spacing: UM.Theme.getSize("button_lining").width Repeater { id: repeat @@ -29,11 +29,11 @@ Item { Button { text: model.name - iconSource: UM.Theme.icons[model.icon]; + iconSource: UM.Theme.getIcon(model.icon); checkable: true; checked: model.active; - enabled: UM.Selection.hasSelection && UM.Controller.toolsEnabled; + enabled: model.enabled && UM.Selection.hasSelection && UM.Controller.toolsEnabled; style: UM.Theme.styles.tool_button; @@ -54,47 +54,47 @@ Item { id: panelBorder; anchors.left: parent.right; - anchors.leftMargin: UM.Theme.sizes.default_margin.width; + anchors.leftMargin: UM.Theme.getSize("default_margin").width; anchors.top: base.top; anchors.topMargin: base.activeY z: buttons.z -1 - target: Qt.point(parent.right, base.activeY + UM.Theme.sizes.button.height/2) - arrowSize: UM.Theme.sizes.default_arrow.width + target: Qt.point(parent.right, base.activeY + UM.Theme.getSize("button").height/2) + arrowSize: UM.Theme.getSize("default_arrow").width width: { if (panel.item && panel.width > 0){ - return Math.max(panel.width + 2 * UM.Theme.sizes.default_margin.width) + return Math.max(panel.width + 2 * UM.Theme.getSize("default_margin").width) } else { return 0 } } - height: panel.item ? panel.height + 2 * UM.Theme.sizes.default_margin.height : 0; + height: panel.item ? panel.height + 2 * UM.Theme.getSize("default_margin").height : 0; - opacity: panel.item ? 1 : 0 + opacity: panel.item && panel.width > 0 ? 1 : 0 Behavior on opacity { NumberAnimation { duration: 100 } } - color: UM.Theme.colors.lining; - //border.width: UM.Theme.sizes.default_lining.width - //border.color: UM.Theme.colors.lining + color: UM.Theme.getColor("lining"); + //border.width: UM.Theme.getSize("default_lining").width + //border.color: UM.Theme.getColor("lining") UM.PointingRectangle { id: panelBackground; - color: UM.Theme.colors.tool_panel_background; + color: UM.Theme.getColor("tool_panel_background"); anchors.fill: parent - anchors.margins: UM.Theme.sizes.default_lining.width + anchors.margins: UM.Theme.getSize("default_lining").width - target: Qt.point(-UM.Theme.sizes.default_margin.width, UM.Theme.sizes.button.height/2) + target: Qt.point(-UM.Theme.getSize("default_margin").width, UM.Theme.getSize("button").height/2) arrowSize: parent.arrowSize } Loader { id: panel - x: UM.Theme.sizes.default_margin.width; - y: UM.Theme.sizes.default_margin.height; + x: UM.Theme.getSize("default_margin").width; + y: UM.Theme.getSize("default_margin").height; source: UM.ActiveTool.valid ? UM.ActiveTool.activeToolPanel : ""; enabled: UM.Controller.toolsEnabled; diff --git a/resources/qml/WizardPages/AddMachine.qml b/resources/qml/WizardPages/AddMachine.qml index 9bce4f3210..5a6a27c0a3 100644 --- a/resources/qml/WizardPages/AddMachine.qml +++ b/resources/qml/WizardPages/AddMachine.qml @@ -98,12 +98,12 @@ Item background: Rectangle { border.width: 0 color: "transparent"; - height: UM.Theme.sizes.standard_list_lineheight.height + height: UM.Theme.getSize("standard_list_lineheight").height width: machineList.width } label: Text { anchors.left: parent.left - anchors.leftMargin: UM.Theme.sizes.standard_arrow.width + UM.Theme.sizes.default_margin.width + anchors.leftMargin: UM.Theme.getSize("standard_arrow").width + UM.Theme.getSize("default_margin").width text: control.text color: palette.windowText font.bold: true @@ -111,13 +111,13 @@ Item id: downArrow anchors.verticalCenter: parent.verticalCenter anchors.right: parent.left - anchors.rightMargin: UM.Theme.sizes.default_margin.width - width: UM.Theme.sizes.standard_arrow.width - height: UM.Theme.sizes.standard_arrow.height + anchors.rightMargin: UM.Theme.getSize("default_margin").width + width: UM.Theme.getSize("standard_arrow").width + height: UM.Theme.getSize("standard_arrow").height sourceSize.width: width sourceSize.height: width color: palette.windowText - source: base.activeManufacturer == section ? UM.Theme.icons.arrow_bottom : UM.Theme.icons.arrow_right + source: base.activeManufacturer == section ? UM.Theme.getIcon("arrow_bottom") : UM.Theme.getIcon("arrow_right") } } } @@ -133,10 +133,10 @@ Item id: machineButton anchors.left: parent.left - anchors.leftMargin: UM.Theme.sizes.standard_list_lineheight.width + anchors.leftMargin: UM.Theme.getSize("standard_list_lineheight").width opacity: 1; - height: UM.Theme.sizes.standard_list_lineheight.height; + height: UM.Theme.getSize("standard_list_lineheight").height; checked: ListView.isCurrentItem; @@ -183,6 +183,25 @@ Item id: machineNameHolder anchors.bottom: parent.bottom; + Item + { + height: errorMessage.lineHeight + anchors.bottom: insertNameLabel.top + anchors.bottomMargin: insertNameLabel.height * errorMessage.lineCount + Label + { + id: errorMessage + property bool show: false + width: base.width + height: errorMessage.show ? errorMessage.lineHeight : 0 + visible: errorMessage.show + text: catalog.i18nc("@label", "This printer name has already been used. Please choose a different printer name."); + wrapMode: Text.WordWrap + Behavior on height {NumberAnimation {duration: 75; }} + color: UM.Theme.getColor("error") + } + } + Label { id: insertNameLabel @@ -192,7 +211,8 @@ Item { id: machineName; text: getMachineName() - implicitWidth: UM.Theme.sizes.standard_list_input.width + implicitWidth: UM.Theme.getSize("standard_list_input").width + maximumLength: 120 } } @@ -212,6 +232,9 @@ Item case "SelectUpgradedParts": base.wizard.appendPage(Qt.resolvedUrl("SelectUpgradedParts.qml"), catalog.i18nc("@title", "Select Upgraded Parts")); break; + case "SelectUpgradedPartsUM2": + base.wizard.appendPage(Qt.resolvedUrl("SelectUpgradedPartsUM2.qml"), catalog.i18nc("@title", "Select Upgraded Parts")); + break; case "UpgradeFirmware": base.wizard.appendPage(Qt.resolvedUrl("UpgradeFirmware.qml"), catalog.i18nc("@title", "Upgrade Firmware")); break; diff --git a/resources/qml/WizardPages/Bedleveling.qml b/resources/qml/WizardPages/Bedleveling.qml index a6c471341c..105ee81f75 100644 --- a/resources/qml/WizardPages/Bedleveling.qml +++ b/resources/qml/WizardPages/Bedleveling.qml @@ -47,7 +47,7 @@ Item { id: pageDescription anchors.top: pageTitle.bottom - anchors.topMargin: UM.Theme.sizes.default_margin.height + anchors.topMargin: UM.Theme.getSize("default_margin").height width: parent.width wrapMode: Text.WordWrap text: catalog.i18nc("@label","To make sure your prints will come out great, you can now adjust your buildplate. When you click 'Move to Next Position' the nozzle will move to the different positions that can be adjusted.") @@ -56,7 +56,7 @@ Item { id: bedlevelingText anchors.top: pageDescription.bottom - anchors.topMargin: UM.Theme.sizes.default_margin.height + anchors.topMargin: UM.Theme.getSize("default_margin").height width: parent.width wrapMode: Text.WordWrap text: catalog.i18nc("@label", "For every postition; insert a piece of paper under the nozzle and adjust the print bed height. The print bed height is right when the paper is slightly gripped by the tip of the nozzle.") @@ -65,10 +65,10 @@ Item Item{ id: bedlevelingWrapper anchors.top: bedlevelingText.bottom - anchors.topMargin: UM.Theme.sizes.default_margin.height + anchors.topMargin: UM.Theme.getSize("default_margin").height anchors.horizontalCenter: parent.horizontalCenter height: skipBedlevelingButton.height - width: bedlevelingButton.width + skipBedlevelingButton.width + UM.Theme.sizes.default_margin.height < wizardPage.width ? bedlevelingButton.width + skipBedlevelingButton.width + UM.Theme.sizes.default_margin.height : wizardPage.width + width: bedlevelingButton.width + skipBedlevelingButton.width + UM.Theme.getSize("default_margin").height < wizardPage.width ? bedlevelingButton.width + skipBedlevelingButton.width + UM.Theme.getSize("default_margin").height : wizardPage.width Button { id: bedlevelingButton @@ -103,11 +103,22 @@ Item { id: skipBedlevelingButton anchors.top: parent.width < wizardPage.width ? parent.top : bedlevelingButton.bottom - anchors.topMargin: parent.width < wizardPage.width ? 0 : UM.Theme.sizes.default_margin.height/2 + anchors.topMargin: parent.width < wizardPage.width ? 0 : UM.Theme.getSize("default_margin").height/2 anchors.left: parent.width < wizardPage.width ? bedlevelingButton.right : parent.left - anchors.leftMargin: parent.width < wizardPage.width ? UM.Theme.sizes.default_margin.width : 0 + anchors.leftMargin: parent.width < wizardPage.width ? UM.Theme.getSize("default_margin").width : 0 text: catalog.i18nc("@action:button","Skip Bedleveling"); - onClicked: base.visible = false; + onClicked: { + if(wizardPage.wizard.lastPage == true){ + var old_page_count = wizardPage.wizard.getPageCount() + // Delete old pages (if any) + for (var i = old_page_count - 1; i > 0; i--) + { + wizardPage.wizard.removePage(i) + } + wizardPage.wizard.currentPage = 0 + wizardPage.wizard.visible = false + } + } } } @@ -116,7 +127,7 @@ Item id: resultText visible: false anchors.top: bedlevelingWrapper.bottom - anchors.topMargin: UM.Theme.sizes.default_margin.height + anchors.topMargin: UM.Theme.getSize("default_margin").height anchors.left: parent.left width: parent.width wrapMode: Text.WordWrap diff --git a/resources/qml/WizardPages/SelectUpgradedParts.qml b/resources/qml/WizardPages/SelectUpgradedParts.qml index c8ccc4fe8d..4a327a6ed4 100644 --- a/resources/qml/WizardPages/SelectUpgradedParts.qml +++ b/resources/qml/WizardPages/SelectUpgradedParts.qml @@ -36,7 +36,7 @@ Item { id: pageDescription anchors.top: pageTitle.bottom - anchors.topMargin: UM.Theme.sizes.default_margin.height + anchors.topMargin: UM.Theme.getSize("default_margin").height width: parent.width wrapMode: Text.WordWrap text: catalog.i18nc("@label","To assist you in having better default settings for your Ultimaker. Cura would like to know which upgrades you have in your machine:") @@ -47,10 +47,10 @@ Item id: pageCheckboxes height: childrenRect.height anchors.left: parent.left - anchors.leftMargin: UM.Theme.sizes.default_margin.width + anchors.leftMargin: UM.Theme.getSize("default_margin").width anchors.top: pageDescription.bottom - anchors.topMargin: UM.Theme.sizes.default_margin.height - width: parent.width - UM.Theme.sizes.default_margin.width + anchors.topMargin: UM.Theme.getSize("default_margin").height + width: parent.width - UM.Theme.getSize("default_margin").width CheckBox { id: extruderCheckBox @@ -85,7 +85,7 @@ Item { width: parent.width anchors.top: pageCheckboxes.bottom - anchors.topMargin: UM.Theme.sizes.default_margin.height + anchors.topMargin: UM.Theme.getSize("default_margin").height wrapMode: Text.WordWrap text: catalog.i18nc("@label","If you bought your Ultimaker after october 2012 you will have the Extruder drive upgrade. If you do not have this upgrade, it is highly recommended to improve reliability. This upgrade can be bought from the Ultimaker webshop or found on thingiverse as thing:26094"); } diff --git a/resources/qml/WizardPages/SelectUpgradedPartsUM2.qml b/resources/qml/WizardPages/SelectUpgradedPartsUM2.qml new file mode 100644 index 0000000000..79404492f0 --- /dev/null +++ b/resources/qml/WizardPages/SelectUpgradedPartsUM2.qml @@ -0,0 +1,80 @@ +// Copyright (c) 2015 Ultimaker B.V. +// Cura is released under the terms of the AGPLv3 or higher. + +import QtQuick 2.2 +import QtQuick.Controls 1.1 +import QtQuick.Window 2.1 + +import UM 1.1 as UM + +Item +{ + id: wizardPage + property string title + + SystemPalette{id: palette} + UM.I18nCatalog { id: catalog; name:"cura"} + + property variant wizard: null; + + Connections + { + target: wizardPage.wizard + onNextClicked: //You can add functions here that get triggered when the final button is clicked in the wizard-element + { + if(wizardPage.wizard.lastPage == true){ + wizardPage.wizard.visible = false + } + } + } + + Component.onDestruction: + { + if (hotendCheckBox.checked == true){ + switch(UM.MachineManager.getMachineDefinitionType()) { + case "ultimaker2": + UM.MachineManager.setMachineDefinitionType("ultimaker2_olsson") + break; + case "ultimaker2_extended": + UM.MachineManager.setMachineDefinitionType("ultimaker2_extended_olsson") + break; + } + } + } + Label + { + id: pageTitle + width: parent.width + text: catalog.i18nc("@title", "Select Upgraded Parts") + wrapMode: Text.WordWrap + font.pointSize: 18 + } + Label + { + id: pageDescription + anchors.top: pageTitle.bottom + anchors.topMargin: UM.Theme.getSize("default_margin").height + width: parent.width + wrapMode: Text.WordWrap + text: catalog.i18nc("@label","To assist you in having better default settings for your Ultimaker. Cura would like to know which upgrades you have in your machine:") + } + + Item + { + id: pageCheckboxes + height: childrenRect.height + anchors.left: parent.left + anchors.leftMargin: UM.Theme.getSize("default_margin").width + anchors.top: pageDescription.bottom + anchors.topMargin: UM.Theme.getSize("default_margin").height + width: parent.width - UM.Theme.getSize("default_margin").width + CheckBox + { + id: hotendCheckBox + text: catalog.i18nc("@option:check","Olsson Block") + checked: false + } + } + + ExclusiveGroup { id: printerGroup; } +} diff --git a/resources/qml/WizardPages/UltimakerCheckup.qml b/resources/qml/WizardPages/UltimakerCheckup.qml index db538ed7d6..b8c8aebe12 100644 --- a/resources/qml/WizardPages/UltimakerCheckup.qml +++ b/resources/qml/WizardPages/UltimakerCheckup.qml @@ -78,7 +78,7 @@ Item { id: pageDescription anchors.top: pageTitle.bottom - anchors.topMargin: UM.Theme.sizes.default_margin.height + anchors.topMargin: UM.Theme.getSize("default_margin").height width: parent.width wrapMode: Text.WordWrap text: catalog.i18nc("@label","It's a good idea to do a few sanity checks on your Ultimaker. You can skip this step if you know your machine is functional"); @@ -87,10 +87,10 @@ Item Item{ id: startStopButtons anchors.top: pageDescription.bottom - anchors.topMargin: UM.Theme.sizes.default_margin.height + anchors.topMargin: UM.Theme.getSize("default_margin").height anchors.horizontalCenter: parent.horizontalCenter height: childrenRect.height - width: startCheckButton.width + skipCheckButton.width + UM.Theme.sizes.default_margin.height < wizardPage.width ? startCheckButton.width + skipCheckButton.width + UM.Theme.sizes.default_margin.height : wizardPage.width + width: startCheckButton.width + skipCheckButton.width + UM.Theme.getSize("default_margin").height < wizardPage.width ? startCheckButton.width + skipCheckButton.width + UM.Theme.getSize("default_margin").height : wizardPage.width Button { id: startCheckButton @@ -109,9 +109,9 @@ Item { id: skipCheckButton anchors.top: parent.width < wizardPage.width ? parent.top : startCheckButton.bottom - anchors.topMargin: parent.width < wizardPage.width ? 0 : UM.Theme.sizes.default_margin.height/2 + anchors.topMargin: parent.width < wizardPage.width ? 0 : UM.Theme.getSize("default_margin").height/2 anchors.left: parent.width < wizardPage.width ? startCheckButton.right : parent.left - anchors.leftMargin: parent.width < wizardPage.width ? UM.Theme.sizes.default_margin.width : 0 + anchors.leftMargin: parent.width < wizardPage.width ? UM.Theme.getSize("default_margin").width : 0 //enabled: !alreadyTested text: catalog.i18nc("@action:button","Skip Printer Check"); onClicked: { @@ -123,7 +123,7 @@ Item Item{ id: checkupContent anchors.top: startStopButtons.bottom - anchors.topMargin: UM.Theme.sizes.default_margin.height + anchors.topMargin: UM.Theme.getSize("default_margin").height visible: false ////////////////////////////////////////////////////////// Label @@ -227,7 +227,7 @@ Item height: nozzleTemp.height anchors.top: nozzleTempLabel.top anchors.left: bedTempStatus.right - anchors.leftMargin: UM.Theme.sizes.default_margin.width/2 + anchors.leftMargin: UM.Theme.getSize("default_margin").width/2 Button { height: nozzleTemp.height - 2 @@ -250,7 +250,7 @@ Item id: nozzleTemp anchors.top: nozzleTempLabel.top anchors.left: nozzleTempButton.right - anchors.leftMargin: UM.Theme.sizes.default_margin.width + anchors.leftMargin: UM.Theme.getSize("default_margin").width width: wizardPage.rightRow * 0.2 wrapMode: Text.WordWrap text: printer_connection != null ? printer_connection.extruderTemperature + "°C" : "0°C" @@ -283,7 +283,7 @@ Item height: bedTemp.height anchors.top: bedTempLabel.top anchors.left: bedTempStatus.right - anchors.leftMargin: UM.Theme.sizes.default_margin.width/2 + anchors.leftMargin: UM.Theme.getSize("default_margin").width/2 Button { height: bedTemp.height - 2 @@ -307,7 +307,7 @@ Item width: wizardPage.rightRow * 0.2 anchors.top: bedTempLabel.top anchors.left: bedTempButton.right - anchors.leftMargin: UM.Theme.sizes.default_margin.width + anchors.leftMargin: UM.Theme.getSize("default_margin").width wrapMode: Text.WordWrap text: printer_connection != null ? printer_connection.bedTemperature + "°C": "0°C" font.bold: true @@ -317,7 +317,7 @@ Item id: resultText visible: false anchors.top: bedTemp.bottom - anchors.topMargin: UM.Theme.sizes.default_margin.height + anchors.topMargin: UM.Theme.getSize("default_margin").height anchors.left: parent.left width: parent.width wrapMode: Text.WordWrap diff --git a/resources/qml/WizardPages/UpgradeFirmware.qml b/resources/qml/WizardPages/UpgradeFirmware.qml index f7031febe3..4bbb049f20 100644 --- a/resources/qml/WizardPages/UpgradeFirmware.qml +++ b/resources/qml/WizardPages/UpgradeFirmware.qml @@ -27,7 +27,7 @@ Item { id: pageDescription anchors.top: pageTitle.bottom - anchors.topMargin: UM.Theme.sizes.default_margin.height + anchors.topMargin: UM.Theme.getSize("default_margin").height width: parent.width wrapMode: Text.WordWrap text: catalog.i18nc("@label","Firmware is the piece of software running directly on your 3D printer. This firmware controls the step motors, regulates the temperature and ultimately makes your printer work.") @@ -37,7 +37,7 @@ Item { id: upgradeText1 anchors.top: pageDescription.bottom - anchors.topMargin: UM.Theme.sizes.default_margin.height + anchors.topMargin: UM.Theme.getSize("default_margin").height width: parent.width wrapMode: Text.WordWrap text: catalog.i18nc("@label","The firmware shipping with new Ultimakers works, but upgrades have been made to make better prints, and make calibration easier."); @@ -47,16 +47,16 @@ Item { id: upgradeText2 anchors.top: upgradeText1.bottom - anchors.topMargin: UM.Theme.sizes.default_margin.height + anchors.topMargin: UM.Theme.getSize("default_margin").height width: parent.width wrapMode: Text.WordWrap text: catalog.i18nc("@label","Cura requires these new features and thus your firmware will most likely need to be upgraded. You can do so now."); } Item{ anchors.top: upgradeText2.bottom - anchors.topMargin: UM.Theme.sizes.default_margin.height + anchors.topMargin: UM.Theme.getSize("default_margin").height anchors.horizontalCenter: parent.horizontalCenter - width: upgradeButton.width + skipUpgradeButton.width + UM.Theme.sizes.default_margin.height < wizardPage.width ? upgradeButton.width + skipUpgradeButton.width + UM.Theme.sizes.default_margin.height : wizardPage.width + width: upgradeButton.width + skipUpgradeButton.width + UM.Theme.getSize("default_margin").height < wizardPage.width ? upgradeButton.width + skipUpgradeButton.width + UM.Theme.getSize("default_margin").height : wizardPage.width Button { id: upgradeButton anchors.top: parent.top @@ -67,9 +67,9 @@ Item Button { id: skipUpgradeButton anchors.top: parent.width < wizardPage.width ? parent.top : upgradeButton.bottom - anchors.topMargin: parent.width < wizardPage.width ? 0 : UM.Theme.sizes.default_margin.height/2 + anchors.topMargin: parent.width < wizardPage.width ? 0 : UM.Theme.getSize("default_margin").height/2 anchors.left: parent.width < wizardPage.width ? upgradeButton.right : parent.left - anchors.leftMargin: parent.width < wizardPage.width ? UM.Theme.sizes.default_margin.width : 0 + anchors.leftMargin: parent.width < wizardPage.width ? UM.Theme.getSize("default_margin").width : 0 text: catalog.i18nc("@action:button","Skip Upgrade"); onClicked: { base.currentPage += 1 diff --git a/resources/themes/cura/fonts/OpenSans-Bold.ttf b/resources/themes/cura/fonts/OpenSans-Bold.ttf new file mode 100644 index 0000000000..fd79d43bea Binary files /dev/null and b/resources/themes/cura/fonts/OpenSans-Bold.ttf differ diff --git a/resources/themes/cura/fonts/OpenSans-BoldItalic.ttf b/resources/themes/cura/fonts/OpenSans-BoldItalic.ttf new file mode 100644 index 0000000000..9bc800958a Binary files /dev/null and b/resources/themes/cura/fonts/OpenSans-BoldItalic.ttf differ diff --git a/resources/themes/cura/fonts/OpenSans-ExtraBold.ttf b/resources/themes/cura/fonts/OpenSans-ExtraBold.ttf new file mode 100644 index 0000000000..21f6f84a07 Binary files /dev/null and b/resources/themes/cura/fonts/OpenSans-ExtraBold.ttf differ diff --git a/resources/themes/cura/fonts/OpenSans-ExtraBoldItalic.ttf b/resources/themes/cura/fonts/OpenSans-ExtraBoldItalic.ttf new file mode 100644 index 0000000000..31cb688340 Binary files /dev/null and b/resources/themes/cura/fonts/OpenSans-ExtraBoldItalic.ttf differ diff --git a/resources/themes/cura/fonts/OpenSans-Italic.ttf b/resources/themes/cura/fonts/OpenSans-Italic.ttf new file mode 100644 index 0000000000..c90da48ff3 Binary files /dev/null and b/resources/themes/cura/fonts/OpenSans-Italic.ttf differ diff --git a/resources/themes/cura/fonts/OpenSans-Light.ttf b/resources/themes/cura/fonts/OpenSans-Light.ttf new file mode 100644 index 0000000000..0d381897da Binary files /dev/null and b/resources/themes/cura/fonts/OpenSans-Light.ttf differ diff --git a/resources/themes/cura/fonts/OpenSans-LightItalic.ttf b/resources/themes/cura/fonts/OpenSans-LightItalic.ttf new file mode 100644 index 0000000000..68299c4bc6 Binary files /dev/null and b/resources/themes/cura/fonts/OpenSans-LightItalic.ttf differ diff --git a/resources/themes/cura/fonts/OpenSans-Regular.ttf b/resources/themes/cura/fonts/OpenSans-Regular.ttf new file mode 100644 index 0000000000..db433349b7 Binary files /dev/null and b/resources/themes/cura/fonts/OpenSans-Regular.ttf differ diff --git a/resources/themes/cura/fonts/OpenSans-Semibold.ttf b/resources/themes/cura/fonts/OpenSans-Semibold.ttf new file mode 100644 index 0000000000..1a7679e394 Binary files /dev/null and b/resources/themes/cura/fonts/OpenSans-Semibold.ttf differ diff --git a/resources/themes/cura/fonts/OpenSans-SemiboldItalic.ttf b/resources/themes/cura/fonts/OpenSans-SemiboldItalic.ttf new file mode 100644 index 0000000000..59b6d16b06 Binary files /dev/null and b/resources/themes/cura/fonts/OpenSans-SemiboldItalic.ttf differ diff --git a/resources/themes/cura/fonts/Roboto-Black.ttf b/resources/themes/cura/fonts/Roboto-Black.ttf deleted file mode 100644 index 9002aab5d4..0000000000 Binary files a/resources/themes/cura/fonts/Roboto-Black.ttf and /dev/null differ diff --git a/resources/themes/cura/fonts/Roboto-BlackItalic.ttf b/resources/themes/cura/fonts/Roboto-BlackItalic.ttf deleted file mode 100644 index b87e025dff..0000000000 Binary files a/resources/themes/cura/fonts/Roboto-BlackItalic.ttf and /dev/null differ diff --git a/resources/themes/cura/fonts/Roboto-Bold.ttf b/resources/themes/cura/fonts/Roboto-Bold.ttf deleted file mode 100644 index 072b842925..0000000000 Binary files a/resources/themes/cura/fonts/Roboto-Bold.ttf and /dev/null differ diff --git a/resources/themes/cura/fonts/Roboto-BoldItalic.ttf b/resources/themes/cura/fonts/Roboto-BoldItalic.ttf deleted file mode 100644 index 74919ff649..0000000000 Binary files a/resources/themes/cura/fonts/Roboto-BoldItalic.ttf and /dev/null differ diff --git a/resources/themes/cura/fonts/Roboto-Italic.ttf b/resources/themes/cura/fonts/Roboto-Italic.ttf deleted file mode 100644 index bd57775e44..0000000000 Binary files a/resources/themes/cura/fonts/Roboto-Italic.ttf and /dev/null differ diff --git a/resources/themes/cura/fonts/Roboto-Light.ttf b/resources/themes/cura/fonts/Roboto-Light.ttf deleted file mode 100644 index 13bf13af00..0000000000 Binary files a/resources/themes/cura/fonts/Roboto-Light.ttf and /dev/null differ diff --git a/resources/themes/cura/fonts/Roboto-LightItalic.ttf b/resources/themes/cura/fonts/Roboto-LightItalic.ttf deleted file mode 100644 index 130672a907..0000000000 Binary files a/resources/themes/cura/fonts/Roboto-LightItalic.ttf and /dev/null differ diff --git a/resources/themes/cura/fonts/Roboto-Medium.ttf b/resources/themes/cura/fonts/Roboto-Medium.ttf deleted file mode 100644 index d0f6e2b64f..0000000000 Binary files a/resources/themes/cura/fonts/Roboto-Medium.ttf and /dev/null differ diff --git a/resources/themes/cura/fonts/Roboto-MediumItalic.ttf b/resources/themes/cura/fonts/Roboto-MediumItalic.ttf deleted file mode 100644 index 6153d48b49..0000000000 Binary files a/resources/themes/cura/fonts/Roboto-MediumItalic.ttf and /dev/null differ diff --git a/resources/themes/cura/fonts/Roboto-Regular.ttf b/resources/themes/cura/fonts/Roboto-Regular.ttf deleted file mode 100644 index 0ba95c98c4..0000000000 Binary files a/resources/themes/cura/fonts/Roboto-Regular.ttf and /dev/null differ diff --git a/resources/themes/cura/fonts/Roboto-Thin.ttf b/resources/themes/cura/fonts/Roboto-Thin.ttf deleted file mode 100644 index 309c22d358..0000000000 Binary files a/resources/themes/cura/fonts/Roboto-Thin.ttf and /dev/null differ diff --git a/resources/themes/cura/fonts/Roboto-ThinItalic.ttf b/resources/themes/cura/fonts/Roboto-ThinItalic.ttf deleted file mode 100644 index 0b53ba4d38..0000000000 Binary files a/resources/themes/cura/fonts/Roboto-ThinItalic.ttf and /dev/null differ diff --git a/resources/themes/cura/icons/category_machine.svg b/resources/themes/cura/icons/category_machine.svg new file mode 100644 index 0000000000..9754353a33 --- /dev/null +++ b/resources/themes/cura/icons/category_machine.svg @@ -0,0 +1,12 @@ + + + + Fill 1 Copy 3 + Created with Sketch. + + + + + + + \ No newline at end of file diff --git a/resources/themes/cura/styles.qml b/resources/themes/cura/styles.qml index f4937716af..1d0b385fc2 100644 --- a/resources/themes/cura/styles.qml +++ b/resources/themes/cura/styles.qml @@ -5,110 +5,63 @@ import QtQuick 2.1 import QtQuick.Controls 1.1 import QtQuick.Controls.Styles 1.1 -import UM 1.0 as UM +import UM 1.1 as UM QtObject { property Component sidebar_header_button: Component { ButtonStyle { background: Rectangle { - color: UM.Theme.colors.setting_control - border.width: UM.Theme.sizes.default_lining.width - border.color: control.hovered ? UM.Theme.colors.setting_control_border_highlight : UM.Theme.colors.setting_control_border + color: Theme.getColor("setting_control") + border.width: Theme.getSize("default_lining").width + border.color: control.hovered ? Theme.getColor("setting_control_border_highlight") : Theme.getColor("setting_control_border") UM.RecolorImage { id: downArrow anchors.verticalCenter: parent.verticalCenter anchors.right: parent.right - anchors.rightMargin: UM.Theme.sizes.default_margin.width - width: UM.Theme.sizes.standard_arrow.width - height: UM.Theme.sizes.standard_arrow.height + anchors.rightMargin: Theme.getSize("default_margin").width + width: Theme.getSize("standard_arrow").width + height: Theme.getSize("standard_arrow").height sourceSize.width: width sourceSize.height: width - color: UM.Theme.colors.setting_category_text - source: UM.Theme.icons.arrow_bottom + color: Theme.getColor("setting_category_text") + source: Theme.getIcon("arrow_bottom") } Label { id: sidebarComboBoxLabel - color: UM.Theme.colors.setting_control_text + color: Theme.getColor("setting_control_text") text: control.text; elide: Text.ElideRight; anchors.left: parent.left; - anchors.leftMargin: UM.Theme.sizes.setting_unit_margin.width + anchors.leftMargin: Theme.getSize("setting_unit_margin").width anchors.right: downArrow.left; anchors.verticalCenter: parent.verticalCenter; - font: UM.Theme.fonts.default + font: Theme.getFont("default") } } label: Label{} } } -/* - property Component open_file_button: Component { - ButtonStyle { - background: Item{ - implicitWidth: UM.Theme.sizes.button.width; - implicitHeight: UM.Theme.sizes.button.height; - Rectangle { - id: tool_button_background - anchors.left: parent.right - anchors.verticalCenter: parent.verticalCenter - opacity: control.hovered ? 1.0 : 0.0; - - width: control.hovered ? label.width : 0; - height: label.height - - Behavior on width { NumberAnimation { duration: 100; } } - Behavior on height { NumberAnimation { duration: 100; } } - Behavior on opacity { NumberAnimation { duration: 100; } } - - Label { - id: label - anchors.bottom: parent.bottom - text: control.text - font: UM.Theme.fonts.button_tooltip; - color: UM.Theme.colors.button_tooltip_text; - } - } - Rectangle { - anchors.fill: parent; - color: control.pressed ? UM.Theme.colors.button_active : - control.hovered ? UM.Theme.colors.button_hover : 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 tool_button: Component { ButtonStyle { background: Item { - implicitWidth: UM.Theme.sizes.button.width; - implicitHeight: UM.Theme.sizes.button.height; + implicitWidth: Theme.getSize("button").width; + implicitHeight: Theme.getSize("button").height; UM.PointingRectangle { id: button_tooltip anchors.left: parent.right - anchors.leftMargin: UM.Theme.sizes.button_tooltip_arrow.width * 2 + anchors.leftMargin: Theme.getSize("button_tooltip_arrow").width * 2 anchors.verticalCenter: parent.verticalCenter target: Qt.point(parent.x, y + height/2) - arrowSize: UM.Theme.sizes.button_tooltip_arrow.width - color: UM.Theme.colors.tooltip + arrowSize: Theme.getSize("button_tooltip_arrow").width + color: Theme.getColor("tooltip") opacity: control.hovered ? 1.0 : 0.0; - width: control.hovered ? button_tip.width + UM.Theme.sizes.button_tooltip.width : 0 - height: UM.Theme.sizes.button_tooltip.height + width: control.hovered ? button_tip.width + Theme.getSize("button_tooltip").width : 0 + height: Theme.getSize("button_tooltip").height Behavior on width { NumberAnimation { duration: 100; } } Behavior on opacity { NumberAnimation { duration: 100; } } @@ -120,8 +73,8 @@ QtObject { anchors.verticalCenter: parent.verticalCenter; text: control.text; - font: UM.Theme.fonts.button_tooltip; - color: UM.Theme.colors.tooltip_text; + font: Theme.getFont("button_tooltip"); + color: Theme.getColor("tooltip_text"); } } @@ -133,13 +86,13 @@ QtObject { color: { if(control.checkable && control.checked && control.hovered) { - return UM.Theme.colors.button_active_hover; + return Theme.getColor("button_active_hover"); } else if(control.pressed || (control.checkable && control.checked)) { - return UM.Theme.colors.button_active; + return Theme.getColor("button_active"); } else if(control.hovered) { - return UM.Theme.colors.button_hover; + return Theme.getColor("button_hover"); } else { - return UM.Theme.colors.button; + return Theme.getColor("button"); } } Behavior on color { ColorAnimation { duration: 50; } } @@ -149,16 +102,16 @@ QtObject { id: tool_button_arrow opacity: !control.enabled ? 0.2 : 1.0 anchors.right: parent.right; - anchors.rightMargin: (UM.Theme.sizes.button.width - UM.Theme.sizes.button_icon.width) / 4 + anchors.rightMargin: (Theme.getSize("button").width - Theme.getSize("button_icon").width) / 4 anchors.bottom: parent.bottom; - anchors.bottomMargin: (UM.Theme.sizes.button.height - UM.Theme.sizes.button_icon.height) / 4 - width: UM.Theme.sizes.standard_arrow.width - height: UM.Theme.sizes.standard_arrow.height + anchors.bottomMargin: (Theme.getSize("button").height - Theme.getSize("button_icon").height) / 4 + width: Theme.getSize("standard_arrow").width + height: Theme.getSize("standard_arrow").height sourceSize.width: width sourceSize.height: width visible: control.menu != null; - color: UM.Theme.colors.button_text - source: UM.Theme.icons.arrow_bottom + color: Theme.getColor("button_text") + source: Theme.getIcon("arrow_bottom") } } } @@ -168,103 +121,36 @@ QtObject { anchors.centerIn: parent; opacity: !control.enabled ? 0.2 : 1.0 source: control.iconSource; - width: UM.Theme.sizes.button_icon.width; - height: UM.Theme.sizes.button_icon.height; + width: Theme.getSize("button_icon").width; + height: Theme.getSize("button_icon").height; - sourceSize: UM.Theme.sizes.button_icon + sourceSize: Theme.getSize("button_icon") } } } } -/* - 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.left: parent.right - anchors.verticalCenter: parent.verticalCenter - opacity: control.hovered ? 1.0 : 0.0; - - width: control.hovered ? label.width : 0; - height: label.height - - Behavior on width { NumberAnimation { duration: 100; } } - Behavior on height { NumberAnimation { duration: 100; } } - Behavior on opacity { NumberAnimation { duration: 100; } } - - Label { - id: label - anchors.bottom: parent.bottom - text: control.text - font: UM.Theme.fonts.button_tooltip; - color: UM.Theme.colors.button_tooltip_text; - } - } - - Rectangle { - id: buttonFace; - - anchors.fill: parent; - - property bool down: control.pressed || (control.checkable && control.checked); - - color: { - if(!control.enabled) { - return UM.Theme.colors.button_disabled; - } else if(control.checkable && control.checked && control.hovered) { - return UM.Theme.colors.button_active_hover; - } else if(control.pressed || (control.checkable && control.checked)) { - return UM.Theme.colors.button_active; - } else if(control.hovered) { - return UM.Theme.colors.button_hover; - } else { - return UM.Theme.colors.button; - } - } - Behavior on color { ColorAnimation { duration: 50; } } - } - } - - label: Item { - Image { - anchors.centerIn: parent; - - source: control.iconSource; - width: UM.Theme.sizes.button_icon.width; - height: UM.Theme.sizes.button_icon.height; - - sourceSize: UM.Theme.sizes.button_icon - } - } - } - } -*/ - property Component progressbar: Component{ ProgressBarStyle { background:Rectangle { - implicitWidth: UM.Theme.sizes.message.width - (UM.Theme.sizes.default_margin.width * 2) - implicitHeight: UM.Theme.sizes.progressbar.height - radius: UM.Theme.sizes.progressbar_radius.width - color: UM.Theme.colors.progressbar_background + implicitWidth: Theme.getSize("message").width - (Theme.getSize("default_margin").width * 2) + implicitHeight: Theme.getSize("progressbar").height + radius: Theme.getSize("progressbar_radius").width + color: Theme.getColor("progressbar_background") } progress: Rectangle { - color: control.indeterminate ? "transparent" : UM.Theme.colors.progressbar_control + color: control.indeterminate ? "transparent" : Theme.getColor("progressbar_control") + radius: Theme.getSize("progressbar_radius").width Rectangle{ - radius: UM.Theme.sizes.progressbar_radius.width - color: UM.Theme.colors.progressbar_control - width: UM.Theme.sizes.progressbar_control.width - height: UM.Theme.sizes.progressbar_control.height + radius: Theme.getSize("progressbar_radius").width + color: Theme.getColor("progressbar_control") + width: Theme.getSize("progressbar_control").width + height: Theme.getSize("progressbar_control").height visible: control.indeterminate SequentialAnimation on x { id: xAnim - property int animEndPoint: UM.Theme.sizes.message.width - (UM.Theme.sizes.default_margin.width * 2) - UM.Theme.sizes.progressbar_control.width + property int animEndPoint: Theme.getSize("message").width - (Theme.getSize("default_margin").width * 2) - Theme.getSize("progressbar_control").width running: control.indeterminate loops: Animation.Infinite NumberAnimation { from: 0; to: xAnim.animEndPoint; duration: 2000;} @@ -275,48 +161,46 @@ QtObject { } } - - property Component sidebar_category: Component { ButtonStyle { background: Rectangle { anchors.fill: parent; anchors.left: parent.left - anchors.leftMargin: UM.Theme.sizes.default_margin.width + anchors.leftMargin: Theme.getSize("default_margin").width anchors.right: parent.right - anchors.rightMargin: UM.Theme.sizes.default_margin.width - implicitHeight: UM.Theme.sizes.section.height; + anchors.rightMargin: Theme.getSize("default_margin").width + implicitHeight: Theme.getSize("section").height; color: { if(control.color) { return control.color; } else if(!control.enabled) { - return UM.Theme.colors.setting_category_disabled; + return Theme.getColor("setting_category_disabled"); } else if(control.hovered && control.checkable && control.checked) { - return UM.Theme.colors.setting_category_active_hover; + return Theme.getColor("setting_category_active_hover"); } else if(control.pressed || (control.checkable && control.checked)) { - return UM.Theme.colors.setting_category_active; + return Theme.getColor("setting_category_active"); } else if(control.hovered) { - return UM.Theme.colors.setting_category_hover; + return Theme.getColor("setting_category_hover"); } else { - return UM.Theme.colors.setting_category; + return Theme.getColor("setting_category"); } } Behavior on color { ColorAnimation { duration: 50; } } Rectangle { - height: UM.Theme.sizes.default_lining.height + height: Theme.getSize("default_lining").height width: parent.width anchors.bottom: parent.bottom color: { if(!control.enabled) { - return UM.Theme.colors.setting_category_disabled_border; + return Theme.getColor("setting_category_disabled_border"); } else if(control.hovered && control.checkable && control.checked) { - return UM.Theme.colors.setting_category_active_hover_border; + return Theme.getColor("setting_category_active_hover_border"); } else if(control.pressed || (control.checkable && control.checked)) { - return UM.Theme.colors.setting_category_active_border; + return Theme.getColor("setting_category_active_border"); } else if(control.hovered) { - return UM.Theme.colors.setting_category_hover_border; + return Theme.getColor("setting_category_hover_border"); } else { - return UM.Theme.colors.setting_category_border; + return Theme.getColor("setting_category_border"); } } } @@ -328,15 +212,15 @@ QtObject { id: icon; anchors.left: parent.left height: parent.height - width: UM.Theme.sizes.section_icon_column.width + width: Theme.getSize("section_icon_column").width UM.RecolorImage { anchors.verticalCenter: parent.verticalCenter anchors.left: parent.left - anchors.leftMargin: UM.Theme.sizes.default_margin.width - color: UM.Theme.colors.setting_category_text + anchors.leftMargin: Theme.getSize("default_margin").width + color: Theme.getColor("setting_category_text") source: control.iconSource; - width: UM.Theme.sizes.section_icon.width; - height: UM.Theme.sizes.section_icon.height; + width: Theme.getSize("section_icon").width; + height: Theme.getSize("section_icon").height; sourceSize.width: width + 15 sourceSize.height: width + 15 } @@ -345,13 +229,13 @@ QtObject { Label { anchors { left: icon.right; - leftMargin: UM.Theme.sizes.default_lining.width; + leftMargin: Theme.getSize("default_lining").width; right: parent.right; verticalCenter: parent.verticalCenter; } text: control.text; - font: UM.Theme.fonts.setting_category; - color: UM.Theme.colors.setting_category_text; + font: Theme.getFont("setting_category"); + color: Theme.getColor("setting_category_text"); fontSizeMode: Text.HorizontalFit; minimumPointSize: 8 } @@ -359,13 +243,13 @@ QtObject { id: category_arrow anchors.verticalCenter: parent.verticalCenter anchors.right: parent.right - anchors.rightMargin: UM.Theme.sizes.default_margin.width * 2 - width / 2 - width: UM.Theme.sizes.standard_arrow.width - height: UM.Theme.sizes.standard_arrow.height + anchors.rightMargin: Theme.getSize("default_margin").width * 2 - width / 2 + width: Theme.getSize("standard_arrow").width + height: Theme.getSize("standard_arrow").height sourceSize.width: width sourceSize.height: width - color: UM.Theme.colors.setting_category_text - source: control.checked ? UM.Theme.icons.arrow_bottom : UM.Theme.icons.arrow_left + color: Theme.getColor("setting_category_text") + source: control.checked ? Theme.getIcon("arrow_bottom") : Theme.getIcon("arrow_left") } } } @@ -379,62 +263,62 @@ QtObject { transientScrollBars: false scrollBarBackground: Rectangle { - implicitWidth: UM.Theme.sizes.scrollbar.width + implicitWidth: Theme.getSize("scrollbar").width radius: implicitWidth / 2 - color: UM.Theme.colors.scrollbar_background; + color: Theme.getColor("scrollbar_background"); } handle: Rectangle { id: scrollViewHandle - implicitWidth: UM.Theme.sizes.scrollbar.width; + implicitWidth: Theme.getSize("scrollbar").width; radius: implicitWidth / 2 - color: styleData.pressed ? UM.Theme.colors.scrollbar_handle_down : styleData.hovered ? UM.Theme.colors.scrollbar_handle_hover : UM.Theme.colors.scrollbar_handle; + color: styleData.pressed ? Theme.getColor("scrollbar_handle_down") : styleData.hovered ? Theme.getColor("scrollbar_handle_hover") : Theme.getColor("scrollbar_handle"); Behavior on color { ColorAnimation { duration: 50; } } } } } property variant setting_item: UM.SettingItemStyle { - labelFont: UM.Theme.fonts.default; - labelColor: UM.Theme.colors.setting_control_text; + labelFont: Theme.getFont("default"); + labelColor: Theme.getColor("setting_control_text"); - spacing: UM.Theme.sizes.default_lining.height; - fixedHeight: UM.Theme.sizes.setting.height; + spacing: Theme.getSize("default_lining").height; + fixedHeight: Theme.getSize("setting").height; - controlWidth: UM.Theme.sizes.setting_control.width; - controlRightMargin: UM.Theme.sizes.setting_control_margin.width; - controlColor: UM.Theme.colors.setting_control; - controlHighlightColor: UM.Theme.colors.setting_control_highlight; - controlBorderColor: UM.Theme.colors.setting_control_border; - controlBorderHighlightColor: UM.Theme.colors.setting_control_border_highlight; - controlTextColor: UM.Theme.colors.setting_control_text; - controlBorderWidth: UM.Theme.sizes.default_lining.width; - controlFont: UM.Theme.fonts.default; + controlWidth: Theme.getSize("setting_control").width; + controlRightMargin: Theme.getSize("setting_control_margin").width; + controlColor: Theme.getColor("setting_control"); + controlHighlightColor: Theme.getColor("setting_control_highlight"); + controlBorderColor: Theme.getColor("setting_control_border"); + controlBorderHighlightColor: Theme.getColor("setting_control_border_highlight"); + controlTextColor: Theme.getColor("setting_control_text"); + controlBorderWidth: Theme.getSize("default_lining").width; + controlFont: Theme.getFont("default"); - validationErrorColor: UM.Theme.colors.setting_validation_error; - validationWarningColor: UM.Theme.colors.setting_validation_warning; - validationOkColor: UM.Theme.colors.setting_validation_ok; + validationErrorColor: Theme.getColor("setting_validation_error"); + validationWarningColor: Theme.getColor("setting_validation_warning"); + validationOkColor: Theme.getColor("setting_validation_ok"); - unitRightMargin: UM.Theme.sizes.setting_unit_margin.width; - unitColor: UM.Theme.colors.setting_unit; - unitFont: UM.Theme.fonts.default; + unitRightMargin: Theme.getSize("setting_unit_margin").width; + unitColor: Theme.getColor("setting_unit"); + unitFont: Theme.getFont("default"); } property Component checkbox: Component { CheckBoxStyle { background: Item { } indicator: Rectangle { - implicitWidth: UM.Theme.sizes.checkbox.width; - implicitHeight: UM.Theme.sizes.checkbox.height; + implicitWidth: Theme.getSize("checkbox").width; + implicitHeight: Theme.getSize("checkbox").height; - color: (control.hovered || control.hovered_ex) ? UM.Theme.colors.checkbox_hover : UM.Theme.colors.checkbox; + color: (control.hovered || control.hovered_ex) ? Theme.getColor("checkbox_hover") : Theme.getColor("checkbox"); Behavior on color { ColorAnimation { duration: 50; } } - radius: control.exclusiveGroup ? UM.Theme.sizes.checkbox.width / 2 : 0 + radius: control.exclusiveGroup ? Theme.getSize("checkbox").width / 2 : 0 - border.width: UM.Theme.sizes.default_lining.width; - border.color: (control.hovered || control.hovered_ex) ? UM.Theme.colors.checkbox_border_hover : UM.Theme.colors.checkbox_border; + border.width: Theme.getSize("default_lining").width; + border.color: (control.hovered || control.hovered_ex) ? Theme.getColor("checkbox_border_hover") : Theme.getColor("checkbox_border"); UM.RecolorImage { anchors.verticalCenter: parent.verticalCenter @@ -443,16 +327,16 @@ QtObject { height: parent.height/2.5 sourceSize.width: width sourceSize.height: width - color: UM.Theme.colors.checkbox_mark - source: control.exclusiveGroup ? UM.Theme.icons.dot : UM.Theme.icons.check + color: Theme.getColor("checkbox_mark") + source: control.exclusiveGroup ? Theme.getIcon("dot") : Theme.getIcon("check") opacity: control.checked Behavior on opacity { NumberAnimation { duration: 100; } } } } label: Label { text: control.text; - color: UM.Theme.colors.checkbox_text; - font: UM.Theme.fonts.default; + color: Theme.getColor("checkbox_text"); + font: Theme.getFont("default"); } } } @@ -461,11 +345,13 @@ QtObject { SliderStyle { groove: Rectangle { implicitWidth: control.width; - implicitHeight: UM.Theme.sizes.slider_groove.height; + implicitHeight: Theme.getSize("slider_groove").height; - color: UM.Theme.colors.slider_groove; - border.width: UM.Theme.sizes.default_lining.width; - border.color: UM.Theme.colors.slider_groove_border; + color: Theme.getColor("slider_groove"); + border.width: Theme.getSize("default_lining").width; + border.color: Theme.getColor("slider_groove_border"); + + radius: width / 2; Rectangle { anchors { @@ -473,101 +359,44 @@ QtObject { top: parent.top; bottom: parent.bottom; } - color: UM.Theme.colors.slider_groove_fill; + color: Theme.getColor("slider_groove_fill"); width: (control.value / (control.maximumValue - control.minimumValue)) * parent.width; + radius: width / 2; } } handle: Rectangle { - width: UM.Theme.sizes.slider_handle.width; - height: UM.Theme.sizes.slider_handle.height; - color: control.hovered ? UM.Theme.colors.slider_handle_hover : UM.Theme.colors.slider_handle; + width: Theme.getSize("slider_handle").width; + height: Theme.getSize("slider_handle").height; + color: control.hovered ? Theme.getColor("slider_handle_hover") : Theme.getColor("slider_handle"); + radius: Theme.getSize("slider_handle").width/2; Behavior on color { ColorAnimation { duration: 50; } } } } } - property Component layerViewSlider: Component { - SliderStyle { - groove: Rectangle { - id: layerSliderGroove - implicitWidth: control.width; - implicitHeight: UM.Theme.sizes.slider_groove.height; - radius: width/2; - - color: UM.Theme.colors.slider_groove; - border.width: UM.Theme.sizes.default_lining.width; - border.color: UM.Theme.colors.slider_groove_border; - Rectangle { - anchors { - left: parent.left; - top: parent.top; - bottom: parent.bottom; - } - color: UM.Theme.colors.slider_groove_fill; - width: (control.value / (control.maximumValue - control.minimumValue)) * parent.width; - radius: width/2 - } - } - handle: Rectangle { - id: layerSliderControl - width: UM.Theme.sizes.slider_handle.width; - height: UM.Theme.sizes.slider_handle.height; - color: control.hovered ? UM.Theme.colors.slider_handle_hover : UM.Theme.colors.slider_handle; - Behavior on color { ColorAnimation { duration: 50; } } - TextField { - id: valueLabel - property string maxValue: control.maximumValue + 1 - text: control.value + 1 - horizontalAlignment: TextInput.AlignHCenter - onEditingFinished: { - if (valueLabel.text != ''){ - control.value = valueLabel.text - 1 - } - } - validator: IntValidator {bottom: 1; top: control.maximumValue + 1;} - visible: UM.LayerView.getLayerActivity && Printer.getPlatformActivity ? true : false - anchors.top: layerSliderControl.bottom - anchors.topMargin: width/2 - UM.Theme.sizes.default_margin.width/2 - anchors.horizontalCenter: layerSliderControl.horizontalCenter - rotation: 90 - style: TextFieldStyle{ - textColor: UM.Theme.colors.setting_control_text; - font: UM.Theme.fonts.default; - background: Rectangle { - implicitWidth: control.maxValue.length * valueLabel.font.pixelSize + UM.Theme.sizes.default_margin.width - implicitHeight: UM.Theme.sizes.slider_handle.height + UM.Theme.sizes.default_margin.width - border.width: UM.Theme.sizes.default_lining.width; - border.color: UM.Theme.colors.slider_groove_border; - } - } - } - } - } - } - property Component text_field: Component { TextFieldStyle { - textColor: UM.Theme.colors.setting_control_text; - font: UM.Theme.fonts.default; + textColor: Theme.getColor("setting_control_text"); + font: Theme.getFont("default"); background: Rectangle { implicitHeight: control.height; implicitWidth: control.width; - border.width: UM.Theme.sizes.default_lining.width; - border.color: control.hovered ? UM.Theme.colors.setting_control_border_highlight : UM.Theme.colors.setting_control_border; + border.width: Theme.getSize("default_lining").width; + border.color: control.hovered ? Theme.getColor("setting_control_border_highlight") : Theme.getColor("setting_control_border"); - color: UM.Theme.colors.setting_validation_ok; + color: Theme.getColor("setting_validation_ok"); Label { anchors.right: parent.right; - anchors.rightMargin: UM.Theme.sizes.setting_unit_margin.width; + anchors.rightMargin: Theme.getSize("setting_unit_margin").width; anchors.verticalCenter: parent.verticalCenter; text: control.unit ? control.unit : "" - color: UM.Theme.colors.setting_unit; - font: UM.Theme.fonts.default; + color: Theme.getColor("setting_unit"); + font: Theme.getFont("default"); } } } diff --git a/resources/themes/cura/theme.json b/resources/themes/cura/theme.json index 24cc3c541b..1332aedca0 100644 --- a/resources/themes/cura/theme.json +++ b/resources/themes/cura/theme.json @@ -3,52 +3,52 @@ "large": { "size": 1.25, "bold": true, - "family": "Proxima Nova Rg" + "family": "Open Sans" }, "default": { "size": 1.15, - "family": "Proxima Nova Rg" + "family": "Open Sans" }, "default_bold": { "size": 1.15, "bold": true, - "family": "Proxima Nova Rg" + "family": "Open Sans" }, "small": { "size": 1.0, - "family": "Proxima Nova Rg" + "family": "Open Sans" }, "very_small": { "size": 0.75, - "family": "Proxima Nova Rg" + "family": "Open Sans" }, "caption": { "size": 1.0, - "family": "Proxima Nova Rg" + "family": "Open Sans" }, "sidebar_header": { "size": 0.75, "capitalize": true, - "family": "Proxima Nova Rg" + "family": "Open Sans" }, "default_header": { "size": 1.0, "bold": true, - "family": "Proxima Nova Rg", + "family": "Open Sans", "letterSpacing": 2.0 }, "button_tooltip": { "size": 1.0, - "family": "Proxima Nova Rg" + "family": "Open Sans" }, "setting_category": { "size": 1.15, - "family": "Proxima Nova Rg" + "family": "Open Sans" }, "action_button": { "size": 1.15, "bold": true, - "family": "Proxima Nova Rg" + "family": "Open Sans" } },