mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-16 11:05:54 +08:00
Merge branch 'master' of github.com:Ultimaker/Cura
This commit is contained in:
commit
a6c27787b9
3
.gitignore
vendored
3
.gitignore
vendored
@ -35,7 +35,7 @@ cura.desktop
|
|||||||
.pydevproject
|
.pydevproject
|
||||||
.settings
|
.settings
|
||||||
|
|
||||||
#Externally located plug-ins.
|
#Externally located plug-ins commonly installed by our devs.
|
||||||
plugins/cura-big-flame-graph
|
plugins/cura-big-flame-graph
|
||||||
plugins/cura-god-mode-plugin
|
plugins/cura-god-mode-plugin
|
||||||
plugins/cura-siemensnx-plugin
|
plugins/cura-siemensnx-plugin
|
||||||
@ -52,6 +52,7 @@ plugins/FlatProfileExporter
|
|||||||
plugins/GodMode
|
plugins/GodMode
|
||||||
plugins/OctoPrintPlugin
|
plugins/OctoPrintPlugin
|
||||||
plugins/ProfileFlattener
|
plugins/ProfileFlattener
|
||||||
|
plugins/SettingsGuide
|
||||||
plugins/X3GWriter
|
plugins/X3GWriter
|
||||||
|
|
||||||
#Build stuff
|
#Build stuff
|
||||||
|
@ -106,10 +106,17 @@ class PauseAtHeight(Script):
|
|||||||
"standby_temperature":
|
"standby_temperature":
|
||||||
{
|
{
|
||||||
"label": "Standby Temperature",
|
"label": "Standby Temperature",
|
||||||
"description": "Change the temperature during the pause",
|
"description": "Change the temperature during the pause.",
|
||||||
"unit": "°C",
|
"unit": "°C",
|
||||||
"type": "int",
|
"type": "int",
|
||||||
"default_value": 0
|
"default_value": 0
|
||||||
|
},
|
||||||
|
"display_text":
|
||||||
|
{
|
||||||
|
"label": "Display Text",
|
||||||
|
"description": "Text that should appear on the display while paused. If left empty, there will not be any message.",
|
||||||
|
"type": "str",
|
||||||
|
"default_value": ""
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}"""
|
}"""
|
||||||
@ -144,6 +151,7 @@ class PauseAtHeight(Script):
|
|||||||
firmware_retract = Application.getInstance().getGlobalContainerStack().getProperty("machine_firmware_retract", "value")
|
firmware_retract = Application.getInstance().getGlobalContainerStack().getProperty("machine_firmware_retract", "value")
|
||||||
control_temperatures = Application.getInstance().getGlobalContainerStack().getProperty("machine_nozzle_temp_enabled", "value")
|
control_temperatures = Application.getInstance().getGlobalContainerStack().getProperty("machine_nozzle_temp_enabled", "value")
|
||||||
initial_layer_height = Application.getInstance().getGlobalContainerStack().getProperty("layer_height_0", "value")
|
initial_layer_height = Application.getInstance().getGlobalContainerStack().getProperty("layer_height_0", "value")
|
||||||
|
display_text = self.getSettingValueByKey("display_text")
|
||||||
|
|
||||||
is_griffin = False
|
is_griffin = False
|
||||||
|
|
||||||
@ -287,6 +295,9 @@ class PauseAtHeight(Script):
|
|||||||
# Set extruder standby temperature
|
# Set extruder standby temperature
|
||||||
prepend_gcode += self.putValue(M = 104, S = standby_temperature) + " ; standby temperature\n"
|
prepend_gcode += self.putValue(M = 104, S = standby_temperature) + " ; standby temperature\n"
|
||||||
|
|
||||||
|
if display_text:
|
||||||
|
prepend_gcode += "M117 " + display_text + "\n"
|
||||||
|
|
||||||
# Wait till the user continues printing
|
# Wait till the user continues printing
|
||||||
prepend_gcode += self.putValue(M = 0) + " ; Do the actual pause\n"
|
prepend_gcode += self.putValue(M = 0) + " ; Do the actual pause\n"
|
||||||
|
|
||||||
|
@ -89,7 +89,7 @@ class TrimeshReader(MeshReader):
|
|||||||
# try to figure out the format, but for GLTF, it loads it as a binary file with flags "rb", and the json.load()
|
# try to figure out the format, but for GLTF, it loads it as a binary file with flags "rb", and the json.load()
|
||||||
# doesn't like it. For some reason, this seems to happen with 3.5.7, but not 3.7.1. Below is a workaround to
|
# doesn't like it. For some reason, this seems to happen with 3.5.7, but not 3.7.1. Below is a workaround to
|
||||||
# pass a file object that has been opened with "r" instead "rb" to load a GLTF file.
|
# pass a file object that has been opened with "r" instead "rb" to load a GLTF file.
|
||||||
if file_name.endswith(".gltf"):
|
if file_name.lower().endswith(".gltf"):
|
||||||
mesh_or_scene = trimesh.load(open(file_name, "r", encoding = "utf-8"), file_type = "gltf")
|
mesh_or_scene = trimesh.load(open(file_name, "r", encoding = "utf-8"), file_type = "gltf")
|
||||||
else:
|
else:
|
||||||
mesh_or_scene = trimesh.load(file_name)
|
mesh_or_scene = trimesh.load(file_name)
|
||||||
|
@ -66,7 +66,11 @@ class ClusterPrinterStatus(BaseModel):
|
|||||||
## Creates a new output model.
|
## Creates a new output model.
|
||||||
# \param controller - The controller of the model.
|
# \param controller - The controller of the model.
|
||||||
def createOutputModel(self, controller: PrinterOutputController) -> PrinterOutputModel:
|
def createOutputModel(self, controller: PrinterOutputController) -> PrinterOutputModel:
|
||||||
model = PrinterOutputModel(controller, len(self.configuration), firmware_version = self.firmware_version)
|
# FIXME
|
||||||
|
# Note that we're using '2' here as extruder count. We have hardcoded this for now to prevent issues where the
|
||||||
|
# amount of extruders coming back from the API is actually lower (which it can be if a printer was just added
|
||||||
|
# to a cluster). This should be fixed in the future, probably also on the cluster API side.
|
||||||
|
model = PrinterOutputModel(controller, 2, firmware_version = self.firmware_version)
|
||||||
self.updateOutputModel(model)
|
self.updateOutputModel(model)
|
||||||
return model
|
return model
|
||||||
|
|
||||||
@ -80,6 +84,11 @@ class ClusterPrinterStatus(BaseModel):
|
|||||||
model.updateBuildplate(self.build_plate.type if self.build_plate else "glass")
|
model.updateBuildplate(self.build_plate.type if self.build_plate else "glass")
|
||||||
model.setCameraUrl(QUrl("http://{}:8080/?action=stream".format(self.ip_address)))
|
model.setCameraUrl(QUrl("http://{}:8080/?action=stream".format(self.ip_address)))
|
||||||
|
|
||||||
|
if not model.printerConfiguration:
|
||||||
|
# Prevent accessing printer configuration when not available.
|
||||||
|
# This sometimes happens when a printer was just added to a group and Cura is connected to that group.
|
||||||
|
return
|
||||||
|
|
||||||
# Set the possible configurations based on whether a Material Station is present or not.
|
# Set the possible configurations based on whether a Material Station is present or not.
|
||||||
if self.material_station and self.material_station.material_slots:
|
if self.material_station and self.material_station.material_slots:
|
||||||
self._updateAvailableConfigurations(model)
|
self._updateAvailableConfigurations(model)
|
||||||
|
@ -135,10 +135,13 @@ class LocalClusterOutputDeviceManager:
|
|||||||
ultimaker_machines = container_registry.findContainersMetadata(type="machine", manufacturer="Ultimaker B.V.")
|
ultimaker_machines = container_registry.findContainersMetadata(type="machine", manufacturer="Ultimaker B.V.")
|
||||||
found_machine_type_identifiers = {} # type: Dict[str, str]
|
found_machine_type_identifiers = {} # type: Dict[str, str]
|
||||||
for machine in ultimaker_machines:
|
for machine in ultimaker_machines:
|
||||||
machine_bom_number = machine.get("firmware_update_info", {}).get("id", None)
|
|
||||||
machine_type = machine.get("id", None)
|
machine_type = machine.get("id", None)
|
||||||
if machine_bom_number and machine_type:
|
machine_bom_numbers = machine.get("bom_numbers", [])
|
||||||
found_machine_type_identifiers[str(machine_bom_number)] = machine_type
|
if machine_type and machine_bom_numbers:
|
||||||
|
for bom_number in machine_bom_numbers:
|
||||||
|
# This produces a n:1 mapping of bom numbers to machine types
|
||||||
|
# allowing the S5R1 and S5R2 hardware to use a single S5 definition.
|
||||||
|
found_machine_type_identifiers[str(bom_number)] = machine_type
|
||||||
return found_machine_type_identifiers
|
return found_machine_type_identifiers
|
||||||
|
|
||||||
## Add a new device.
|
## Add a new device.
|
||||||
|
@ -33,7 +33,10 @@
|
|||||||
"https://software.ultimaker.com/releases/firmware/9066/stable/um-update.swu.version"
|
"https://software.ultimaker.com/releases/firmware/9066/stable/um-update.swu.version"
|
||||||
],
|
],
|
||||||
"update_url": "https://ultimaker.com/firmware"
|
"update_url": "https://ultimaker.com/firmware"
|
||||||
}
|
},
|
||||||
|
"bom_numbers": [
|
||||||
|
9066
|
||||||
|
]
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
|
@ -30,7 +30,10 @@
|
|||||||
"https://software.ultimaker.com/releases/firmware/9066/stable/um-update.swu.version"
|
"https://software.ultimaker.com/releases/firmware/9066/stable/um-update.swu.version"
|
||||||
],
|
],
|
||||||
"update_url": "https://ultimaker.com/firmware"
|
"update_url": "https://ultimaker.com/firmware"
|
||||||
}
|
},
|
||||||
|
"bom_numbers": [
|
||||||
|
9511
|
||||||
|
]
|
||||||
},
|
},
|
||||||
|
|
||||||
"overrides": {
|
"overrides": {
|
||||||
|
@ -34,7 +34,10 @@
|
|||||||
"id": 213482,
|
"id": 213482,
|
||||||
"check_urls": ["https://software.ultimaker.com/releases/firmware/213482/stable/um-update.swu.version"],
|
"check_urls": ["https://software.ultimaker.com/releases/firmware/213482/stable/um-update.swu.version"],
|
||||||
"update_url": "https://ultimaker.com/firmware"
|
"update_url": "https://ultimaker.com/firmware"
|
||||||
}
|
},
|
||||||
|
"bom_numbers": [
|
||||||
|
213482
|
||||||
|
]
|
||||||
},
|
},
|
||||||
|
|
||||||
"overrides": {
|
"overrides": {
|
||||||
|
@ -35,7 +35,10 @@
|
|||||||
"id": 9051,
|
"id": 9051,
|
||||||
"check_urls": ["https://software.ultimaker.com/releases/firmware/9051/stable/um-update.swu.version"],
|
"check_urls": ["https://software.ultimaker.com/releases/firmware/9051/stable/um-update.swu.version"],
|
||||||
"update_url": "https://ultimaker.com/firmware"
|
"update_url": "https://ultimaker.com/firmware"
|
||||||
}
|
},
|
||||||
|
"bom_numbers": [
|
||||||
|
9051, 214475
|
||||||
|
]
|
||||||
},
|
},
|
||||||
|
|
||||||
"overrides": {
|
"overrides": {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user