From 495079f3d9b39a08396c14a1927b6982d3b0b9bb Mon Sep 17 00:00:00 2001 From: "c.lamboo" Date: Fri, 24 Nov 2023 16:49:31 +0100 Subject: [PATCH 1/5] Clean up bot LUT We had a lot of Look up Tables scattered around in the cura repository. This can be solved by adding a `bot_id` entry to metadata of the various makerbot extruders/materials/definitions --- .../VariantDatabaseHandler.py | 21 +++--- plugins/MakerbotWriter/MakerbotWriter.py | 65 +------------------ .../definitions/ultimaker_methodx.def.json | 1 + .../definitions/ultimaker_methodxl.def.json | 1 + .../variants/ultimaker_methodx_1C.inst.cfg | 1 + .../variants/ultimaker_methodx_1XA.inst.cfg | 1 + .../variants/ultimaker_methodx_2XA.inst.cfg | 1 + .../variants/ultimaker_methodx_LABS.inst.cfg | 1 + .../variants/ultimaker_methodxl_1C.inst.cfg | 1 + .../variants/ultimaker_methodxl_1XA.inst.cfg | 1 + .../variants/ultimaker_methodxl_2XA.inst.cfg | 1 + .../variants/ultimaker_methodxl_LABS.inst.cfg | 2 +- 12 files changed, 25 insertions(+), 72 deletions(-) diff --git a/cura/Settings/DatabaseHandlers/VariantDatabaseHandler.py b/cura/Settings/DatabaseHandlers/VariantDatabaseHandler.py index 4b1deae356..376add478f 100644 --- a/cura/Settings/DatabaseHandlers/VariantDatabaseHandler.py +++ b/cura/Settings/DatabaseHandlers/VariantDatabaseHandler.py @@ -10,13 +10,16 @@ class VariantDatabaseHandler(DatabaseMetadataContainerController): """The Database handler for Variant containers""" def __init__(self): - super().__init__(SQLQueryFactory(table = "variant", - fields = { - "id": "text", - "name": "text", - "hardware_type": "text", - "definition": "text", - "version": "text", - "setting_version": "text" - })) + super().__init__(SQLQueryFactory( + table="variant", + fields={ + "id": "text", + "name": "text", + "hardware_type": "text", + "definition": "text", + "version": "text", + "setting_version": "text", + "bot_id": "text", + }, + )) self._container_type = InstanceContainer diff --git a/plugins/MakerbotWriter/MakerbotWriter.py b/plugins/MakerbotWriter/MakerbotWriter.py index b650cf2338..0298998d65 100644 --- a/plugins/MakerbotWriter/MakerbotWriter.py +++ b/plugins/MakerbotWriter/MakerbotWriter.py @@ -50,59 +50,6 @@ class MakerbotWriter(MeshWriter): {"prefix": "thumbnail", "width": 90, "height": 90}, ] _META_VERSION = "3.0.0" - _PRINT_NAME_MAP = { - "UltiMaker Method": "fire_e", - "UltiMaker Method X": "lava_f", - "UltiMaker Method XL": "magma_10", - } - _EXTRUDER_NAME_MAP = { - "1XA": "mk14_hot", - "2XA": "mk14_hot_s", - "1C": "mk14_c", - "1A": "mk14", - "2A": "mk14_s", - } - _MATERIAL_MAP = {"2780b345-577b-4a24-a2c5-12e6aad3e690": "abs", - "88c8919c-6a09-471a-b7b6-e801263d862d": "abs-wss1", - "416eead4-0d8e-4f0b-8bfc-a91a519befa5": "asa", - "85bbae0e-938d-46fb-989f-c9b3689dc4f0": "nylon-cf", - "283d439a-3490-4481-920c-c51d8cdecf9c": "nylon", - "62414577-94d1-490d-b1e4-7ef3ec40db02": "pc", - "69386c85-5b6c-421a-bec5-aeb1fb33f060": "petg", - "0ff92885-617b-4144-a03c-9989872454bc": "pla", - "a4255da2-cb2a-4042-be49-4a83957a2f9a": "pva", - "a140ef8f-4f26-4e73-abe0-cfc29d6d1024": "wss1", - "77873465-83a9-4283-bc44-4e542b8eb3eb": "sr30", - "96fca5d9-0371-4516-9e96-8e8182677f3c": "im-pla", - "9f52c514-bb53-46a6-8c0c-d507cd6ee742": "abs", - "0f9a2a91-f9d6-4b6b-bd9b-a120a29391be": "abs", - "d3e972f2-68c0-4d2f-8cfd-91028dfc3381": "abs", - "495a0ce5-9daf-4a16-b7b2-06856d82394d": "abs-cf10", - "cb76bd6e-91fd-480c-a191-12301712ec77": "abs-wss1", - "a017777e-3f37-4d89-a96c-dc71219aac77": "abs-wss1", - "4d96000d-66de-4d54-a580-91827dcfd28f": "abs-wss1", - "0ecb0e1a-6a66-49fb-b9ea-61a8924e0cf5": "asa", - "efebc2ea-2381-4937-926f-e824524524a5": "asa", - "b0199512-5714-4951-af85-be19693430f8": "asa", - "b9f55a0a-a2b6-4b8d-8d48-07802c575bd1": "pla", - "c439d884-9cdc-4296-a12c-1bacae01003f": "pla", - "16a723e3-44df-49f4-82ec-2a1173c1e7d9": "pla", - "74d0f5c2-fdfd-4c56-baf1-ff5fa92d177e": "pla", - "64dcb783-470d-4400-91b1-7001652f20da": "pla", - "3a1b479b-899c-46eb-a2ea-67050d1a4937": "pla", - "4708ac49-5dde-4cc2-8c0a-87425a92c2b3": "pla", - "4b560eda-1719-407f-b085-1c2c1fc8ffc1": "pla", - "e10a287d-0067-4a58-9083-b7054f479991": "im-pla", - "01a6b5b0-fab1-420c-a5d9-31713cbeb404": "im-pla", - "f65df4ad-a027-4a48-a51d-975cc8b87041": "im-pla", - "f48739f8-6d96-4a3d-9a2e-8505a47e2e35": "im-pla", - "5c7d7672-e885-4452-9a78-8ba90ec79937": "petg", - "91e05a6e-2f5b-4964-b973-d83b5afe6db4": "petg", - "bdc7dd03-bf38-48ee-aeca-c3e11cee799e": "petg", - "54f66c89-998d-4070-aa60-1cb0fd887518": "nylon", - "002c84b3-84ac-4b5a-b57d-fe1f555a6351": "pva", - "e4da5fcb-f62d-48a2-aaef-0b645aa6973b": "wss1", - "77f06146-6569-437d-8380-9edb0d635a32": "sr30"} # must be called from the main thread because of OpenGL @staticmethod @@ -197,7 +144,7 @@ class MakerbotWriter(MeshWriter): meta = dict() - meta["bot_type"] = MakerbotWriter._PRINT_NAME_MAP.get((name := global_stack.definition.name), name) + meta["bot_type"] = global_stack.definition.getMetaDataEntry("bot_id") bounds: Optional[AxisAlignedBox] = None for node in nodes: @@ -239,12 +186,7 @@ class MakerbotWriter(MeshWriter): meta["uuid"] = print_information.slice_uuid - materials = [] - for extruder in extruders: - guid = extruder.material.getMetaData().get("GUID") - material_name = extruder.material.getMetaData().get("material") - material = self._MATERIAL_MAP.get(guid, material_name) - materials.append(material) + materials = [extruder.material.getMetaData().get("bot_id") for extruder in extruders] meta["material"] = materials[0] meta["materials"] = materials @@ -256,8 +198,7 @@ class MakerbotWriter(MeshWriter): meta["model_counts"] = [{"count": 1, "name": node.getName()} for node in nodes] - tool_types = [MakerbotWriter._EXTRUDER_NAME_MAP.get((name := extruder.variant.getName()), name) for extruder in - extruders] + tool_types = [extruder.variant.getMetaDataEntry("bot_id") for extruder in extruders] meta["tool_type"] = tool_types[0] meta["tool_types"] = tool_types diff --git a/resources/definitions/ultimaker_methodx.def.json b/resources/definitions/ultimaker_methodx.def.json index d74a08baf3..0c2e09cbd9 100644 --- a/resources/definitions/ultimaker_methodx.def.json +++ b/resources/definitions/ultimaker_methodx.def.json @@ -8,6 +8,7 @@ "author": "UltiMaker", "manufacturer": "Ultimaker B.V.", "file_formats": "application/x-makerbot", + "bot_id": "lava_f", "platform": "ultimaker_method_platform.stl", "exclude_materials": [ "dsm_", diff --git a/resources/definitions/ultimaker_methodxl.def.json b/resources/definitions/ultimaker_methodxl.def.json index 270379d6cd..80a3287209 100644 --- a/resources/definitions/ultimaker_methodxl.def.json +++ b/resources/definitions/ultimaker_methodxl.def.json @@ -8,6 +8,7 @@ "author": "UltiMaker", "manufacturer": "Ultimaker B.V.", "file_formats": "application/x-makerbot", + "bot_id": "magma_10", "platform": "ultimaker_method_xl_platform.stl", "has_machine_materials": true, "has_machine_quality": true, diff --git a/resources/variants/ultimaker_methodx_1C.inst.cfg b/resources/variants/ultimaker_methodx_1C.inst.cfg index 74b8f9d8e1..579e1534de 100644 --- a/resources/variants/ultimaker_methodx_1C.inst.cfg +++ b/resources/variants/ultimaker_methodx_1C.inst.cfg @@ -7,6 +7,7 @@ version = 4 hardware_type = nozzle setting_version = 22 type = variant +bot_id = mk14_c [values] machine_nozzle_id = 1C diff --git a/resources/variants/ultimaker_methodx_1XA.inst.cfg b/resources/variants/ultimaker_methodx_1XA.inst.cfg index b68db556e4..2189328aea 100644 --- a/resources/variants/ultimaker_methodx_1XA.inst.cfg +++ b/resources/variants/ultimaker_methodx_1XA.inst.cfg @@ -7,6 +7,7 @@ version = 4 hardware_type = nozzle setting_version = 22 type = variant +bot_id = mk14_hot [values] machine_nozzle_id = 1XA diff --git a/resources/variants/ultimaker_methodx_2XA.inst.cfg b/resources/variants/ultimaker_methodx_2XA.inst.cfg index 9b951fe99e..b5b2882179 100644 --- a/resources/variants/ultimaker_methodx_2XA.inst.cfg +++ b/resources/variants/ultimaker_methodx_2XA.inst.cfg @@ -7,6 +7,7 @@ version = 4 hardware_type = nozzle setting_version = 22 type = variant +bot_id = mk14_hot_s [values] machine_nozzle_id = 2XA diff --git a/resources/variants/ultimaker_methodx_LABS.inst.cfg b/resources/variants/ultimaker_methodx_LABS.inst.cfg index a5232706b9..316d114a59 100644 --- a/resources/variants/ultimaker_methodx_LABS.inst.cfg +++ b/resources/variants/ultimaker_methodx_LABS.inst.cfg @@ -7,6 +7,7 @@ version = 4 hardware_type = nozzle setting_version = 22 type = variant +bot_id = mk14_e [values] machine_nozzle_id = LABS diff --git a/resources/variants/ultimaker_methodxl_1C.inst.cfg b/resources/variants/ultimaker_methodxl_1C.inst.cfg index 2e1c690552..110aa9c964 100644 --- a/resources/variants/ultimaker_methodxl_1C.inst.cfg +++ b/resources/variants/ultimaker_methodxl_1C.inst.cfg @@ -7,6 +7,7 @@ version = 4 hardware_type = nozzle setting_version = 22 type = variant +bot_id = mk14_c [values] machine_nozzle_id = 1C diff --git a/resources/variants/ultimaker_methodxl_1XA.inst.cfg b/resources/variants/ultimaker_methodxl_1XA.inst.cfg index 0db3501e1a..024c224fe3 100644 --- a/resources/variants/ultimaker_methodxl_1XA.inst.cfg +++ b/resources/variants/ultimaker_methodxl_1XA.inst.cfg @@ -7,6 +7,7 @@ version = 4 hardware_type = nozzle setting_version = 22 type = variant +bot_id = mk14_hot [values] machine_nozzle_id = 1XA diff --git a/resources/variants/ultimaker_methodxl_2XA.inst.cfg b/resources/variants/ultimaker_methodxl_2XA.inst.cfg index 52a2e0382c..dba05e0af9 100644 --- a/resources/variants/ultimaker_methodxl_2XA.inst.cfg +++ b/resources/variants/ultimaker_methodxl_2XA.inst.cfg @@ -7,6 +7,7 @@ version = 4 hardware_type = nozzle setting_version = 22 type = variant +bot_id = mk14_hot_s [values] machine_nozzle_id = 2XA diff --git a/resources/variants/ultimaker_methodxl_LABS.inst.cfg b/resources/variants/ultimaker_methodxl_LABS.inst.cfg index 3c6e538c19..0b2a06b3ec 100644 --- a/resources/variants/ultimaker_methodxl_LABS.inst.cfg +++ b/resources/variants/ultimaker_methodxl_LABS.inst.cfg @@ -7,8 +7,8 @@ version = 4 hardware_type = nozzle setting_version = 22 type = variant +bot_id = mk14_e [values] machine_nozzle_id = LABS machine_nozzle_size = 0.4 - From ae047d2f8cbce10453f0449ae9dbc477d04fdf6c Mon Sep 17 00:00:00 2001 From: casperlamboo Date: Fri, 24 Nov 2023 15:50:31 +0000 Subject: [PATCH 2/5] Applied printer-linter format --- resources/definitions/ultimaker_methodx.def.json | 2 +- resources/definitions/ultimaker_methodxl.def.json | 2 +- resources/variants/ultimaker_methodx_1C.inst.cfg | 2 +- resources/variants/ultimaker_methodx_1XA.inst.cfg | 2 +- resources/variants/ultimaker_methodx_2XA.inst.cfg | 2 +- resources/variants/ultimaker_methodx_LABS.inst.cfg | 2 +- resources/variants/ultimaker_methodxl_1C.inst.cfg | 2 +- resources/variants/ultimaker_methodxl_1XA.inst.cfg | 2 +- resources/variants/ultimaker_methodxl_2XA.inst.cfg | 2 +- resources/variants/ultimaker_methodxl_LABS.inst.cfg | 3 ++- 10 files changed, 11 insertions(+), 10 deletions(-) diff --git a/resources/definitions/ultimaker_methodx.def.json b/resources/definitions/ultimaker_methodx.def.json index 0c2e09cbd9..ed1256e1e8 100644 --- a/resources/definitions/ultimaker_methodx.def.json +++ b/resources/definitions/ultimaker_methodx.def.json @@ -8,8 +8,8 @@ "author": "UltiMaker", "manufacturer": "Ultimaker B.V.", "file_formats": "application/x-makerbot", - "bot_id": "lava_f", "platform": "ultimaker_method_platform.stl", + "bot_id": "lava_f", "exclude_materials": [ "dsm_", "Essentium_", diff --git a/resources/definitions/ultimaker_methodxl.def.json b/resources/definitions/ultimaker_methodxl.def.json index 80a3287209..96a4728cbb 100644 --- a/resources/definitions/ultimaker_methodxl.def.json +++ b/resources/definitions/ultimaker_methodxl.def.json @@ -8,8 +8,8 @@ "author": "UltiMaker", "manufacturer": "Ultimaker B.V.", "file_formats": "application/x-makerbot", - "bot_id": "magma_10", "platform": "ultimaker_method_xl_platform.stl", + "bot_id": "magma_10", "has_machine_materials": true, "has_machine_quality": true, "has_materials": true, diff --git a/resources/variants/ultimaker_methodx_1C.inst.cfg b/resources/variants/ultimaker_methodx_1C.inst.cfg index 579e1534de..42a45fe3f9 100644 --- a/resources/variants/ultimaker_methodx_1C.inst.cfg +++ b/resources/variants/ultimaker_methodx_1C.inst.cfg @@ -4,10 +4,10 @@ name = 1C version = 4 [metadata] +bot_id = mk14_c hardware_type = nozzle setting_version = 22 type = variant -bot_id = mk14_c [values] machine_nozzle_id = 1C diff --git a/resources/variants/ultimaker_methodx_1XA.inst.cfg b/resources/variants/ultimaker_methodx_1XA.inst.cfg index 2189328aea..05871055ac 100644 --- a/resources/variants/ultimaker_methodx_1XA.inst.cfg +++ b/resources/variants/ultimaker_methodx_1XA.inst.cfg @@ -4,10 +4,10 @@ name = 1XA version = 4 [metadata] +bot_id = mk14_hot hardware_type = nozzle setting_version = 22 type = variant -bot_id = mk14_hot [values] machine_nozzle_id = 1XA diff --git a/resources/variants/ultimaker_methodx_2XA.inst.cfg b/resources/variants/ultimaker_methodx_2XA.inst.cfg index b5b2882179..fc9ccec85c 100644 --- a/resources/variants/ultimaker_methodx_2XA.inst.cfg +++ b/resources/variants/ultimaker_methodx_2XA.inst.cfg @@ -4,10 +4,10 @@ name = 2XA version = 4 [metadata] +bot_id = mk14_hot_s hardware_type = nozzle setting_version = 22 type = variant -bot_id = mk14_hot_s [values] machine_nozzle_id = 2XA diff --git a/resources/variants/ultimaker_methodx_LABS.inst.cfg b/resources/variants/ultimaker_methodx_LABS.inst.cfg index 316d114a59..37e1ad8802 100644 --- a/resources/variants/ultimaker_methodx_LABS.inst.cfg +++ b/resources/variants/ultimaker_methodx_LABS.inst.cfg @@ -4,10 +4,10 @@ name = LABS version = 4 [metadata] +bot_id = mk14_e hardware_type = nozzle setting_version = 22 type = variant -bot_id = mk14_e [values] machine_nozzle_id = LABS diff --git a/resources/variants/ultimaker_methodxl_1C.inst.cfg b/resources/variants/ultimaker_methodxl_1C.inst.cfg index 110aa9c964..ba0f8d1d19 100644 --- a/resources/variants/ultimaker_methodxl_1C.inst.cfg +++ b/resources/variants/ultimaker_methodxl_1C.inst.cfg @@ -4,10 +4,10 @@ name = 1C version = 4 [metadata] +bot_id = mk14_c hardware_type = nozzle setting_version = 22 type = variant -bot_id = mk14_c [values] machine_nozzle_id = 1C diff --git a/resources/variants/ultimaker_methodxl_1XA.inst.cfg b/resources/variants/ultimaker_methodxl_1XA.inst.cfg index 024c224fe3..1f1d60cde3 100644 --- a/resources/variants/ultimaker_methodxl_1XA.inst.cfg +++ b/resources/variants/ultimaker_methodxl_1XA.inst.cfg @@ -4,10 +4,10 @@ name = 1XA version = 4 [metadata] +bot_id = mk14_hot hardware_type = nozzle setting_version = 22 type = variant -bot_id = mk14_hot [values] machine_nozzle_id = 1XA diff --git a/resources/variants/ultimaker_methodxl_2XA.inst.cfg b/resources/variants/ultimaker_methodxl_2XA.inst.cfg index dba05e0af9..c462e2ed6f 100644 --- a/resources/variants/ultimaker_methodxl_2XA.inst.cfg +++ b/resources/variants/ultimaker_methodxl_2XA.inst.cfg @@ -4,10 +4,10 @@ name = 2XA version = 4 [metadata] +bot_id = mk14_hot_s hardware_type = nozzle setting_version = 22 type = variant -bot_id = mk14_hot_s [values] machine_nozzle_id = 2XA diff --git a/resources/variants/ultimaker_methodxl_LABS.inst.cfg b/resources/variants/ultimaker_methodxl_LABS.inst.cfg index 0b2a06b3ec..160361cd75 100644 --- a/resources/variants/ultimaker_methodxl_LABS.inst.cfg +++ b/resources/variants/ultimaker_methodxl_LABS.inst.cfg @@ -4,11 +4,12 @@ name = LABS version = 4 [metadata] +bot_id = mk14_e hardware_type = nozzle setting_version = 22 type = variant -bot_id = mk14_e [values] machine_nozzle_id = LABS machine_nozzle_size = 0.4 + From a9dcfaa032be2607f9ebb1fb5a4667c6d673d277 Mon Sep 17 00:00:00 2001 From: "c.lamboo" Date: Mon, 27 Nov 2023 15:32:55 +0100 Subject: [PATCH 3/5] specify bot id type --- cura/Settings/DatabaseHandlers/VariantDatabaseHandler.py | 2 +- plugins/MakerbotWriter/MakerbotWriter.py | 6 +++--- resources/definitions/ultimaker_methodx.def.json | 2 +- resources/definitions/ultimaker_methodxl.def.json | 2 +- resources/variants/ultimaker_methodx_1C.inst.cfg | 2 +- resources/variants/ultimaker_methodx_1XA.inst.cfg | 2 +- resources/variants/ultimaker_methodx_2XA.inst.cfg | 2 +- resources/variants/ultimaker_methodx_LABS.inst.cfg | 2 +- resources/variants/ultimaker_methodxl_1C.inst.cfg | 2 +- resources/variants/ultimaker_methodxl_1XA.inst.cfg | 2 +- resources/variants/ultimaker_methodxl_2XA.inst.cfg | 2 +- resources/variants/ultimaker_methodxl_LABS.inst.cfg | 2 +- 12 files changed, 14 insertions(+), 14 deletions(-) diff --git a/cura/Settings/DatabaseHandlers/VariantDatabaseHandler.py b/cura/Settings/DatabaseHandlers/VariantDatabaseHandler.py index 376add478f..b1932bcb9c 100644 --- a/cura/Settings/DatabaseHandlers/VariantDatabaseHandler.py +++ b/cura/Settings/DatabaseHandlers/VariantDatabaseHandler.py @@ -19,7 +19,7 @@ class VariantDatabaseHandler(DatabaseMetadataContainerController): "definition": "text", "version": "text", "setting_version": "text", - "bot_id": "text", + "bot_extruder_id": "text", }, )) self._container_type = InstanceContainer diff --git a/plugins/MakerbotWriter/MakerbotWriter.py b/plugins/MakerbotWriter/MakerbotWriter.py index 0298998d65..912457e0bd 100644 --- a/plugins/MakerbotWriter/MakerbotWriter.py +++ b/plugins/MakerbotWriter/MakerbotWriter.py @@ -144,7 +144,7 @@ class MakerbotWriter(MeshWriter): meta = dict() - meta["bot_type"] = global_stack.definition.getMetaDataEntry("bot_id") + meta["bot_type"] = global_stack.definition.getMetaDataEntry("bot_machine_id") bounds: Optional[AxisAlignedBox] = None for node in nodes: @@ -186,7 +186,7 @@ class MakerbotWriter(MeshWriter): meta["uuid"] = print_information.slice_uuid - materials = [extruder.material.getMetaData().get("bot_id") for extruder in extruders] + materials = [extruder.material.getMetaData().get("bot_material_id") for extruder in extruders] meta["material"] = materials[0] meta["materials"] = materials @@ -198,7 +198,7 @@ class MakerbotWriter(MeshWriter): meta["model_counts"] = [{"count": 1, "name": node.getName()} for node in nodes] - tool_types = [extruder.variant.getMetaDataEntry("bot_id") for extruder in extruders] + tool_types = [extruder.variant.getMetaDataEntry("bot_extruder_id") for extruder in extruders] meta["tool_type"] = tool_types[0] meta["tool_types"] = tool_types diff --git a/resources/definitions/ultimaker_methodx.def.json b/resources/definitions/ultimaker_methodx.def.json index ed1256e1e8..bf0cef923f 100644 --- a/resources/definitions/ultimaker_methodx.def.json +++ b/resources/definitions/ultimaker_methodx.def.json @@ -9,7 +9,7 @@ "manufacturer": "Ultimaker B.V.", "file_formats": "application/x-makerbot", "platform": "ultimaker_method_platform.stl", - "bot_id": "lava_f", + "bot_machine_id": "lava_f", "exclude_materials": [ "dsm_", "Essentium_", diff --git a/resources/definitions/ultimaker_methodxl.def.json b/resources/definitions/ultimaker_methodxl.def.json index 96a4728cbb..3cf50e5b8c 100644 --- a/resources/definitions/ultimaker_methodxl.def.json +++ b/resources/definitions/ultimaker_methodxl.def.json @@ -9,7 +9,7 @@ "manufacturer": "Ultimaker B.V.", "file_formats": "application/x-makerbot", "platform": "ultimaker_method_xl_platform.stl", - "bot_id": "magma_10", + "bot_machine_id": "magma_10", "has_machine_materials": true, "has_machine_quality": true, "has_materials": true, diff --git a/resources/variants/ultimaker_methodx_1C.inst.cfg b/resources/variants/ultimaker_methodx_1C.inst.cfg index 42a45fe3f9..4a5f41c057 100644 --- a/resources/variants/ultimaker_methodx_1C.inst.cfg +++ b/resources/variants/ultimaker_methodx_1C.inst.cfg @@ -4,7 +4,7 @@ name = 1C version = 4 [metadata] -bot_id = mk14_c +bot_extruder_id = mk14_c hardware_type = nozzle setting_version = 22 type = variant diff --git a/resources/variants/ultimaker_methodx_1XA.inst.cfg b/resources/variants/ultimaker_methodx_1XA.inst.cfg index 05871055ac..dc0149928f 100644 --- a/resources/variants/ultimaker_methodx_1XA.inst.cfg +++ b/resources/variants/ultimaker_methodx_1XA.inst.cfg @@ -4,7 +4,7 @@ name = 1XA version = 4 [metadata] -bot_id = mk14_hot +bot_extruder_id = mk14_hot hardware_type = nozzle setting_version = 22 type = variant diff --git a/resources/variants/ultimaker_methodx_2XA.inst.cfg b/resources/variants/ultimaker_methodx_2XA.inst.cfg index fc9ccec85c..ef1eb62a48 100644 --- a/resources/variants/ultimaker_methodx_2XA.inst.cfg +++ b/resources/variants/ultimaker_methodx_2XA.inst.cfg @@ -4,7 +4,7 @@ name = 2XA version = 4 [metadata] -bot_id = mk14_hot_s +bot_extruder_id = mk14_hot_s hardware_type = nozzle setting_version = 22 type = variant diff --git a/resources/variants/ultimaker_methodx_LABS.inst.cfg b/resources/variants/ultimaker_methodx_LABS.inst.cfg index 37e1ad8802..bf6d495e90 100644 --- a/resources/variants/ultimaker_methodx_LABS.inst.cfg +++ b/resources/variants/ultimaker_methodx_LABS.inst.cfg @@ -4,7 +4,7 @@ name = LABS version = 4 [metadata] -bot_id = mk14_e +bot_extruder_id = mk14_e hardware_type = nozzle setting_version = 22 type = variant diff --git a/resources/variants/ultimaker_methodxl_1C.inst.cfg b/resources/variants/ultimaker_methodxl_1C.inst.cfg index ba0f8d1d19..1bed86aa6e 100644 --- a/resources/variants/ultimaker_methodxl_1C.inst.cfg +++ b/resources/variants/ultimaker_methodxl_1C.inst.cfg @@ -4,7 +4,7 @@ name = 1C version = 4 [metadata] -bot_id = mk14_c +bot_extruder_id = mk14_c hardware_type = nozzle setting_version = 22 type = variant diff --git a/resources/variants/ultimaker_methodxl_1XA.inst.cfg b/resources/variants/ultimaker_methodxl_1XA.inst.cfg index 1f1d60cde3..ce303347f8 100644 --- a/resources/variants/ultimaker_methodxl_1XA.inst.cfg +++ b/resources/variants/ultimaker_methodxl_1XA.inst.cfg @@ -4,7 +4,7 @@ name = 1XA version = 4 [metadata] -bot_id = mk14_hot +bot_extruder_id = mk14_hot hardware_type = nozzle setting_version = 22 type = variant diff --git a/resources/variants/ultimaker_methodxl_2XA.inst.cfg b/resources/variants/ultimaker_methodxl_2XA.inst.cfg index c462e2ed6f..8ab9108e71 100644 --- a/resources/variants/ultimaker_methodxl_2XA.inst.cfg +++ b/resources/variants/ultimaker_methodxl_2XA.inst.cfg @@ -4,7 +4,7 @@ name = 2XA version = 4 [metadata] -bot_id = mk14_hot_s +bot_extruder_id = mk14_hot_s hardware_type = nozzle setting_version = 22 type = variant diff --git a/resources/variants/ultimaker_methodxl_LABS.inst.cfg b/resources/variants/ultimaker_methodxl_LABS.inst.cfg index 160361cd75..4ec3edcc33 100644 --- a/resources/variants/ultimaker_methodxl_LABS.inst.cfg +++ b/resources/variants/ultimaker_methodxl_LABS.inst.cfg @@ -4,7 +4,7 @@ name = LABS version = 4 [metadata] -bot_id = mk14_e +bot_extruder_id = mk14_e hardware_type = nozzle setting_version = 22 type = variant From cf27163934e3d070961235a6447f35bc92625c11 Mon Sep 17 00:00:00 2001 From: "c.lamboo" Date: Wed, 29 Nov 2023 12:25:51 +0100 Subject: [PATCH 4/5] Update `bot` to `reference` --- cura/Settings/DatabaseHandlers/VariantDatabaseHandler.py | 2 +- plugins/MakerbotWriter/MakerbotWriter.py | 6 +++--- resources/definitions/ultimaker_methodx.def.json | 2 +- resources/definitions/ultimaker_methodxl.def.json | 2 +- resources/variants/ultimaker_methodx_1C.inst.cfg | 2 +- resources/variants/ultimaker_methodx_1XA.inst.cfg | 2 +- resources/variants/ultimaker_methodx_2XA.inst.cfg | 2 +- resources/variants/ultimaker_methodx_LABS.inst.cfg | 2 +- resources/variants/ultimaker_methodxl_1C.inst.cfg | 2 +- resources/variants/ultimaker_methodxl_1XA.inst.cfg | 2 +- resources/variants/ultimaker_methodxl_2XA.inst.cfg | 2 +- resources/variants/ultimaker_methodxl_LABS.inst.cfg | 2 +- 12 files changed, 14 insertions(+), 14 deletions(-) diff --git a/cura/Settings/DatabaseHandlers/VariantDatabaseHandler.py b/cura/Settings/DatabaseHandlers/VariantDatabaseHandler.py index b1932bcb9c..b0293c5904 100644 --- a/cura/Settings/DatabaseHandlers/VariantDatabaseHandler.py +++ b/cura/Settings/DatabaseHandlers/VariantDatabaseHandler.py @@ -19,7 +19,7 @@ class VariantDatabaseHandler(DatabaseMetadataContainerController): "definition": "text", "version": "text", "setting_version": "text", - "bot_extruder_id": "text", + "reference_extruder_id": "text", }, )) self._container_type = InstanceContainer diff --git a/plugins/MakerbotWriter/MakerbotWriter.py b/plugins/MakerbotWriter/MakerbotWriter.py index 912457e0bd..1087ef0b16 100644 --- a/plugins/MakerbotWriter/MakerbotWriter.py +++ b/plugins/MakerbotWriter/MakerbotWriter.py @@ -144,7 +144,7 @@ class MakerbotWriter(MeshWriter): meta = dict() - meta["bot_type"] = global_stack.definition.getMetaDataEntry("bot_machine_id") + meta["bot_type"] = global_stack.definition.getMetaDataEntry("reference_machine_id") bounds: Optional[AxisAlignedBox] = None for node in nodes: @@ -186,7 +186,7 @@ class MakerbotWriter(MeshWriter): meta["uuid"] = print_information.slice_uuid - materials = [extruder.material.getMetaData().get("bot_material_id") for extruder in extruders] + materials = [extruder.material.getMetaData().get("reference_material_id") for extruder in extruders] meta["material"] = materials[0] meta["materials"] = materials @@ -198,7 +198,7 @@ class MakerbotWriter(MeshWriter): meta["model_counts"] = [{"count": 1, "name": node.getName()} for node in nodes] - tool_types = [extruder.variant.getMetaDataEntry("bot_extruder_id") for extruder in extruders] + tool_types = [extruder.variant.getMetaDataEntry("reference_extruder_id") for extruder in extruders] meta["tool_type"] = tool_types[0] meta["tool_types"] = tool_types diff --git a/resources/definitions/ultimaker_methodx.def.json b/resources/definitions/ultimaker_methodx.def.json index bf0cef923f..6292d3c5d2 100644 --- a/resources/definitions/ultimaker_methodx.def.json +++ b/resources/definitions/ultimaker_methodx.def.json @@ -9,7 +9,7 @@ "manufacturer": "Ultimaker B.V.", "file_formats": "application/x-makerbot", "platform": "ultimaker_method_platform.stl", - "bot_machine_id": "lava_f", + "reference_machine_id": "lava_f", "exclude_materials": [ "dsm_", "Essentium_", diff --git a/resources/definitions/ultimaker_methodxl.def.json b/resources/definitions/ultimaker_methodxl.def.json index 3cf50e5b8c..7409c18590 100644 --- a/resources/definitions/ultimaker_methodxl.def.json +++ b/resources/definitions/ultimaker_methodxl.def.json @@ -9,7 +9,7 @@ "manufacturer": "Ultimaker B.V.", "file_formats": "application/x-makerbot", "platform": "ultimaker_method_xl_platform.stl", - "bot_machine_id": "magma_10", + "reference_machine_id": "magma_10", "has_machine_materials": true, "has_machine_quality": true, "has_materials": true, diff --git a/resources/variants/ultimaker_methodx_1C.inst.cfg b/resources/variants/ultimaker_methodx_1C.inst.cfg index 4a5f41c057..cf32997d67 100644 --- a/resources/variants/ultimaker_methodx_1C.inst.cfg +++ b/resources/variants/ultimaker_methodx_1C.inst.cfg @@ -4,7 +4,7 @@ name = 1C version = 4 [metadata] -bot_extruder_id = mk14_c +reference_extruder_id = mk14_c hardware_type = nozzle setting_version = 22 type = variant diff --git a/resources/variants/ultimaker_methodx_1XA.inst.cfg b/resources/variants/ultimaker_methodx_1XA.inst.cfg index dc0149928f..5ccf8d3635 100644 --- a/resources/variants/ultimaker_methodx_1XA.inst.cfg +++ b/resources/variants/ultimaker_methodx_1XA.inst.cfg @@ -4,7 +4,7 @@ name = 1XA version = 4 [metadata] -bot_extruder_id = mk14_hot +reference_extruder_id = mk14_hot hardware_type = nozzle setting_version = 22 type = variant diff --git a/resources/variants/ultimaker_methodx_2XA.inst.cfg b/resources/variants/ultimaker_methodx_2XA.inst.cfg index ef1eb62a48..073e101ef7 100644 --- a/resources/variants/ultimaker_methodx_2XA.inst.cfg +++ b/resources/variants/ultimaker_methodx_2XA.inst.cfg @@ -4,7 +4,7 @@ name = 2XA version = 4 [metadata] -bot_extruder_id = mk14_hot_s +reference_extruder_id = mk14_hot_s hardware_type = nozzle setting_version = 22 type = variant diff --git a/resources/variants/ultimaker_methodx_LABS.inst.cfg b/resources/variants/ultimaker_methodx_LABS.inst.cfg index bf6d495e90..96a4987923 100644 --- a/resources/variants/ultimaker_methodx_LABS.inst.cfg +++ b/resources/variants/ultimaker_methodx_LABS.inst.cfg @@ -4,7 +4,7 @@ name = LABS version = 4 [metadata] -bot_extruder_id = mk14_e +reference_extruder_id = mk14_e hardware_type = nozzle setting_version = 22 type = variant diff --git a/resources/variants/ultimaker_methodxl_1C.inst.cfg b/resources/variants/ultimaker_methodxl_1C.inst.cfg index 1bed86aa6e..ac715e5df2 100644 --- a/resources/variants/ultimaker_methodxl_1C.inst.cfg +++ b/resources/variants/ultimaker_methodxl_1C.inst.cfg @@ -4,7 +4,7 @@ name = 1C version = 4 [metadata] -bot_extruder_id = mk14_c +reference_extruder_id = mk14_c hardware_type = nozzle setting_version = 22 type = variant diff --git a/resources/variants/ultimaker_methodxl_1XA.inst.cfg b/resources/variants/ultimaker_methodxl_1XA.inst.cfg index ce303347f8..a0d3bf9669 100644 --- a/resources/variants/ultimaker_methodxl_1XA.inst.cfg +++ b/resources/variants/ultimaker_methodxl_1XA.inst.cfg @@ -4,7 +4,7 @@ name = 1XA version = 4 [metadata] -bot_extruder_id = mk14_hot +reference_extruder_id = mk14_hot hardware_type = nozzle setting_version = 22 type = variant diff --git a/resources/variants/ultimaker_methodxl_2XA.inst.cfg b/resources/variants/ultimaker_methodxl_2XA.inst.cfg index 8ab9108e71..8e45222a7b 100644 --- a/resources/variants/ultimaker_methodxl_2XA.inst.cfg +++ b/resources/variants/ultimaker_methodxl_2XA.inst.cfg @@ -4,7 +4,7 @@ name = 2XA version = 4 [metadata] -bot_extruder_id = mk14_hot_s +reference_extruder_id = mk14_hot_s hardware_type = nozzle setting_version = 22 type = variant diff --git a/resources/variants/ultimaker_methodxl_LABS.inst.cfg b/resources/variants/ultimaker_methodxl_LABS.inst.cfg index 4ec3edcc33..551567cf8c 100644 --- a/resources/variants/ultimaker_methodxl_LABS.inst.cfg +++ b/resources/variants/ultimaker_methodxl_LABS.inst.cfg @@ -4,7 +4,7 @@ name = LABS version = 4 [metadata] -bot_extruder_id = mk14_e +reference_extruder_id = mk14_e hardware_type = nozzle setting_version = 22 type = variant From 7e0d633106836d9ad94930603845dcd6b031db8f Mon Sep 17 00:00:00 2001 From: casperlamboo Date: Wed, 29 Nov 2023 11:26:50 +0000 Subject: [PATCH 5/5] Applied printer-linter format --- resources/definitions/ultimaker_methodx.def.json | 2 +- resources/definitions/ultimaker_methodxl.def.json | 2 +- resources/variants/ultimaker_methodx_1C.inst.cfg | 2 +- resources/variants/ultimaker_methodx_1XA.inst.cfg | 2 +- resources/variants/ultimaker_methodx_2XA.inst.cfg | 2 +- resources/variants/ultimaker_methodx_LABS.inst.cfg | 2 +- resources/variants/ultimaker_methodxl_1C.inst.cfg | 2 +- resources/variants/ultimaker_methodxl_1XA.inst.cfg | 2 +- resources/variants/ultimaker_methodxl_2XA.inst.cfg | 2 +- resources/variants/ultimaker_methodxl_LABS.inst.cfg | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-) diff --git a/resources/definitions/ultimaker_methodx.def.json b/resources/definitions/ultimaker_methodx.def.json index 6292d3c5d2..a6708a0421 100644 --- a/resources/definitions/ultimaker_methodx.def.json +++ b/resources/definitions/ultimaker_methodx.def.json @@ -9,7 +9,6 @@ "manufacturer": "Ultimaker B.V.", "file_formats": "application/x-makerbot", "platform": "ultimaker_method_platform.stl", - "reference_machine_id": "lava_f", "exclude_materials": [ "dsm_", "Essentium_", @@ -76,6 +75,7 @@ "preferred_material": "ultimaker_absr_175", "preferred_quality_type": "draft", "preferred_variant_name": "1XA", + "reference_machine_id": "lava_f", "supports_network_connection": true, "supports_usb_connection": false, "variant_definition": "ultimaker_methodx", diff --git a/resources/definitions/ultimaker_methodxl.def.json b/resources/definitions/ultimaker_methodxl.def.json index 7409c18590..6c12218b51 100644 --- a/resources/definitions/ultimaker_methodxl.def.json +++ b/resources/definitions/ultimaker_methodxl.def.json @@ -9,7 +9,6 @@ "manufacturer": "Ultimaker B.V.", "file_formats": "application/x-makerbot", "platform": "ultimaker_method_xl_platform.stl", - "reference_machine_id": "magma_10", "has_machine_materials": true, "has_machine_quality": true, "has_materials": true, @@ -26,6 +25,7 @@ ], "platform_texture": "MakerbotMethod.png", "preferred_quality_type": "draft", + "reference_machine_id": "magma_10", "supports_network_connection": true, "supports_usb_connection": false, "variants_name": "Extruder", diff --git a/resources/variants/ultimaker_methodx_1C.inst.cfg b/resources/variants/ultimaker_methodx_1C.inst.cfg index cf32997d67..b2bd39e906 100644 --- a/resources/variants/ultimaker_methodx_1C.inst.cfg +++ b/resources/variants/ultimaker_methodx_1C.inst.cfg @@ -4,8 +4,8 @@ name = 1C version = 4 [metadata] -reference_extruder_id = mk14_c hardware_type = nozzle +reference_extruder_id = mk14_c setting_version = 22 type = variant diff --git a/resources/variants/ultimaker_methodx_1XA.inst.cfg b/resources/variants/ultimaker_methodx_1XA.inst.cfg index 5ccf8d3635..f63c2a4df7 100644 --- a/resources/variants/ultimaker_methodx_1XA.inst.cfg +++ b/resources/variants/ultimaker_methodx_1XA.inst.cfg @@ -4,8 +4,8 @@ name = 1XA version = 4 [metadata] -reference_extruder_id = mk14_hot hardware_type = nozzle +reference_extruder_id = mk14_hot setting_version = 22 type = variant diff --git a/resources/variants/ultimaker_methodx_2XA.inst.cfg b/resources/variants/ultimaker_methodx_2XA.inst.cfg index 073e101ef7..24461cd5ef 100644 --- a/resources/variants/ultimaker_methodx_2XA.inst.cfg +++ b/resources/variants/ultimaker_methodx_2XA.inst.cfg @@ -4,8 +4,8 @@ name = 2XA version = 4 [metadata] -reference_extruder_id = mk14_hot_s hardware_type = nozzle +reference_extruder_id = mk14_hot_s setting_version = 22 type = variant diff --git a/resources/variants/ultimaker_methodx_LABS.inst.cfg b/resources/variants/ultimaker_methodx_LABS.inst.cfg index 96a4987923..2c667e37f1 100644 --- a/resources/variants/ultimaker_methodx_LABS.inst.cfg +++ b/resources/variants/ultimaker_methodx_LABS.inst.cfg @@ -4,8 +4,8 @@ name = LABS version = 4 [metadata] -reference_extruder_id = mk14_e hardware_type = nozzle +reference_extruder_id = mk14_e setting_version = 22 type = variant diff --git a/resources/variants/ultimaker_methodxl_1C.inst.cfg b/resources/variants/ultimaker_methodxl_1C.inst.cfg index ac715e5df2..527415ca35 100644 --- a/resources/variants/ultimaker_methodxl_1C.inst.cfg +++ b/resources/variants/ultimaker_methodxl_1C.inst.cfg @@ -4,8 +4,8 @@ name = 1C version = 4 [metadata] -reference_extruder_id = mk14_c hardware_type = nozzle +reference_extruder_id = mk14_c setting_version = 22 type = variant diff --git a/resources/variants/ultimaker_methodxl_1XA.inst.cfg b/resources/variants/ultimaker_methodxl_1XA.inst.cfg index a0d3bf9669..6da0eb3bb2 100644 --- a/resources/variants/ultimaker_methodxl_1XA.inst.cfg +++ b/resources/variants/ultimaker_methodxl_1XA.inst.cfg @@ -4,8 +4,8 @@ name = 1XA version = 4 [metadata] -reference_extruder_id = mk14_hot hardware_type = nozzle +reference_extruder_id = mk14_hot setting_version = 22 type = variant diff --git a/resources/variants/ultimaker_methodxl_2XA.inst.cfg b/resources/variants/ultimaker_methodxl_2XA.inst.cfg index 8e45222a7b..a64b66b89f 100644 --- a/resources/variants/ultimaker_methodxl_2XA.inst.cfg +++ b/resources/variants/ultimaker_methodxl_2XA.inst.cfg @@ -4,8 +4,8 @@ name = 2XA version = 4 [metadata] -reference_extruder_id = mk14_hot_s hardware_type = nozzle +reference_extruder_id = mk14_hot_s setting_version = 22 type = variant diff --git a/resources/variants/ultimaker_methodxl_LABS.inst.cfg b/resources/variants/ultimaker_methodxl_LABS.inst.cfg index 551567cf8c..fa726c02ab 100644 --- a/resources/variants/ultimaker_methodxl_LABS.inst.cfg +++ b/resources/variants/ultimaker_methodxl_LABS.inst.cfg @@ -4,8 +4,8 @@ name = LABS version = 4 [metadata] -reference_extruder_id = mk14_e hardware_type = nozzle +reference_extruder_id = mk14_e setting_version = 22 type = variant