mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-17 15:45:54 +08:00
Merge branch 'master' of https://github.com/Ultimaker/Cura
This commit is contained in:
commit
6334f74fc6
@ -2,6 +2,7 @@ from UM.i18n import i18nCatalog
|
|||||||
from UM.OutputDevice.OutputDevice import OutputDevice
|
from UM.OutputDevice.OutputDevice import OutputDevice
|
||||||
from PyQt5.QtCore import pyqtProperty, pyqtSignal, pyqtSlot, QObject
|
from PyQt5.QtCore import pyqtProperty, pyqtSignal, pyqtSlot, QObject
|
||||||
from PyQt5.QtWidgets import QMessageBox
|
from PyQt5.QtWidgets import QMessageBox
|
||||||
|
import UM.Settings.ContainerRegistry
|
||||||
|
|
||||||
from enum import IntEnum # For the connection state tracking.
|
from enum import IntEnum # For the connection state tracking.
|
||||||
from UM.Logger import Logger
|
from UM.Logger import Logger
|
||||||
@ -285,7 +286,7 @@ class PrinterOutputDevice(QObject, OutputDevice):
|
|||||||
result.append(i18n_catalog.i18nc("@item:material", "No material loaded"))
|
result.append(i18n_catalog.i18nc("@item:material", "No material loaded"))
|
||||||
continue
|
continue
|
||||||
|
|
||||||
containers = self._container_registry.findInstanceContainers(type = "material", guid = material_id)
|
containers = self._container_registry.findInstanceContainers(type = "material", GUID = material_id)
|
||||||
if containers:
|
if containers:
|
||||||
result.append(containers[0].getName())
|
result.append(containers[0].getName())
|
||||||
else:
|
else:
|
||||||
|
@ -349,6 +349,9 @@ class ContainerManager(QObject):
|
|||||||
except NotImplementedError:
|
except NotImplementedError:
|
||||||
return { "status": "error", "message": "Unable to serialize container"}
|
return { "status": "error", "message": "Unable to serialize container"}
|
||||||
|
|
||||||
|
if contents is None:
|
||||||
|
return {"status": "error", "message": "Serialization returned None. Unable to write to file"}
|
||||||
|
|
||||||
with UM.SaveFile(file_url, "w") as f:
|
with UM.SaveFile(file_url, "w") as f:
|
||||||
f.write(contents)
|
f.write(contents)
|
||||||
|
|
||||||
@ -586,6 +589,7 @@ class ContainerManager(QObject):
|
|||||||
new_container = container.duplicate(self._createUniqueId(stack_id, new_name), new_name)
|
new_container = container.duplicate(self._createUniqueId(stack_id, new_name), new_name)
|
||||||
self._container_registry.addContainer(new_container)
|
self._container_registry.addContainer(new_container)
|
||||||
else:
|
else:
|
||||||
|
UM.Logger.log("w", "Unable to duplicate profile. It has the wrong type.")
|
||||||
return ""
|
return ""
|
||||||
|
|
||||||
return new_name
|
return new_name
|
||||||
@ -688,7 +692,9 @@ class ContainerManager(QObject):
|
|||||||
filter_by_material = False
|
filter_by_material = False
|
||||||
|
|
||||||
if global_stack.getMetaDataEntry("has_machine_quality"):
|
if global_stack.getMetaDataEntry("has_machine_quality"):
|
||||||
criteria["definition"] = global_stack.getBottom().getId()
|
definition = global_stack.getBottom()
|
||||||
|
definition_id = definition.getMetaDataEntry("quality_definition", definition.getId())
|
||||||
|
criteria["definition"] = definition_id
|
||||||
|
|
||||||
filter_by_material = global_stack.getMetaDataEntry("has_materials")
|
filter_by_material = global_stack.getMetaDataEntry("has_materials")
|
||||||
|
|
||||||
|
@ -227,6 +227,16 @@ class CuraEngineBackend(Backend):
|
|||||||
if job.isCancelled() or job.getError() or job.getResult() == StartSliceJob.StartJobResult.Error:
|
if job.isCancelled() or job.getError() or job.getResult() == StartSliceJob.StartJobResult.Error:
|
||||||
return
|
return
|
||||||
|
|
||||||
|
if job.getResult() == StartSliceJob.StartJobResult.MaterialIncompatible:
|
||||||
|
if Application.getInstance().getPlatformActivity:
|
||||||
|
self._error_message = Message(catalog.i18nc("@info:status",
|
||||||
|
"The selected material is imcompatible with the selected machine or configuration."))
|
||||||
|
self._error_message.show()
|
||||||
|
self.backendStateChange.emit(BackendState.Error)
|
||||||
|
else:
|
||||||
|
self.backendStateChange.emit(BackendState.NotStarted)
|
||||||
|
return
|
||||||
|
|
||||||
if job.getResult() == StartSliceJob.StartJobResult.SettingError:
|
if job.getResult() == StartSliceJob.StartJobResult.SettingError:
|
||||||
if Application.getInstance().getPlatformActivity:
|
if Application.getInstance().getPlatformActivity:
|
||||||
self._error_message = Message(catalog.i18nc("@info:status", "Unable to slice with the current settings. Please check your settings for errors."))
|
self._error_message = Message(catalog.i18nc("@info:status", "Unable to slice with the current settings. Please check your settings for errors."))
|
||||||
|
@ -24,6 +24,7 @@ class StartJobResult(IntEnum):
|
|||||||
Error = 2
|
Error = 2
|
||||||
SettingError = 3
|
SettingError = 3
|
||||||
NothingToSlice = 4
|
NothingToSlice = 4
|
||||||
|
MaterialIncompatible = 5
|
||||||
|
|
||||||
|
|
||||||
## Formatter class that handles token expansion in start/end gcod
|
## Formatter class that handles token expansion in start/end gcod
|
||||||
@ -86,7 +87,7 @@ class StartSliceJob(Job):
|
|||||||
material = extruder_stack.findContainer({"type": "material"})
|
material = extruder_stack.findContainer({"type": "material"})
|
||||||
if material:
|
if material:
|
||||||
if material.getMetaDataEntry("compatible") == False:
|
if material.getMetaDataEntry("compatible") == False:
|
||||||
self.setResult(StartJobResult.SettingError)
|
self.setResult(StartJobResult.MaterialIncompatible)
|
||||||
return
|
return
|
||||||
|
|
||||||
# Don't slice if there is a per object setting with an error value.
|
# Don't slice if there is a per object setting with an error value.
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
# Copyright (c) 2015 Ultimaker B.V.
|
# Copyright (c) 2015 Ultimaker B.V.
|
||||||
# Cura is released under the terms of the AGPLv3 or higher.
|
# Cura is released under the terms of the AGPLv3 or higher.
|
||||||
|
|
||||||
|
from cura.CuraApplication import CuraApplication
|
||||||
|
|
||||||
from UM.Extension import Extension
|
from UM.Extension import Extension
|
||||||
from UM.Application import Application
|
from UM.Application import Application
|
||||||
from UM.Preferences import Preferences
|
from UM.Preferences import Preferences
|
||||||
@ -18,6 +20,7 @@ import math
|
|||||||
import urllib.request
|
import urllib.request
|
||||||
import urllib.parse
|
import urllib.parse
|
||||||
import ssl
|
import ssl
|
||||||
|
import hashlib
|
||||||
|
|
||||||
catalog = i18nCatalog("cura")
|
catalog = i18nCatalog("cura")
|
||||||
|
|
||||||
@ -43,9 +46,11 @@ class SliceInfoJob(Job):
|
|||||||
if Platform.isOSX():
|
if Platform.isOSX():
|
||||||
kwoptions["context"] = ssl._create_unverified_context()
|
kwoptions["context"] = ssl._create_unverified_context()
|
||||||
|
|
||||||
|
Logger.log("d", "Sending anonymous slice info to [%s]...", self.url)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
f = urllib.request.urlopen(self.url, **kwoptions)
|
f = urllib.request.urlopen(self.url, **kwoptions)
|
||||||
Logger.log("i", "Sent anonymous slice info to %s", self.url)
|
Logger.log("i", "Sent anonymous slice info.")
|
||||||
f.close()
|
f.close()
|
||||||
except urllib.error.HTTPError as http_exception:
|
except urllib.error.HTTPError as http_exception:
|
||||||
Logger.log("e", "An HTTP error occurred while trying to send slice information: %s" % http_exception)
|
Logger.log("e", "An HTTP error occurred while trying to send slice information: %s" % http_exception)
|
||||||
@ -56,7 +61,7 @@ class SliceInfoJob(Job):
|
|||||||
# The data is only sent when the user in question gave permission to do so. All data is anonymous and
|
# The data is only sent when the user in question gave permission to do so. All data is anonymous and
|
||||||
# no model files are being sent (Just a SHA256 hash of the model).
|
# no model files are being sent (Just a SHA256 hash of the model).
|
||||||
class SliceInfo(Extension):
|
class SliceInfo(Extension):
|
||||||
info_url = "https://stats.youmagine.com/curastats/slice"
|
info_url = "http://stats.youmagine.com/curastats/slice"
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
super().__init__()
|
super().__init__()
|
||||||
@ -80,6 +85,16 @@ class SliceInfo(Extension):
|
|||||||
Logger.log("d", "'info/send_slice_info' is turned off.")
|
Logger.log("d", "'info/send_slice_info' is turned off.")
|
||||||
return # Do nothing, user does not want to send data
|
return # Do nothing, user does not want to send data
|
||||||
|
|
||||||
|
# Listing all files placed on the buildplate
|
||||||
|
modelhashes = []
|
||||||
|
for node in DepthFirstIterator(CuraApplication.getInstance().getController().getScene().getRoot()):
|
||||||
|
if type(node) is not SceneNode or not node.getMeshData():
|
||||||
|
continue
|
||||||
|
modelhashes.append(node.getMeshData().getHash())
|
||||||
|
|
||||||
|
# Creating md5sums and formatting them as discussed on JIRA
|
||||||
|
modelhash_formatted = ",".join(modelhashes)
|
||||||
|
|
||||||
global_container_stack = Application.getInstance().getGlobalContainerStack()
|
global_container_stack = Application.getInstance().getGlobalContainerStack()
|
||||||
|
|
||||||
# Get total material used (in mm^3)
|
# Get total material used (in mm^3)
|
||||||
@ -89,27 +104,6 @@ class SliceInfo(Extension):
|
|||||||
# TODO: Send material per extruder instead of mashing it on a pile
|
# TODO: Send material per extruder instead of mashing it on a pile
|
||||||
material_used = math.pi * material_radius * material_radius * sum(print_information.materialLengths) #Volume of all materials used
|
material_used = math.pi * material_radius * material_radius * sum(print_information.materialLengths) #Volume of all materials used
|
||||||
|
|
||||||
# Get model information (bounding boxes, hashes and transformation matrix)
|
|
||||||
models_info = []
|
|
||||||
for node in DepthFirstIterator(Application.getInstance().getController().getScene().getRoot()):
|
|
||||||
if type(node) is SceneNode and node.getMeshData() and node.getMeshData().getVertices() is not None:
|
|
||||||
if not getattr(node, "_outside_buildarea", False):
|
|
||||||
model_info = {}
|
|
||||||
model_info["hash"] = node.getMeshData().getHash()
|
|
||||||
model_info["bounding_box"] = {}
|
|
||||||
model_info["bounding_box"]["minimum"] = {}
|
|
||||||
model_info["bounding_box"]["minimum"]["x"] = node.getBoundingBox().minimum.x
|
|
||||||
model_info["bounding_box"]["minimum"]["y"] = node.getBoundingBox().minimum.y
|
|
||||||
model_info["bounding_box"]["minimum"]["z"] = node.getBoundingBox().minimum.z
|
|
||||||
|
|
||||||
model_info["bounding_box"]["maximum"] = {}
|
|
||||||
model_info["bounding_box"]["maximum"]["x"] = node.getBoundingBox().maximum.x
|
|
||||||
model_info["bounding_box"]["maximum"]["y"] = node.getBoundingBox().maximum.y
|
|
||||||
model_info["bounding_box"]["maximum"]["z"] = node.getBoundingBox().maximum.z
|
|
||||||
model_info["transformation"] = str(node.getWorldTransformation().getData())
|
|
||||||
|
|
||||||
models_info.append(model_info)
|
|
||||||
|
|
||||||
# Bundle the collected data
|
# Bundle the collected data
|
||||||
submitted_data = {
|
submitted_data = {
|
||||||
"processor": platform.processor(),
|
"processor": platform.processor(),
|
||||||
@ -117,7 +111,7 @@ class SliceInfo(Extension):
|
|||||||
"platform": platform.platform(),
|
"platform": platform.platform(),
|
||||||
"settings": global_container_stack.serialize(), # global_container with references on used containers
|
"settings": global_container_stack.serialize(), # global_container with references on used containers
|
||||||
"version": Application.getInstance().getVersion(),
|
"version": Application.getInstance().getVersion(),
|
||||||
"modelhash": "None",
|
"modelhash": modelhash_formatted,
|
||||||
"printtime": print_information.currentPrintTime.getDisplayString(DurationFormat.Format.ISO8601),
|
"printtime": print_information.currentPrintTime.getDisplayString(DurationFormat.Format.ISO8601),
|
||||||
"filament": material_used,
|
"filament": material_used,
|
||||||
"language": Preferences.getInstance().getValue("general/language"),
|
"language": Preferences.getInstance().getValue("general/language"),
|
||||||
|
@ -91,12 +91,9 @@ class MachineInstance:
|
|||||||
|
|
||||||
if has_machine_qualities: #This machine now has machine-quality profiles.
|
if has_machine_qualities: #This machine now has machine-quality profiles.
|
||||||
active_material += "_" + variant_materials #That means that the profile was split into multiple.
|
active_material += "_" + variant_materials #That means that the profile was split into multiple.
|
||||||
current_settings = "" #The profile didn't know the definition ID when it was upgraded, so it will have been invalid. Sorry, your current settings are lost now.
|
|
||||||
else:
|
|
||||||
current_settings = self._name + "_current_settings"
|
|
||||||
|
|
||||||
containers = [
|
containers = [
|
||||||
current_settings,
|
"", #The current profile doesn't know the definition ID when it was upgraded, only the instance ID, so it will be invalid. Sorry, your current settings are lost now.
|
||||||
active_quality_changes,
|
active_quality_changes,
|
||||||
active_quality,
|
active_quality,
|
||||||
active_material,
|
active_material,
|
||||||
|
@ -80,7 +80,7 @@ class Profile:
|
|||||||
import VersionUpgrade21to22 # Import here to prevent circular dependencies.
|
import VersionUpgrade21to22 # Import here to prevent circular dependencies.
|
||||||
|
|
||||||
if self._name == "Current settings":
|
if self._name == "Current settings":
|
||||||
self._filename += "_current_settings" #This resolves a duplicate ID arising from how Cura 2.1 stores its current settings.
|
return None #Can't upgrade these, because the new current profile needs to specify the definition ID and the old file only had the machine instance, not the definition.
|
||||||
|
|
||||||
config = configparser.ConfigParser(interpolation = None)
|
config = configparser.ConfigParser(interpolation = None)
|
||||||
|
|
||||||
|
@ -85,9 +85,6 @@ class XmlMaterialProfile(UM.Settings.InstanceContainer):
|
|||||||
# base file: global settings + supported machines
|
# base file: global settings + supported machines
|
||||||
# machine / variant combination: only changes for itself.
|
# machine / variant combination: only changes for itself.
|
||||||
def serialize(self):
|
def serialize(self):
|
||||||
if self._read_only:
|
|
||||||
return
|
|
||||||
|
|
||||||
registry = UM.Settings.ContainerRegistry.getInstance()
|
registry = UM.Settings.ContainerRegistry.getInstance()
|
||||||
|
|
||||||
base_file = self.getMetaDataEntry("base_file", "")
|
base_file = self.getMetaDataEntry("base_file", "")
|
||||||
|
@ -14,6 +14,7 @@
|
|||||||
},
|
},
|
||||||
|
|
||||||
"overrides": {
|
"overrides": {
|
||||||
|
"machine_name": { "default_value": "BQ Prusa i3 Hephestos" },
|
||||||
"machine_start_gcode": {
|
"machine_start_gcode": {
|
||||||
"default_value": "; -- START GCODE --\nG21 ;set units to millimetres\nG90 ;set to absolute positioning\nM106 S0 ;set fan speed to zero (turned off)\nG28 X0 Y0 ;move to the X/Y origin (Home)\nG28 Z0 ;move to the Z origin (Home)\nG1 Z15.0 F1200 ;move Z to position 15.0 mm\nG92 E0 ;zero the extruded length\nG1 E20 F200 ;extrude 20mm of feed stock\nG92 E0 ;zero the extruded length again\nG1 F7200 ;set feedrate to 120 mm/s\n; -- end of START GCODE --"
|
"default_value": "; -- START GCODE --\nG21 ;set units to millimetres\nG90 ;set to absolute positioning\nM106 S0 ;set fan speed to zero (turned off)\nG28 X0 Y0 ;move to the X/Y origin (Home)\nG28 Z0 ;move to the Z origin (Home)\nG1 Z15.0 F1200 ;move Z to position 15.0 mm\nG92 E0 ;zero the extruded length\nG1 E20 F200 ;extrude 20mm of feed stock\nG92 E0 ;zero the extruded length again\nG1 F7200 ;set feedrate to 120 mm/s\n; -- end of START GCODE --"
|
||||||
},
|
},
|
||||||
|
@ -14,6 +14,7 @@
|
|||||||
},
|
},
|
||||||
|
|
||||||
"overrides": {
|
"overrides": {
|
||||||
|
"machine_name": { "default_value": "BQ Hephestos 2" },
|
||||||
"machine_start_gcode": { "default_value": "; -- START GCODE --\nM104 S{material_print_temperature} ; Heat up extruder while leveling\nM800 ; Custom GCODE to fire start print procedure\nM109 S{material_print_temperature} ; Makes sure the temperature is correct before printing\n; -- end of START GCODE --" },
|
"machine_start_gcode": { "default_value": "; -- START GCODE --\nM104 S{material_print_temperature} ; Heat up extruder while leveling\nM800 ; Custom GCODE to fire start print procedure\nM109 S{material_print_temperature} ; Makes sure the temperature is correct before printing\n; -- end of START GCODE --" },
|
||||||
"machine_end_gcode": { "default_value": "; -- END GCODE --\nM801 ; Custom GCODE to fire end print procedure\n; -- end of END GCODE --" },
|
"machine_end_gcode": { "default_value": "; -- END GCODE --\nM801 ; Custom GCODE to fire end print procedure\n; -- end of END GCODE --" },
|
||||||
"machine_width": { "default_value": 210 },
|
"machine_width": { "default_value": 210 },
|
||||||
|
@ -14,6 +14,7 @@
|
|||||||
},
|
},
|
||||||
|
|
||||||
"overrides": {
|
"overrides": {
|
||||||
|
"machine_name": { "default_value": "BQ Prusa i3 Hephestos XL" },
|
||||||
"machine_start_gcode": {
|
"machine_start_gcode": {
|
||||||
"default_value": "; -- START GCODE --\nG21 ;set units to millimetres\nG90 ;set to absolute positioning\nM106 S0 ;set fan speed to zero (turned off)\nG28 X0 Y0 ;move to the X/Y origin (Home)\nG28 Z0 ;move to the Z origin (Home)\nG1 Z15.0 F1200 ;move Z to position 15.0 mm\nG92 E0 ;zero the extruded length\nG1 E20 F200 ;extrude 20mm of feed stock\nG92 E0 ;zero the extruded length again\nG1 F7200 ;set feedrate to 120 mm/s\n; -- end of START GCODE --"
|
"default_value": "; -- START GCODE --\nG21 ;set units to millimetres\nG90 ;set to absolute positioning\nM106 S0 ;set fan speed to zero (turned off)\nG28 X0 Y0 ;move to the X/Y origin (Home)\nG28 Z0 ;move to the Z origin (Home)\nG1 Z15.0 F1200 ;move Z to position 15.0 mm\nG92 E0 ;zero the extruded length\nG1 E20 F200 ;extrude 20mm of feed stock\nG92 E0 ;zero the extruded length again\nG1 F7200 ;set feedrate to 120 mm/s\n; -- end of START GCODE --"
|
||||||
},
|
},
|
||||||
|
@ -14,6 +14,7 @@
|
|||||||
},
|
},
|
||||||
|
|
||||||
"overrides": {
|
"overrides": {
|
||||||
|
"machine_name": { "default_value": "BQ Witbox" },
|
||||||
"machine_start_gcode": {
|
"machine_start_gcode": {
|
||||||
"default_value": "; -- START GCODE --\nG21 ;set units to millimetres\nG90 ;set to absolute positioning\nM106 S0 ;set fan speed to zero (turned off)\nG28 X0 Y0 ;move to the X/Y origin (Home)\nG28 Z0 ;move to the Z origin (Home)\nG1 Z15.0 F1200 ;move Z to position 15.0 mm\nG92 E0 ;zero the extruded length\nG1 E20 F200 ;extrude 20mm of feed stock\nG92 E0 ;zero the extruded length again\nG1 F7200 ;set feedrate to 120 mm/s\n; -- end of START GCODE --"
|
"default_value": "; -- START GCODE --\nG21 ;set units to millimetres\nG90 ;set to absolute positioning\nM106 S0 ;set fan speed to zero (turned off)\nG28 X0 Y0 ;move to the X/Y origin (Home)\nG28 Z0 ;move to the Z origin (Home)\nG1 Z15.0 F1200 ;move Z to position 15.0 mm\nG92 E0 ;zero the extruded length\nG1 E20 F200 ;extrude 20mm of feed stock\nG92 E0 ;zero the extruded length again\nG1 F7200 ;set feedrate to 120 mm/s\n; -- end of START GCODE --"
|
||||||
},
|
},
|
||||||
|
@ -14,6 +14,7 @@
|
|||||||
},
|
},
|
||||||
|
|
||||||
"overrides": {
|
"overrides": {
|
||||||
|
"machine_name": { "default_value": "BQ Witbox 2" },
|
||||||
"machine_start_gcode": {
|
"machine_start_gcode": {
|
||||||
"default_value": "; -- START GCODE --\nM800 ; Custom GCODE to fire start print procedure\n; -- end of START GCODE --"
|
"default_value": "; -- START GCODE --\nM800 ; Custom GCODE to fire start print procedure\n; -- end of START GCODE --"
|
||||||
},
|
},
|
||||||
|
@ -29,6 +29,16 @@
|
|||||||
"icon": "category_machine",
|
"icon": "category_machine",
|
||||||
"children":
|
"children":
|
||||||
{
|
{
|
||||||
|
"machine_name":
|
||||||
|
{
|
||||||
|
"label": "Machine Type",
|
||||||
|
"description": "The name of your 3D printer model.",
|
||||||
|
"default_value": "Unknown",
|
||||||
|
"type": "str",
|
||||||
|
"settable_per_mesh": false,
|
||||||
|
"settable_per_extruder": false,
|
||||||
|
"settable_per_meshgroup": false
|
||||||
|
},
|
||||||
"machine_show_variants":
|
"machine_show_variants":
|
||||||
{
|
{
|
||||||
"label": "Show machine variants",
|
"label": "Show machine variants",
|
||||||
@ -2495,7 +2505,7 @@
|
|||||||
"description": "Generate a dense interface between the model and the support. This will create a skin at the top of the support on which the model is printed and at the bottom of the support, where it rests on the model.",
|
"description": "Generate a dense interface between the model and the support. This will create a skin at the top of the support on which the model is printed and at the bottom of the support, where it rests on the model.",
|
||||||
"type": "bool",
|
"type": "bool",
|
||||||
"default_value": false,
|
"default_value": false,
|
||||||
"global_inherits_stack": "support_extruder_nr",
|
"global_inherits_stack": "support_interface_extruder_nr",
|
||||||
"enabled": "support_enable",
|
"enabled": "support_enable",
|
||||||
"settable_per_mesh": true
|
"settable_per_mesh": true
|
||||||
},
|
},
|
||||||
@ -2705,6 +2715,7 @@
|
|||||||
"raft": "Raft"
|
"raft": "Raft"
|
||||||
},
|
},
|
||||||
"default_value": "brim",
|
"default_value": "brim",
|
||||||
|
"resolve": "'raft' if 'raft' in extruderValues('adhesion_type') else ('brim' if 'brim' in extruderValues('adhesion_type') else 'skirt')",
|
||||||
"settable_per_mesh": false,
|
"settable_per_mesh": false,
|
||||||
"settable_per_extruder": false
|
"settable_per_extruder": false
|
||||||
},
|
},
|
||||||
@ -3283,7 +3294,7 @@
|
|||||||
"type": "extruder",
|
"type": "extruder",
|
||||||
"default_value": "0",
|
"default_value": "0",
|
||||||
"value": "support_extruder_nr",
|
"value": "support_extruder_nr",
|
||||||
"enabled": "support_enable and machine_extruder_count > 1 and extruderValue(support_interface_extruder_nr, 'support_interface_enable')",
|
"enabled": "support_enable and machine_extruder_count > 1",
|
||||||
"settable_per_mesh": false,
|
"settable_per_mesh": false,
|
||||||
"settable_per_extruder": false
|
"settable_per_extruder": false
|
||||||
}
|
}
|
||||||
@ -3296,6 +3307,7 @@
|
|||||||
"type": "bool",
|
"type": "bool",
|
||||||
"enabled": "machine_extruder_count > 1",
|
"enabled": "machine_extruder_count > 1",
|
||||||
"default_value": false,
|
"default_value": false,
|
||||||
|
"resolve": "max(extruderValues('prime_tower_enable'))",
|
||||||
"settable_per_mesh": false,
|
"settable_per_mesh": false,
|
||||||
"settable_per_extruder": false
|
"settable_per_extruder": false
|
||||||
},
|
},
|
||||||
|
@ -14,6 +14,7 @@
|
|||||||
},
|
},
|
||||||
|
|
||||||
"overrides": {
|
"overrides": {
|
||||||
|
"machine_name": { "default_value": "German RepRap Neo" },
|
||||||
"machine_width": {
|
"machine_width": {
|
||||||
"default_value": 150
|
"default_value": 150
|
||||||
},
|
},
|
||||||
|
@ -14,6 +14,7 @@
|
|||||||
},
|
},
|
||||||
|
|
||||||
"overrides": {
|
"overrides": {
|
||||||
|
"machine_name": { "default_value": "Innovo INVENTOR" },
|
||||||
"machine_width": {
|
"machine_width": {
|
||||||
"default_value": 340
|
"default_value": 340
|
||||||
},
|
},
|
||||||
|
@ -12,6 +12,7 @@
|
|||||||
},
|
},
|
||||||
|
|
||||||
"overrides": {
|
"overrides": {
|
||||||
|
"machine_name": { "default_value": "Malyan M180" },
|
||||||
"machine_width": {
|
"machine_width": {
|
||||||
"default_value": 230
|
"default_value": 230
|
||||||
},
|
},
|
||||||
|
@ -13,6 +13,7 @@
|
|||||||
},
|
},
|
||||||
|
|
||||||
"overrides": {
|
"overrides": {
|
||||||
|
"machine_name": { "default_value": "3DMaker Starter" },
|
||||||
"machine_width": {
|
"machine_width": {
|
||||||
"default_value": 210
|
"default_value": 210
|
||||||
},
|
},
|
||||||
|
@ -12,6 +12,7 @@
|
|||||||
"platform": "mankati_fullscale_xt_plus_platform.stl"
|
"platform": "mankati_fullscale_xt_plus_platform.stl"
|
||||||
},
|
},
|
||||||
"overrides": {
|
"overrides": {
|
||||||
|
"machine_name": { "default_value": "Mankati Fullscale XT Plus" },
|
||||||
"machine_width": { "default_value": 260 },
|
"machine_width": { "default_value": 260 },
|
||||||
"machine_depth": { "default_value": 260 },
|
"machine_depth": { "default_value": 260 },
|
||||||
"machine_height": { "default_value": 300 },
|
"machine_height": { "default_value": 300 },
|
||||||
|
@ -19,6 +19,7 @@
|
|||||||
],
|
],
|
||||||
|
|
||||||
"overrides": {
|
"overrides": {
|
||||||
|
"machine_name": { "default_value": "Mendel90" },
|
||||||
"machine_start_gcode": {
|
"machine_start_gcode": {
|
||||||
"default_value": "G21 ;metric values\nG90 ;absolute positioning\nG92 E0 ;zero the extruded length\nM107 ;start with the fan off\nG1 X90 Y200 F6000 ;go to the middle of the front\nG1 Z0.05 ;close to the bed\nG1 Z0.3 ;lift Z\n"
|
"default_value": "G21 ;metric values\nG90 ;absolute positioning\nG92 E0 ;zero the extruded length\nM107 ;start with the fan off\nG1 X90 Y200 F6000 ;go to the middle of the front\nG1 Z0.05 ;close to the bed\nG1 Z0.3 ;lift Z\n"
|
||||||
},
|
},
|
||||||
|
@ -13,6 +13,7 @@
|
|||||||
},
|
},
|
||||||
|
|
||||||
"overrides": {
|
"overrides": {
|
||||||
|
"machine_name": { "default_value": "Printrbot Simple" },
|
||||||
"machine_heated_bed": { "default_value": false },
|
"machine_heated_bed": { "default_value": false },
|
||||||
"machine_width": { "default_value": 150 },
|
"machine_width": { "default_value": 150 },
|
||||||
"machine_height": { "default_value": 150 },
|
"machine_height": { "default_value": 150 },
|
||||||
|
@ -14,6 +14,7 @@
|
|||||||
},
|
},
|
||||||
|
|
||||||
"overrides": {
|
"overrides": {
|
||||||
|
"machine_name": { "default_value": "Prusa i3" },
|
||||||
"machine_heated_bed": {
|
"machine_heated_bed": {
|
||||||
"default_value": true
|
"default_value": true
|
||||||
},
|
},
|
||||||
|
@ -15,6 +15,7 @@
|
|||||||
},
|
},
|
||||||
|
|
||||||
"overrides": {
|
"overrides": {
|
||||||
|
"machine_name": { "default_value": "Prusa i3 Mk2" },
|
||||||
"machine_heated_bed": { "default_value": true },
|
"machine_heated_bed": { "default_value": true },
|
||||||
"machine_width": { "default_value": 250 },
|
"machine_width": { "default_value": 250 },
|
||||||
"machine_height": { "default_value": 200 },
|
"machine_height": { "default_value": 200 },
|
||||||
|
@ -14,6 +14,7 @@
|
|||||||
},
|
},
|
||||||
|
|
||||||
"overrides": {
|
"overrides": {
|
||||||
|
"machine_name": { "default_value": "Prusa i3 xl" },
|
||||||
"machine_heated_bed": {
|
"machine_heated_bed": {
|
||||||
"default_value": true
|
"default_value": true
|
||||||
},
|
},
|
||||||
|
@ -13,6 +13,7 @@
|
|||||||
},
|
},
|
||||||
|
|
||||||
"overrides": {
|
"overrides": {
|
||||||
|
"machine_name": { "default_value": "RigidBot" },
|
||||||
"machine_width": {
|
"machine_width": {
|
||||||
"default_value": 254
|
"default_value": 254
|
||||||
},
|
},
|
||||||
|
@ -13,6 +13,7 @@
|
|||||||
},
|
},
|
||||||
|
|
||||||
"overrides": {
|
"overrides": {
|
||||||
|
"machine_name": { "default_value": "RigidBotBig" },
|
||||||
"machine_width": {
|
"machine_width": {
|
||||||
"default_value": 400
|
"default_value": 400
|
||||||
},
|
},
|
||||||
|
@ -18,6 +18,7 @@
|
|||||||
"supported_actions":["UpgradeFirmware"]
|
"supported_actions":["UpgradeFirmware"]
|
||||||
},
|
},
|
||||||
"overrides": {
|
"overrides": {
|
||||||
|
"machine_name": { "default_value": "Ultimaker 2" },
|
||||||
"machine_start_gcode" : {
|
"machine_start_gcode" : {
|
||||||
"default_value": "",
|
"default_value": "",
|
||||||
"value": "\"\" if machine_gcode_flavor == \"UltiGCode\" else \"G21 ;metric values\\nG90 ;absolute positioning\\nM82 ;set extruder to absolute mode\\nM107 ;start with the fan off\\nG1 X10 Y0 F4000;move X/Y to min endstops\\nG28 Z0 ;move Z to bottom endstops\\nG1 Z15.0 F9000 ;move the platform to 15mm\\nG92 E0 ;zero the extruded length\\nG1 F200 E10 ;extrude 10 mm of feed stock\\nG92 E0 ;zero the extruded length again\\nG1 F9000\\n;Put printing message on LCD screen\\nM117 Printing...\""
|
"value": "\"\" if machine_gcode_flavor == \"UltiGCode\" else \"G21 ;metric values\\nG90 ;absolute positioning\\nM82 ;set extruder to absolute mode\\nM107 ;start with the fan off\\nG1 X10 Y0 F4000;move X/Y to min endstops\\nG28 Z0 ;move Z to bottom endstops\\nG1 Z15.0 F9000 ;move the platform to 15mm\\nG92 E0 ;zero the extruded length\\nG1 F200 E10 ;extrude 10 mm of feed stock\\nG92 E0 ;zero the extruded length again\\nG1 F9000\\n;Put printing message on LCD screen\\nM117 Printing...\""
|
||||||
|
@ -16,6 +16,7 @@
|
|||||||
},
|
},
|
||||||
|
|
||||||
"overrides": {
|
"overrides": {
|
||||||
|
"machine_name": { "default_value": "Ultimaker 2 Extended" },
|
||||||
"machine_height": {
|
"machine_height": {
|
||||||
"default_value": 305
|
"default_value": 305
|
||||||
}
|
}
|
||||||
|
@ -16,6 +16,7 @@
|
|||||||
},
|
},
|
||||||
|
|
||||||
"overrides": {
|
"overrides": {
|
||||||
|
"machine_name": { "default_value": "Ultimaker 2 Extended+" },
|
||||||
"machine_height": {
|
"machine_height": {
|
||||||
"default_value": 305
|
"default_value": 305
|
||||||
}
|
}
|
||||||
|
@ -17,6 +17,7 @@
|
|||||||
},
|
},
|
||||||
|
|
||||||
"overrides": {
|
"overrides": {
|
||||||
|
"machine_name": { "default_value": "Ultimaker 2 Go" },
|
||||||
"machine_width": {
|
"machine_width": {
|
||||||
"default_value": 120
|
"default_value": 120
|
||||||
},
|
},
|
||||||
|
@ -20,6 +20,7 @@
|
|||||||
},
|
},
|
||||||
|
|
||||||
"overrides": {
|
"overrides": {
|
||||||
|
"machine_name": { "default_value": "Ultimaker 2+" },
|
||||||
"speed_infill": {
|
"speed_infill": {
|
||||||
"value": "speed_print"
|
"value": "speed_print"
|
||||||
},
|
},
|
||||||
|
@ -18,6 +18,7 @@
|
|||||||
},
|
},
|
||||||
|
|
||||||
"overrides": {
|
"overrides": {
|
||||||
|
"machine_name": { "default_value": "Ultimaker Original" },
|
||||||
"machine_width": {
|
"machine_width": {
|
||||||
"default_value": 205
|
"default_value": 205
|
||||||
},
|
},
|
||||||
|
@ -23,6 +23,7 @@
|
|||||||
},
|
},
|
||||||
|
|
||||||
"overrides": {
|
"overrides": {
|
||||||
|
"machine_name": { "default_value": "Ultimaker Original" },
|
||||||
"machine_width": {
|
"machine_width": {
|
||||||
"default_value": 205
|
"default_value": 205
|
||||||
},
|
},
|
||||||
|
@ -17,6 +17,7 @@
|
|||||||
},
|
},
|
||||||
|
|
||||||
"overrides": {
|
"overrides": {
|
||||||
|
"machine_name": { "default_value": "Ultimaker Original+" },
|
||||||
"machine_heated_bed": {
|
"machine_heated_bed": {
|
||||||
"default_value": true
|
"default_value": true
|
||||||
},
|
},
|
||||||
|
@ -12,6 +12,7 @@
|
|||||||
},
|
},
|
||||||
|
|
||||||
"overrides": {
|
"overrides": {
|
||||||
|
"machine_name": { "default_value": "Uniqbot" },
|
||||||
"machine_heated_bed": {
|
"machine_heated_bed": {
|
||||||
"default_value": false
|
"default_value": false
|
||||||
},
|
},
|
||||||
|
@ -20,18 +20,40 @@ SettingItem
|
|||||||
|
|
||||||
property bool checked:
|
property bool checked:
|
||||||
{
|
{
|
||||||
switch(propertyProvider.properties.value)
|
// FIXME this needs to go away once 'resolve' is combined with 'value' in our data model.
|
||||||
|
// Stacklevels
|
||||||
|
// 0: user -> unsaved change
|
||||||
|
// 1: quality changes -> saved change
|
||||||
|
// 2: quality
|
||||||
|
// 3: material -> user changed material in materials page
|
||||||
|
// 4: variant
|
||||||
|
// 5: machine
|
||||||
|
var value;
|
||||||
|
if ((propertyProvider.properties.resolve != "None") && (stackLevel != 0) && (stackLevel != 1)) {
|
||||||
|
// We have a resolve function. Indicates that the setting is not settable per extruder and that
|
||||||
|
// we have to choose between the resolved value (default) and the global value
|
||||||
|
// (if user has explicitly set this).
|
||||||
|
value = propertyProvider.properties.resolve;
|
||||||
|
} else {
|
||||||
|
value = propertyProvider.properties.value;
|
||||||
|
}
|
||||||
|
|
||||||
|
switch(value)
|
||||||
{
|
{
|
||||||
case "True":
|
case "True":
|
||||||
return true
|
return true;
|
||||||
case "False":
|
case "False":
|
||||||
return false
|
return false;
|
||||||
default:
|
default:
|
||||||
return propertyProvider.properties.value
|
return value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
onClicked: { forceActiveFocus(); propertyProvider.setPropertyValue("value", !checked) }
|
onClicked:
|
||||||
|
{
|
||||||
|
forceActiveFocus();
|
||||||
|
propertyProvider.setPropertyValue("value", !checked);
|
||||||
|
}
|
||||||
|
|
||||||
Rectangle
|
Rectangle
|
||||||
{
|
{
|
||||||
|
@ -96,8 +96,19 @@ SettingItem
|
|||||||
}
|
}
|
||||||
|
|
||||||
function updateCurrentIndex() {
|
function updateCurrentIndex() {
|
||||||
|
// FIXME this needs to go away once 'resolve' is combined with 'value' in our data model.
|
||||||
|
var value;
|
||||||
|
if ((propertyProvider.properties.resolve != "None") && (stackLevel != 0) && (stackLevel != 1)) {
|
||||||
|
// We have a resolve function. Indicates that the setting is not settable per extruder and that
|
||||||
|
// we have to choose between the resolved value (default) and the global value
|
||||||
|
// (if user has explicitly set this).
|
||||||
|
value = propertyProvider.properties.resolve;
|
||||||
|
} else {
|
||||||
|
value = propertyProvider.properties.value;
|
||||||
|
}
|
||||||
|
|
||||||
for(var i = 0; i < definition.options.length; ++i) {
|
for(var i = 0; i < definition.options.length; ++i) {
|
||||||
if(definition.options[i].key == propertyProvider.properties.value) {
|
if(definition.options[i].key == value) {
|
||||||
currentIndex = i;
|
currentIndex = i;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -234,14 +234,15 @@ Column
|
|||||||
property var valueError:
|
property var valueError:
|
||||||
{
|
{
|
||||||
var data = Cura.ContainerManager.getContainerMetaDataEntry(Cura.MachineManager.activeMaterialId, "compatible")
|
var data = Cura.ContainerManager.getContainerMetaDataEntry(Cura.MachineManager.activeMaterialId, "compatible")
|
||||||
if(data == "" || data == "True")
|
|
||||||
{
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
if(data == "False")
|
if(data == "False")
|
||||||
{
|
{
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
enabled: !extrudersList.visible || base.currentExtruderIndex > -1
|
enabled: !extrudersList.visible || base.currentExtruderIndex > -1
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user