From 2aa3e1e931815c2e3562b295a46b68521f4f4860 Mon Sep 17 00:00:00 2001 From: fieldOfView Date: Thu, 6 Oct 2016 15:41:20 +0200 Subject: [PATCH 01/20] Fix documentation CURA-2248 --- cura/QualityManager.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cura/QualityManager.py b/cura/QualityManager.py index 76cb7c4d56..adf2f0423b 100644 --- a/cura/QualityManager.py +++ b/cura/QualityManager.py @@ -150,11 +150,11 @@ class QualityManager: return [quality_type_dict[quality_type] for quality_type in quality_types] - ## Fetch a more basic version of a material. + ## Fetch more basic versions of a material. # # This tries to find a generic or basic version of the given material. # \param material_container \type{InstanceContainer} the material - # \return \type{List[InstanceContainer]} the basic material or None if one could not be found. + # \return \type{List[InstanceContainer]} a list of the basic materials or an empty list if one could not be found. def _getBasicMaterials(self, material_container): base_material = material_container.getMetaDataEntry("material") if material_container.getDefinition().getMetaDataEntry("has_machine_quality"): From 62d6b1fcddb788f6f37ef4675697689369f8482b Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Thu, 6 Oct 2016 16:06:14 +0200 Subject: [PATCH 02/20] Adjust max warning for coasting volume It now depends on the machine nozzle size. Contributes to issue CURA-905. --- resources/definitions/fdmprinter.def.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/definitions/fdmprinter.def.json b/resources/definitions/fdmprinter.def.json index 678a286ddb..094735e50e 100644 --- a/resources/definitions/fdmprinter.def.json +++ b/resources/definitions/fdmprinter.def.json @@ -3715,7 +3715,7 @@ "type": "float", "default_value": 0.064, "minimum_value": "0", - "maximum_value_warning": "2.0", + "maximum_value_warning": "machine_nozzle_size * 5", "enabled": "coasting_enable", "settable_per_mesh": false, "settable_per_extruder": true From c550dd50723398cac97e4c4737da6db5bf2a2448 Mon Sep 17 00:00:00 2001 From: Arjen Hiemstra Date: Thu, 6 Oct 2016 16:41:34 +0200 Subject: [PATCH 03/20] Use the active container stack for determining activeQualityVariantId Contributes to CURA-2271 --- cura/Settings/MachineManager.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cura/Settings/MachineManager.py b/cura/Settings/MachineManager.py index 6d38d9968b..195679e2e3 100644 --- a/cura/Settings/MachineManager.py +++ b/cura/Settings/MachineManager.py @@ -829,8 +829,8 @@ class MachineManager(QObject): # \sa getQualityVariantId @pyqtProperty(str, notify = activeVariantChanged) def activeQualityVariantId(self): - if self._global_container_stack: - variant = self._global_container_stack.findContainer({"type": "variant"}) + if self._active_container_stack: + variant = self._active_container_stack.findContainer({"type": "variant"}) if variant: return self.getQualityVariantId(self._global_container_stack.getBottom(), variant) return "" From 47caacfd44916171b8960f86be08ab0a00a87aca Mon Sep 17 00:00:00 2001 From: Arjen Hiemstra Date: Thu, 6 Oct 2016 17:27:00 +0200 Subject: [PATCH 04/20] Remove obsolete and outdated material files Contributes to CURA-2567 --- resources/materials/README | 1 + .../materials/generic_abs.xml.fdm_material | 35 ------------- .../materials/generic_cpe.xml.fdm_material | 35 ------------- .../generic_cpe_plus.xml.fdm_material | 39 -------------- .../materials/generic_nylon.xml.fdm_material | 36 ------------- .../materials/generic_pc.xml.fdm_material | 37 -------------- .../materials/generic_pla.xml.fdm_material | 51 ------------------- .../materials/generic_tpu.xml.fdm_material | 39 -------------- .../ultimaker_abs_black.xml.fdm_material | 35 ------------- .../ultimaker_abs_blue.xml.fdm_material | 35 ------------- .../ultimaker_abs_green.xml.fdm_material | 35 ------------- .../ultimaker_abs_grey.xml.fdm_material | 35 ------------- .../ultimaker_abs_orange.xml.fdm_material | 35 ------------- .../ultimaker_abs_pearl-gold.xml.fdm_material | 35 ------------- .../ultimaker_abs_red.xml.fdm_material | 35 ------------- ...maker_abs_silver-metallic.xml.fdm_material | 35 ------------- .../ultimaker_abs_white.xml.fdm_material | 35 ------------- .../ultimaker_abs_yellow.xml.fdm_material | 35 ------------- .../ultimaker_cpe_black.xml.fdm_material | 35 ------------- .../ultimaker_cpe_blue.xml.fdm_material | 35 ------------- .../ultimaker_cpe_dark-grey.xml.fdm_material | 35 ------------- .../ultimaker_cpe_green.xml.fdm_material | 35 ------------- .../ultimaker_cpe_light-grey.xml.fdm_material | 35 ------------- .../ultimaker_cpe_red.xml.fdm_material | 35 ------------- ...ultimaker_cpe_transparent.xml.fdm_material | 35 ------------- .../ultimaker_cpe_white.xml.fdm_material | 35 ------------- .../ultimaker_cpe_yellow.xml.fdm_material | 35 ------------- .../ultimaker_pla_black.xml.fdm_material | 51 ------------------- .../ultimaker_pla_blue.xml.fdm_material | 51 ------------------- .../ultimaker_pla_green.xml.fdm_material | 51 ------------------- .../ultimaker_pla_magenta.xml.fdm_material | 51 ------------------- .../ultimaker_pla_orange.xml.fdm_material | 51 ------------------- ...ultimaker_pla_pearl-white.xml.fdm_material | 51 ------------------- .../ultimaker_pla_red.xml.fdm_material | 51 ------------------- ...maker_pla_silver-metallic.xml.fdm_material | 50 ------------------ ...ultimaker_pla_transparent.xml.fdm_material | 51 ------------------- .../ultimaker_pla_white.xml.fdm_material | 51 ------------------- .../ultimaker_pla_yellow.xml.fdm_material | 51 ------------------- 38 files changed, 1 insertion(+), 1497 deletions(-) create mode 100644 resources/materials/README delete mode 100644 resources/materials/generic_abs.xml.fdm_material delete mode 100644 resources/materials/generic_cpe.xml.fdm_material delete mode 100644 resources/materials/generic_cpe_plus.xml.fdm_material delete mode 100644 resources/materials/generic_nylon.xml.fdm_material delete mode 100644 resources/materials/generic_pc.xml.fdm_material delete mode 100644 resources/materials/generic_pla.xml.fdm_material delete mode 100644 resources/materials/generic_tpu.xml.fdm_material delete mode 100644 resources/materials/ultimaker_abs_black.xml.fdm_material delete mode 100644 resources/materials/ultimaker_abs_blue.xml.fdm_material delete mode 100644 resources/materials/ultimaker_abs_green.xml.fdm_material delete mode 100644 resources/materials/ultimaker_abs_grey.xml.fdm_material delete mode 100644 resources/materials/ultimaker_abs_orange.xml.fdm_material delete mode 100644 resources/materials/ultimaker_abs_pearl-gold.xml.fdm_material delete mode 100644 resources/materials/ultimaker_abs_red.xml.fdm_material delete mode 100644 resources/materials/ultimaker_abs_silver-metallic.xml.fdm_material delete mode 100644 resources/materials/ultimaker_abs_white.xml.fdm_material delete mode 100644 resources/materials/ultimaker_abs_yellow.xml.fdm_material delete mode 100644 resources/materials/ultimaker_cpe_black.xml.fdm_material delete mode 100644 resources/materials/ultimaker_cpe_blue.xml.fdm_material delete mode 100644 resources/materials/ultimaker_cpe_dark-grey.xml.fdm_material delete mode 100644 resources/materials/ultimaker_cpe_green.xml.fdm_material delete mode 100644 resources/materials/ultimaker_cpe_light-grey.xml.fdm_material delete mode 100644 resources/materials/ultimaker_cpe_red.xml.fdm_material delete mode 100644 resources/materials/ultimaker_cpe_transparent.xml.fdm_material delete mode 100644 resources/materials/ultimaker_cpe_white.xml.fdm_material delete mode 100644 resources/materials/ultimaker_cpe_yellow.xml.fdm_material delete mode 100644 resources/materials/ultimaker_pla_black.xml.fdm_material delete mode 100644 resources/materials/ultimaker_pla_blue.xml.fdm_material delete mode 100644 resources/materials/ultimaker_pla_green.xml.fdm_material delete mode 100644 resources/materials/ultimaker_pla_magenta.xml.fdm_material delete mode 100644 resources/materials/ultimaker_pla_orange.xml.fdm_material delete mode 100644 resources/materials/ultimaker_pla_pearl-white.xml.fdm_material delete mode 100644 resources/materials/ultimaker_pla_red.xml.fdm_material delete mode 100644 resources/materials/ultimaker_pla_silver-metallic.xml.fdm_material delete mode 100644 resources/materials/ultimaker_pla_transparent.xml.fdm_material delete mode 100644 resources/materials/ultimaker_pla_white.xml.fdm_material delete mode 100644 resources/materials/ultimaker_pla_yellow.xml.fdm_material diff --git a/resources/materials/README b/resources/materials/README new file mode 100644 index 0000000000..32fcbc1d79 --- /dev/null +++ b/resources/materials/README @@ -0,0 +1 @@ +Please clone the fdm_materials repository located at https://github.com/ultimaker/fdm_materials for materials. diff --git a/resources/materials/generic_abs.xml.fdm_material b/resources/materials/generic_abs.xml.fdm_material deleted file mode 100644 index ef2db0b7fd..0000000000 --- a/resources/materials/generic_abs.xml.fdm_material +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - Generic - ABS - Generic - - 60636bb4-518f-42e7-8237-fe77b194ebe0 - 1 - #8cb219 - - - 1.10 - 2.85 - - - 240 - 80 - 200 - - - - - - - - - - - - diff --git a/resources/materials/generic_cpe.xml.fdm_material b/resources/materials/generic_cpe.xml.fdm_material deleted file mode 100644 index 1fa878e466..0000000000 --- a/resources/materials/generic_cpe.xml.fdm_material +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - Generic - CPE - Generic - - 12f41353-1a33-415e-8b4f-a775a6c70cc6 - 1 - #159499 - - - 1.27 - 2.85 - - - 250 - 70 - 175 - - - - - - - - - - - - diff --git a/resources/materials/generic_cpe_plus.xml.fdm_material b/resources/materials/generic_cpe_plus.xml.fdm_material deleted file mode 100644 index f234d7cb45..0000000000 --- a/resources/materials/generic_cpe_plus.xml.fdm_material +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - Generic - CPE+ - Generic - - e2409626-b5a0-4025-b73e-b58070219259 - 1 - #3633F2 - - - 1.18 - 2.85 - - - no - 260 - 110 - 175 - - - - - yes - - - no - - - - - - - diff --git a/resources/materials/generic_nylon.xml.fdm_material b/resources/materials/generic_nylon.xml.fdm_material deleted file mode 100644 index 02b2d5414b..0000000000 --- a/resources/materials/generic_nylon.xml.fdm_material +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - Generic - Nylon - Generic - - 35ebb8df-66d2-41cd-9662-b7d96b9c2cbd - 1 - #3DF266 - - - 1.14 - 2.85 - - - 250 - 60 - 175 - - - - - yes - - - - - - - - diff --git a/resources/materials/generic_pc.xml.fdm_material b/resources/materials/generic_pc.xml.fdm_material deleted file mode 100644 index 77d7e60bf5..0000000000 --- a/resources/materials/generic_pc.xml.fdm_material +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - Generic - PC - Generic - - 98c05714-bf4e-4455-ba27-57d74fe331e4 - 1 - #F29030 - - - 1.19 - 2.85 - - - no - 260 - 110 - 175 - - - - - yes - - - - - - - - diff --git a/resources/materials/generic_pla.xml.fdm_material b/resources/materials/generic_pla.xml.fdm_material deleted file mode 100644 index a98e0e469c..0000000000 --- a/resources/materials/generic_pla.xml.fdm_material +++ /dev/null @@ -1,51 +0,0 @@ - - - - - - Generic - PLA - Generic - - 506c9f0d-e3aa-4bd4-b2d2-23e2425b1aa9 - 1 - #ffc924 - - - 1.24 - 2.85 - - - 200 - 60 - 175 - - - - - - - - - - - - - - - - 150 - - - - - - - - - 150 - - - diff --git a/resources/materials/generic_tpu.xml.fdm_material b/resources/materials/generic_tpu.xml.fdm_material deleted file mode 100644 index 5a0c793cda..0000000000 --- a/resources/materials/generic_tpu.xml.fdm_material +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - Generic - TPU 95A - Generic - - 1d52b2be-a3a2-41de-a8b1-3bcdb5618695 - 1 - #B22744 - - - 1.22 - 2.85 - - - no - 260 - 110 - 175 - - - - - yes - - - - - - no - - - - diff --git a/resources/materials/ultimaker_abs_black.xml.fdm_material b/resources/materials/ultimaker_abs_black.xml.fdm_material deleted file mode 100644 index 2993ae3133..0000000000 --- a/resources/materials/ultimaker_abs_black.xml.fdm_material +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - Ultimaker - ABS - Black - - 2f9d2279-9b0e-4765-bf9b-d1e1e13f3c49 - 0 - #2a292a - - - 1.10 - 2.85 - - - 240 - 80 - 200 - - - - - - - - - - - - diff --git a/resources/materials/ultimaker_abs_blue.xml.fdm_material b/resources/materials/ultimaker_abs_blue.xml.fdm_material deleted file mode 100644 index 4273ec8f9f..0000000000 --- a/resources/materials/ultimaker_abs_blue.xml.fdm_material +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - Ultimaker - ABS - Blue - - 7c9575a6-c8d6-40ec-b3dd-18d7956bfaae - 0 - #00387b - - - 1.10 - 2.85 - - - 240 - 80 - 200 - - - - - - - - - - - - diff --git a/resources/materials/ultimaker_abs_green.xml.fdm_material b/resources/materials/ultimaker_abs_green.xml.fdm_material deleted file mode 100644 index 87c178fb01..0000000000 --- a/resources/materials/ultimaker_abs_green.xml.fdm_material +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - Ultimaker - ABS - Green - - 3400c0d1-a4e3-47de-a444-7b704f287171 - 0 - #61993b - - - 1.10 - 2.85 - - - 240 - 80 - 200 - - - - - - - - - - - - diff --git a/resources/materials/ultimaker_abs_grey.xml.fdm_material b/resources/materials/ultimaker_abs_grey.xml.fdm_material deleted file mode 100644 index f8b67c7a41..0000000000 --- a/resources/materials/ultimaker_abs_grey.xml.fdm_material +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - Ultimaker - ABS - Grey - - 8b75b775-d3f2-4d0f-8fb2-2a3dd53cf673 - 0 - #52595d - - - 1.10 - 2.85 - - - 240 - 80 - 200 - - - - - - - - - - - - diff --git a/resources/materials/ultimaker_abs_orange.xml.fdm_material b/resources/materials/ultimaker_abs_orange.xml.fdm_material deleted file mode 100644 index af3369ca97..0000000000 --- a/resources/materials/ultimaker_abs_orange.xml.fdm_material +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - Ultimaker - ABS - Orange - - 0b4ca6ef-eac8-4b23-b3ca-5f21af00e54f - 0 - #ed6b21 - - - 1.10 - 2.85 - - - 240 - 80 - 200 - - - - - - - - - - - - diff --git a/resources/materials/ultimaker_abs_pearl-gold.xml.fdm_material b/resources/materials/ultimaker_abs_pearl-gold.xml.fdm_material deleted file mode 100644 index 29bec52466..0000000000 --- a/resources/materials/ultimaker_abs_pearl-gold.xml.fdm_material +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - Ultimaker - ABS - Pearl Gold - - 7cbdb9ca-081a-456f-a6ba-f73e4e9cb856 - 0 - #80643f - - - 1.10 - 2.85 - - - 240 - 80 - 200 - - - - - - - - - - - - diff --git a/resources/materials/ultimaker_abs_red.xml.fdm_material b/resources/materials/ultimaker_abs_red.xml.fdm_material deleted file mode 100644 index 0d0dc3f098..0000000000 --- a/resources/materials/ultimaker_abs_red.xml.fdm_material +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - Ultimaker - ABS - Red - - 5df7afa6-48bd-4c19-b314-839fe9f08f1f - 0 - #bb1e10 - - - 1.10 - 2.85 - - - 240 - 80 - 200 - - - - - - - - - - - - diff --git a/resources/materials/ultimaker_abs_silver-metallic.xml.fdm_material b/resources/materials/ultimaker_abs_silver-metallic.xml.fdm_material deleted file mode 100644 index fc7fb1c2b5..0000000000 --- a/resources/materials/ultimaker_abs_silver-metallic.xml.fdm_material +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - Ultimaker - ABS - Silver Metallic - - 763c926e-a5f7-4ba0-927d-b4e038ea2735 - 0 - #a1a1a0 - - - 1.10 - 2.85 - - - 240 - 80 - 200 - - - - - - - - - - - - diff --git a/resources/materials/ultimaker_abs_white.xml.fdm_material b/resources/materials/ultimaker_abs_white.xml.fdm_material deleted file mode 100644 index fbf4518c90..0000000000 --- a/resources/materials/ultimaker_abs_white.xml.fdm_material +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - Ultimaker - ABS - White - - 5253a75a-27dc-4043-910f-753ae11bc417 - 0 - #ecece7 - - - 1.10 - 2.85 - - - 240 - 80 - 200 - - - - - - - - - - - - diff --git a/resources/materials/ultimaker_abs_yellow.xml.fdm_material b/resources/materials/ultimaker_abs_yellow.xml.fdm_material deleted file mode 100644 index 2b1a0a2784..0000000000 --- a/resources/materials/ultimaker_abs_yellow.xml.fdm_material +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - Ultimaker - ABS - Yellow - - e873341d-d9b8-45f9-9a6f-5609e1bcff68 - 0 - #f7b500 - - - 1.10 - 2.85 - - - 240 - 80 - 200 - - - - - - - - - - - - diff --git a/resources/materials/ultimaker_cpe_black.xml.fdm_material b/resources/materials/ultimaker_cpe_black.xml.fdm_material deleted file mode 100644 index 8e06ad7176..0000000000 --- a/resources/materials/ultimaker_cpe_black.xml.fdm_material +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - Ultimaker - CPE - Black - - a8955dc3-9d7e-404d-8c03-0fd6fee7f22d - 0 - #2a292a - - - 1.27 - 2.85 - - - 250 - 70 - 175 - - - - - - - - - - - - diff --git a/resources/materials/ultimaker_cpe_blue.xml.fdm_material b/resources/materials/ultimaker_cpe_blue.xml.fdm_material deleted file mode 100644 index f4675c7876..0000000000 --- a/resources/materials/ultimaker_cpe_blue.xml.fdm_material +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - Ultimaker - CPE - Blue - - 4d816290-ce2e-40e0-8dc8-3f702243131e - 0 - #00a3e0 - - - 1.27 - 2.85 - - - 250 - 70 - 175 - - - - - - - - - - - - diff --git a/resources/materials/ultimaker_cpe_dark-grey.xml.fdm_material b/resources/materials/ultimaker_cpe_dark-grey.xml.fdm_material deleted file mode 100644 index aa22712d08..0000000000 --- a/resources/materials/ultimaker_cpe_dark-grey.xml.fdm_material +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - Ultimaker - CPE - Dark Grey - - 10961c00-3caf-48e9-a598-fa805ada1e8d - 0 - #4f5250 - - - 1.27 - 2.85 - - - 250 - 70 - 175 - - - - - - - - - - - - diff --git a/resources/materials/ultimaker_cpe_green.xml.fdm_material b/resources/materials/ultimaker_cpe_green.xml.fdm_material deleted file mode 100644 index f22425f658..0000000000 --- a/resources/materials/ultimaker_cpe_green.xml.fdm_material +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - Ultimaker - CPE - Green - - 7ff6d2c8-d626-48cd-8012-7725fa537cc9 - 0 - #78be20 - - - 1.27 - 2.85 - - - 250 - 70 - 175 - - - - - - - - - - - - diff --git a/resources/materials/ultimaker_cpe_light-grey.xml.fdm_material b/resources/materials/ultimaker_cpe_light-grey.xml.fdm_material deleted file mode 100644 index 1a996e9bf2..0000000000 --- a/resources/materials/ultimaker_cpe_light-grey.xml.fdm_material +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - Ultimaker - CPE - Light Grey - - 173a7bae-5e14-470e-817e-08609c61e12b - 0 - #c5c7c4 - - - 1.27 - 2.85 - - - 250 - 70 - 175 - - - - - - - - - - - - diff --git a/resources/materials/ultimaker_cpe_red.xml.fdm_material b/resources/materials/ultimaker_cpe_red.xml.fdm_material deleted file mode 100644 index 77a9caa196..0000000000 --- a/resources/materials/ultimaker_cpe_red.xml.fdm_material +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - Ultimaker - CPE - Red - - 00181d6c-7024-479a-8eb7-8a2e38a2619a - 0 - #c8102e - - - 1.27 - 2.85 - - - 250 - 70 - 175 - - - - - - - - - - - - diff --git a/resources/materials/ultimaker_cpe_transparent.xml.fdm_material b/resources/materials/ultimaker_cpe_transparent.xml.fdm_material deleted file mode 100644 index ff3cbce64b..0000000000 --- a/resources/materials/ultimaker_cpe_transparent.xml.fdm_material +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - Ultimaker - CPE - Transparent - - bd0d9eb3-a920-4632-84e8-dcd6086746c5 - 0 - #d0d0d0 - - - 1.27 - 2.85 - - - 250 - 70 - 175 - - - - - - - - - - - - diff --git a/resources/materials/ultimaker_cpe_white.xml.fdm_material b/resources/materials/ultimaker_cpe_white.xml.fdm_material deleted file mode 100644 index bb72152d09..0000000000 --- a/resources/materials/ultimaker_cpe_white.xml.fdm_material +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - Ultimaker - CPE - White - - 881c888e-24fb-4a64-a4ac-d5c95b096cd7 - 0 - #f1ece1 - - - 1.27 - 2.85 - - - 250 - 70 - 175 - - - - - - - - - - - - diff --git a/resources/materials/ultimaker_cpe_yellow.xml.fdm_material b/resources/materials/ultimaker_cpe_yellow.xml.fdm_material deleted file mode 100644 index 8fe699277d..0000000000 --- a/resources/materials/ultimaker_cpe_yellow.xml.fdm_material +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - Ultimaker - CPE - Yellow - - b9176a2a-7a0f-4821-9f29-76d882a88682 - 0 - #f6b600 - - - 1.27 - 2.85 - - - 250 - 70 - 175 - - - - - - - - - - - - diff --git a/resources/materials/ultimaker_pla_black.xml.fdm_material b/resources/materials/ultimaker_pla_black.xml.fdm_material deleted file mode 100644 index 257f9b3235..0000000000 --- a/resources/materials/ultimaker_pla_black.xml.fdm_material +++ /dev/null @@ -1,51 +0,0 @@ - - - - - - Ultimaker - PLA - Black - - 3ee70a86-77d8-4b87-8005-e4a1bc57d2ce - 0 - #0e0e10 - - - 1.24 - 2.85 - - - 200 - 60 - 175 - - - - - - - - - - - - - - - - 150 - - - - - - - - - 150 - - - diff --git a/resources/materials/ultimaker_pla_blue.xml.fdm_material b/resources/materials/ultimaker_pla_blue.xml.fdm_material deleted file mode 100644 index e75b9fada1..0000000000 --- a/resources/materials/ultimaker_pla_blue.xml.fdm_material +++ /dev/null @@ -1,51 +0,0 @@ - - - - - - Ultimaker - PLA - Blue - - 44a029e6-e31b-4c9e-a12f-9282e29a92ff - 0 - #00387b - - - 1.24 - 2.85 - - - 200 - 60 - 175 - - - - - - - - - - - - - - - - 150 - - - - - - - - - 150 - - - diff --git a/resources/materials/ultimaker_pla_green.xml.fdm_material b/resources/materials/ultimaker_pla_green.xml.fdm_material deleted file mode 100644 index 41b015b216..0000000000 --- a/resources/materials/ultimaker_pla_green.xml.fdm_material +++ /dev/null @@ -1,51 +0,0 @@ - - - - - - Ultimaker - PLA - Green - - 2433b8fb-dcd6-4e36-9cd5-9f4ee551c04c - 0 - #61993b - - - 1.24 - 2.85 - - - 200 - 60 - 175 - - - - - - - - - - - - - - - - 150 - - - - - - - - - 150 - - - diff --git a/resources/materials/ultimaker_pla_magenta.xml.fdm_material b/resources/materials/ultimaker_pla_magenta.xml.fdm_material deleted file mode 100644 index 4f821337dc..0000000000 --- a/resources/materials/ultimaker_pla_magenta.xml.fdm_material +++ /dev/null @@ -1,51 +0,0 @@ - - - - - - Ultimaker - PLA - Magenta - - fe3982c8-58f4-4d86-9ac0-9ff7a3ab9cbc - 0 - #bc4077 - - - 1.24 - 2.85 - - - 200 - 60 - 175 - - - - - - - - - - - - - - - - 150 - - - - - - - - - 150 - - - diff --git a/resources/materials/ultimaker_pla_orange.xml.fdm_material b/resources/materials/ultimaker_pla_orange.xml.fdm_material deleted file mode 100644 index 1cd028efad..0000000000 --- a/resources/materials/ultimaker_pla_orange.xml.fdm_material +++ /dev/null @@ -1,51 +0,0 @@ - - - - - - Ultimaker - PLA - Orange - - d9549dba-b9df-45b9-80a5-f7140a9a2f34 - 0 - #ed6b21 - - - 1.24 - 2.85 - - - 200 - 60 - 175 - - - - - - - - - - - - - - - - 150 - - - - - - - - - 150 - - - diff --git a/resources/materials/ultimaker_pla_pearl-white.xml.fdm_material b/resources/materials/ultimaker_pla_pearl-white.xml.fdm_material deleted file mode 100644 index 7e23606f65..0000000000 --- a/resources/materials/ultimaker_pla_pearl-white.xml.fdm_material +++ /dev/null @@ -1,51 +0,0 @@ - - - - - - Ultimaker - PLA - Pearl-White - - d9fc79db-82c3-41b5-8c99-33b3747b8fb3 - 0 - #e3d9c6 - - - 1.24 - 2.85 - - - 200 - 60 - 175 - - - - - - - - - - - - - - - - 150 - - - - - - - - - 150 - - - diff --git a/resources/materials/ultimaker_pla_red.xml.fdm_material b/resources/materials/ultimaker_pla_red.xml.fdm_material deleted file mode 100644 index f4e381c815..0000000000 --- a/resources/materials/ultimaker_pla_red.xml.fdm_material +++ /dev/null @@ -1,51 +0,0 @@ - - - - - - Ultimaker - PLA - Red - - 9cfe5bf1-bdc5-4beb-871a-52c70777842d - 0 - #bb1e10 - - - 1.24 - 2.85 - - - 200 - 60 - 175 - - - - - - - - - - - - - - - - 150 - - - - - - - - - 150 - - - diff --git a/resources/materials/ultimaker_pla_silver-metallic.xml.fdm_material b/resources/materials/ultimaker_pla_silver-metallic.xml.fdm_material deleted file mode 100644 index 2b7fbaac46..0000000000 --- a/resources/materials/ultimaker_pla_silver-metallic.xml.fdm_material +++ /dev/null @@ -1,50 +0,0 @@ - - - - - - Ultimaker - PLA - Silver Metallic - - 0e01be8c-e425-4fb1-b4a3-b79f255f1db9 - 0 - #a1a1a0 - - - 1.24 - 2.85 - - - 200 - 60 - 175 - - - - - - - - - - - - - - - - - - - - - - - - 150 - - - diff --git a/resources/materials/ultimaker_pla_transparent.xml.fdm_material b/resources/materials/ultimaker_pla_transparent.xml.fdm_material deleted file mode 100644 index 773828b620..0000000000 --- a/resources/materials/ultimaker_pla_transparent.xml.fdm_material +++ /dev/null @@ -1,51 +0,0 @@ - - - - - - Ultimaker - PLA - Transparent - - 532e8b3d-5fd4-4149-b936-53ada9bd6b85 - 0 - #d0d0d0 - - - 1.24 - 2.85 - - - 200 - 60 - 175 - - - - - - - - - - - - - - - - 150 - - - - - - - - - 150 - - - diff --git a/resources/materials/ultimaker_pla_white.xml.fdm_material b/resources/materials/ultimaker_pla_white.xml.fdm_material deleted file mode 100644 index acd5059cef..0000000000 --- a/resources/materials/ultimaker_pla_white.xml.fdm_material +++ /dev/null @@ -1,51 +0,0 @@ - - - - - - Ultimaker - PLA - White - - e509f649-9fe6-4b14-ac45-d441438cb4ef - 0 - #f1ece1 - - - 1.24 - 2.85 - - - 200 - 60 - 175 - - - - - - - - - - - - - - - - 150 - - - - - - - - - 150 - - - diff --git a/resources/materials/ultimaker_pla_yellow.xml.fdm_material b/resources/materials/ultimaker_pla_yellow.xml.fdm_material deleted file mode 100644 index 92d947e555..0000000000 --- a/resources/materials/ultimaker_pla_yellow.xml.fdm_material +++ /dev/null @@ -1,51 +0,0 @@ - - - - - - Ultimaker - PLA - Yellow - - 9c1959d0-f597-46ec-9131-34020c7a54fc - 0 - #f9a800 - - - 1.24 - 2.85 - - - 200 - 60 - 175 - - - - - - - - - - - - - - - - 150 - - - - - - - - - 150 - - - From 71c22e836971a0d30d8eb2bb797c9c1cf1ee4d40 Mon Sep 17 00:00:00 2001 From: fieldOfView Date: Thu, 6 Oct 2016 17:28:33 +0200 Subject: [PATCH 05/20] Ensure profiles are always exported in order (global, ex. 0, ex. 1, ...) The order is important because the importer expects this order. CURA-2478 --- cura/Settings/CuraContainerRegistry.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/cura/Settings/CuraContainerRegistry.py b/cura/Settings/CuraContainerRegistry.py index 271d395307..fd3f529351 100644 --- a/cura/Settings/CuraContainerRegistry.py +++ b/cura/Settings/CuraContainerRegistry.py @@ -84,11 +84,26 @@ class CuraContainerRegistry(ContainerRegistry): if result == QMessageBox.No: return found_containers = [] + extruder_positions = [] for instance_id in instance_ids: containers = ContainerRegistry.getInstance().findInstanceContainers(id=instance_id) if containers: found_containers.append(containers[0]) + # Determine the position of the extruder of this container + extruder_id = containers[0].getMetaDataEntry("extruder", "") + if extruder_id == "": + # Global stack + extruder_positions.append(-1) + else: + extruder_containers = ContainerRegistry.getInstance().findDefinitionContainers(id=extruder_id) + if extruder_containers: + extruder_positions.append(int(extruder_containers[0].getMetaDataEntry("position", 0))) + else: + extruder_positions.append(0) + # Ensure the profiles are always exported in order (global, extruder 0, extruder 1, ...) + found_containers = [containers for (positions, containers) in sorted(zip(extruder_positions, found_containers))] + profile_writer = self._findProfileWriter(extension, description) try: From 7d28f5cdf177c5c84edc0aa73d80e206b43cd421 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Fri, 7 Oct 2016 09:23:26 +0200 Subject: [PATCH 06/20] 3mf reader now uses correct origin --- plugins/3MFReader/ThreeMFReader.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/plugins/3MFReader/ThreeMFReader.py b/plugins/3MFReader/ThreeMFReader.py index 52c45652c6..45d48d362a 100644 --- a/plugins/3MFReader/ThreeMFReader.py +++ b/plugins/3MFReader/ThreeMFReader.py @@ -8,7 +8,7 @@ from UM.Math.Matrix import Matrix from UM.Math.Vector import Vector from UM.Scene.SceneNode import SceneNode from UM.Scene.GroupDecorator import GroupDecorator -from UM.Math.Quaternion import Quaternion +import UM.Application from UM.Job import Job import math @@ -118,6 +118,11 @@ class ThreeMFReader(MeshReader): Logger.log("w", "Bounding box test for object failed. Skipping this object") continue + # 3mf defines the front left corner as the 0, so we need to translate to their operating space. + global_container_stack = UM.Application.getInstance().getGlobalContainerStack() + if global_container_stack: + translation = Vector(x = -global_container_stack.getProperty("machine_width", "value") / 2, y = 0, z = global_container_stack.getProperty("machine_depth", "value") / 2) + node.translate(translation) result.addChild(node) Job.yieldThread() From bfe3fa733a9b1dd8dc901f4a867e8dba5a6f30d8 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Fri, 7 Oct 2016 11:05:41 +0200 Subject: [PATCH 07/20] Revert "Remove obsolete and outdated material files" This reverts commit 47caacfd44916171b8960f86be08ab0a00a87aca. That commit was giving some trouble with our build process. Eventually these files will need to be deleted, but not right before the new release. Contributes to issue CURA-2567. --- resources/materials/README | 1 - .../materials/generic_abs.xml.fdm_material | 35 +++++++++++++ .../materials/generic_cpe.xml.fdm_material | 35 +++++++++++++ .../generic_cpe_plus.xml.fdm_material | 39 ++++++++++++++ .../materials/generic_nylon.xml.fdm_material | 36 +++++++++++++ .../materials/generic_pc.xml.fdm_material | 37 ++++++++++++++ .../materials/generic_pla.xml.fdm_material | 51 +++++++++++++++++++ .../materials/generic_tpu.xml.fdm_material | 39 ++++++++++++++ .../ultimaker_abs_black.xml.fdm_material | 35 +++++++++++++ .../ultimaker_abs_blue.xml.fdm_material | 35 +++++++++++++ .../ultimaker_abs_green.xml.fdm_material | 35 +++++++++++++ .../ultimaker_abs_grey.xml.fdm_material | 35 +++++++++++++ .../ultimaker_abs_orange.xml.fdm_material | 35 +++++++++++++ .../ultimaker_abs_pearl-gold.xml.fdm_material | 35 +++++++++++++ .../ultimaker_abs_red.xml.fdm_material | 35 +++++++++++++ ...maker_abs_silver-metallic.xml.fdm_material | 35 +++++++++++++ .../ultimaker_abs_white.xml.fdm_material | 35 +++++++++++++ .../ultimaker_abs_yellow.xml.fdm_material | 35 +++++++++++++ .../ultimaker_cpe_black.xml.fdm_material | 35 +++++++++++++ .../ultimaker_cpe_blue.xml.fdm_material | 35 +++++++++++++ .../ultimaker_cpe_dark-grey.xml.fdm_material | 35 +++++++++++++ .../ultimaker_cpe_green.xml.fdm_material | 35 +++++++++++++ .../ultimaker_cpe_light-grey.xml.fdm_material | 35 +++++++++++++ .../ultimaker_cpe_red.xml.fdm_material | 35 +++++++++++++ ...ultimaker_cpe_transparent.xml.fdm_material | 35 +++++++++++++ .../ultimaker_cpe_white.xml.fdm_material | 35 +++++++++++++ .../ultimaker_cpe_yellow.xml.fdm_material | 35 +++++++++++++ .../ultimaker_pla_black.xml.fdm_material | 51 +++++++++++++++++++ .../ultimaker_pla_blue.xml.fdm_material | 51 +++++++++++++++++++ .../ultimaker_pla_green.xml.fdm_material | 51 +++++++++++++++++++ .../ultimaker_pla_magenta.xml.fdm_material | 51 +++++++++++++++++++ .../ultimaker_pla_orange.xml.fdm_material | 51 +++++++++++++++++++ ...ultimaker_pla_pearl-white.xml.fdm_material | 51 +++++++++++++++++++ .../ultimaker_pla_red.xml.fdm_material | 51 +++++++++++++++++++ ...maker_pla_silver-metallic.xml.fdm_material | 50 ++++++++++++++++++ ...ultimaker_pla_transparent.xml.fdm_material | 51 +++++++++++++++++++ .../ultimaker_pla_white.xml.fdm_material | 51 +++++++++++++++++++ .../ultimaker_pla_yellow.xml.fdm_material | 51 +++++++++++++++++++ 38 files changed, 1497 insertions(+), 1 deletion(-) delete mode 100644 resources/materials/README create mode 100644 resources/materials/generic_abs.xml.fdm_material create mode 100644 resources/materials/generic_cpe.xml.fdm_material create mode 100644 resources/materials/generic_cpe_plus.xml.fdm_material create mode 100644 resources/materials/generic_nylon.xml.fdm_material create mode 100644 resources/materials/generic_pc.xml.fdm_material create mode 100644 resources/materials/generic_pla.xml.fdm_material create mode 100644 resources/materials/generic_tpu.xml.fdm_material create mode 100644 resources/materials/ultimaker_abs_black.xml.fdm_material create mode 100644 resources/materials/ultimaker_abs_blue.xml.fdm_material create mode 100644 resources/materials/ultimaker_abs_green.xml.fdm_material create mode 100644 resources/materials/ultimaker_abs_grey.xml.fdm_material create mode 100644 resources/materials/ultimaker_abs_orange.xml.fdm_material create mode 100644 resources/materials/ultimaker_abs_pearl-gold.xml.fdm_material create mode 100644 resources/materials/ultimaker_abs_red.xml.fdm_material create mode 100644 resources/materials/ultimaker_abs_silver-metallic.xml.fdm_material create mode 100644 resources/materials/ultimaker_abs_white.xml.fdm_material create mode 100644 resources/materials/ultimaker_abs_yellow.xml.fdm_material create mode 100644 resources/materials/ultimaker_cpe_black.xml.fdm_material create mode 100644 resources/materials/ultimaker_cpe_blue.xml.fdm_material create mode 100644 resources/materials/ultimaker_cpe_dark-grey.xml.fdm_material create mode 100644 resources/materials/ultimaker_cpe_green.xml.fdm_material create mode 100644 resources/materials/ultimaker_cpe_light-grey.xml.fdm_material create mode 100644 resources/materials/ultimaker_cpe_red.xml.fdm_material create mode 100644 resources/materials/ultimaker_cpe_transparent.xml.fdm_material create mode 100644 resources/materials/ultimaker_cpe_white.xml.fdm_material create mode 100644 resources/materials/ultimaker_cpe_yellow.xml.fdm_material create mode 100644 resources/materials/ultimaker_pla_black.xml.fdm_material create mode 100644 resources/materials/ultimaker_pla_blue.xml.fdm_material create mode 100644 resources/materials/ultimaker_pla_green.xml.fdm_material create mode 100644 resources/materials/ultimaker_pla_magenta.xml.fdm_material create mode 100644 resources/materials/ultimaker_pla_orange.xml.fdm_material create mode 100644 resources/materials/ultimaker_pla_pearl-white.xml.fdm_material create mode 100644 resources/materials/ultimaker_pla_red.xml.fdm_material create mode 100644 resources/materials/ultimaker_pla_silver-metallic.xml.fdm_material create mode 100644 resources/materials/ultimaker_pla_transparent.xml.fdm_material create mode 100644 resources/materials/ultimaker_pla_white.xml.fdm_material create mode 100644 resources/materials/ultimaker_pla_yellow.xml.fdm_material diff --git a/resources/materials/README b/resources/materials/README deleted file mode 100644 index 32fcbc1d79..0000000000 --- a/resources/materials/README +++ /dev/null @@ -1 +0,0 @@ -Please clone the fdm_materials repository located at https://github.com/ultimaker/fdm_materials for materials. diff --git a/resources/materials/generic_abs.xml.fdm_material b/resources/materials/generic_abs.xml.fdm_material new file mode 100644 index 0000000000..ef2db0b7fd --- /dev/null +++ b/resources/materials/generic_abs.xml.fdm_material @@ -0,0 +1,35 @@ + + + + + + Generic + ABS + Generic + + 60636bb4-518f-42e7-8237-fe77b194ebe0 + 1 + #8cb219 + + + 1.10 + 2.85 + + + 240 + 80 + 200 + + + + + + + + + + + + diff --git a/resources/materials/generic_cpe.xml.fdm_material b/resources/materials/generic_cpe.xml.fdm_material new file mode 100644 index 0000000000..1fa878e466 --- /dev/null +++ b/resources/materials/generic_cpe.xml.fdm_material @@ -0,0 +1,35 @@ + + + + + + Generic + CPE + Generic + + 12f41353-1a33-415e-8b4f-a775a6c70cc6 + 1 + #159499 + + + 1.27 + 2.85 + + + 250 + 70 + 175 + + + + + + + + + + + + diff --git a/resources/materials/generic_cpe_plus.xml.fdm_material b/resources/materials/generic_cpe_plus.xml.fdm_material new file mode 100644 index 0000000000..f234d7cb45 --- /dev/null +++ b/resources/materials/generic_cpe_plus.xml.fdm_material @@ -0,0 +1,39 @@ + + + + + + Generic + CPE+ + Generic + + e2409626-b5a0-4025-b73e-b58070219259 + 1 + #3633F2 + + + 1.18 + 2.85 + + + no + 260 + 110 + 175 + + + + + yes + + + no + + + + + + + diff --git a/resources/materials/generic_nylon.xml.fdm_material b/resources/materials/generic_nylon.xml.fdm_material new file mode 100644 index 0000000000..02b2d5414b --- /dev/null +++ b/resources/materials/generic_nylon.xml.fdm_material @@ -0,0 +1,36 @@ + + + + + + Generic + Nylon + Generic + + 35ebb8df-66d2-41cd-9662-b7d96b9c2cbd + 1 + #3DF266 + + + 1.14 + 2.85 + + + 250 + 60 + 175 + + + + + yes + + + + + + + + diff --git a/resources/materials/generic_pc.xml.fdm_material b/resources/materials/generic_pc.xml.fdm_material new file mode 100644 index 0000000000..77d7e60bf5 --- /dev/null +++ b/resources/materials/generic_pc.xml.fdm_material @@ -0,0 +1,37 @@ + + + + + + Generic + PC + Generic + + 98c05714-bf4e-4455-ba27-57d74fe331e4 + 1 + #F29030 + + + 1.19 + 2.85 + + + no + 260 + 110 + 175 + + + + + yes + + + + + + + + diff --git a/resources/materials/generic_pla.xml.fdm_material b/resources/materials/generic_pla.xml.fdm_material new file mode 100644 index 0000000000..a98e0e469c --- /dev/null +++ b/resources/materials/generic_pla.xml.fdm_material @@ -0,0 +1,51 @@ + + + + + + Generic + PLA + Generic + + 506c9f0d-e3aa-4bd4-b2d2-23e2425b1aa9 + 1 + #ffc924 + + + 1.24 + 2.85 + + + 200 + 60 + 175 + + + + + + + + + + + + + + + + 150 + + + + + + + + + 150 + + + diff --git a/resources/materials/generic_tpu.xml.fdm_material b/resources/materials/generic_tpu.xml.fdm_material new file mode 100644 index 0000000000..5a0c793cda --- /dev/null +++ b/resources/materials/generic_tpu.xml.fdm_material @@ -0,0 +1,39 @@ + + + + + + Generic + TPU 95A + Generic + + 1d52b2be-a3a2-41de-a8b1-3bcdb5618695 + 1 + #B22744 + + + 1.22 + 2.85 + + + no + 260 + 110 + 175 + + + + + yes + + + + + + no + + + + diff --git a/resources/materials/ultimaker_abs_black.xml.fdm_material b/resources/materials/ultimaker_abs_black.xml.fdm_material new file mode 100644 index 0000000000..2993ae3133 --- /dev/null +++ b/resources/materials/ultimaker_abs_black.xml.fdm_material @@ -0,0 +1,35 @@ + + + + + + Ultimaker + ABS + Black + + 2f9d2279-9b0e-4765-bf9b-d1e1e13f3c49 + 0 + #2a292a + + + 1.10 + 2.85 + + + 240 + 80 + 200 + + + + + + + + + + + + diff --git a/resources/materials/ultimaker_abs_blue.xml.fdm_material b/resources/materials/ultimaker_abs_blue.xml.fdm_material new file mode 100644 index 0000000000..4273ec8f9f --- /dev/null +++ b/resources/materials/ultimaker_abs_blue.xml.fdm_material @@ -0,0 +1,35 @@ + + + + + + Ultimaker + ABS + Blue + + 7c9575a6-c8d6-40ec-b3dd-18d7956bfaae + 0 + #00387b + + + 1.10 + 2.85 + + + 240 + 80 + 200 + + + + + + + + + + + + diff --git a/resources/materials/ultimaker_abs_green.xml.fdm_material b/resources/materials/ultimaker_abs_green.xml.fdm_material new file mode 100644 index 0000000000..87c178fb01 --- /dev/null +++ b/resources/materials/ultimaker_abs_green.xml.fdm_material @@ -0,0 +1,35 @@ + + + + + + Ultimaker + ABS + Green + + 3400c0d1-a4e3-47de-a444-7b704f287171 + 0 + #61993b + + + 1.10 + 2.85 + + + 240 + 80 + 200 + + + + + + + + + + + + diff --git a/resources/materials/ultimaker_abs_grey.xml.fdm_material b/resources/materials/ultimaker_abs_grey.xml.fdm_material new file mode 100644 index 0000000000..f8b67c7a41 --- /dev/null +++ b/resources/materials/ultimaker_abs_grey.xml.fdm_material @@ -0,0 +1,35 @@ + + + + + + Ultimaker + ABS + Grey + + 8b75b775-d3f2-4d0f-8fb2-2a3dd53cf673 + 0 + #52595d + + + 1.10 + 2.85 + + + 240 + 80 + 200 + + + + + + + + + + + + diff --git a/resources/materials/ultimaker_abs_orange.xml.fdm_material b/resources/materials/ultimaker_abs_orange.xml.fdm_material new file mode 100644 index 0000000000..af3369ca97 --- /dev/null +++ b/resources/materials/ultimaker_abs_orange.xml.fdm_material @@ -0,0 +1,35 @@ + + + + + + Ultimaker + ABS + Orange + + 0b4ca6ef-eac8-4b23-b3ca-5f21af00e54f + 0 + #ed6b21 + + + 1.10 + 2.85 + + + 240 + 80 + 200 + + + + + + + + + + + + diff --git a/resources/materials/ultimaker_abs_pearl-gold.xml.fdm_material b/resources/materials/ultimaker_abs_pearl-gold.xml.fdm_material new file mode 100644 index 0000000000..29bec52466 --- /dev/null +++ b/resources/materials/ultimaker_abs_pearl-gold.xml.fdm_material @@ -0,0 +1,35 @@ + + + + + + Ultimaker + ABS + Pearl Gold + + 7cbdb9ca-081a-456f-a6ba-f73e4e9cb856 + 0 + #80643f + + + 1.10 + 2.85 + + + 240 + 80 + 200 + + + + + + + + + + + + diff --git a/resources/materials/ultimaker_abs_red.xml.fdm_material b/resources/materials/ultimaker_abs_red.xml.fdm_material new file mode 100644 index 0000000000..0d0dc3f098 --- /dev/null +++ b/resources/materials/ultimaker_abs_red.xml.fdm_material @@ -0,0 +1,35 @@ + + + + + + Ultimaker + ABS + Red + + 5df7afa6-48bd-4c19-b314-839fe9f08f1f + 0 + #bb1e10 + + + 1.10 + 2.85 + + + 240 + 80 + 200 + + + + + + + + + + + + diff --git a/resources/materials/ultimaker_abs_silver-metallic.xml.fdm_material b/resources/materials/ultimaker_abs_silver-metallic.xml.fdm_material new file mode 100644 index 0000000000..fc7fb1c2b5 --- /dev/null +++ b/resources/materials/ultimaker_abs_silver-metallic.xml.fdm_material @@ -0,0 +1,35 @@ + + + + + + Ultimaker + ABS + Silver Metallic + + 763c926e-a5f7-4ba0-927d-b4e038ea2735 + 0 + #a1a1a0 + + + 1.10 + 2.85 + + + 240 + 80 + 200 + + + + + + + + + + + + diff --git a/resources/materials/ultimaker_abs_white.xml.fdm_material b/resources/materials/ultimaker_abs_white.xml.fdm_material new file mode 100644 index 0000000000..fbf4518c90 --- /dev/null +++ b/resources/materials/ultimaker_abs_white.xml.fdm_material @@ -0,0 +1,35 @@ + + + + + + Ultimaker + ABS + White + + 5253a75a-27dc-4043-910f-753ae11bc417 + 0 + #ecece7 + + + 1.10 + 2.85 + + + 240 + 80 + 200 + + + + + + + + + + + + diff --git a/resources/materials/ultimaker_abs_yellow.xml.fdm_material b/resources/materials/ultimaker_abs_yellow.xml.fdm_material new file mode 100644 index 0000000000..2b1a0a2784 --- /dev/null +++ b/resources/materials/ultimaker_abs_yellow.xml.fdm_material @@ -0,0 +1,35 @@ + + + + + + Ultimaker + ABS + Yellow + + e873341d-d9b8-45f9-9a6f-5609e1bcff68 + 0 + #f7b500 + + + 1.10 + 2.85 + + + 240 + 80 + 200 + + + + + + + + + + + + diff --git a/resources/materials/ultimaker_cpe_black.xml.fdm_material b/resources/materials/ultimaker_cpe_black.xml.fdm_material new file mode 100644 index 0000000000..8e06ad7176 --- /dev/null +++ b/resources/materials/ultimaker_cpe_black.xml.fdm_material @@ -0,0 +1,35 @@ + + + + + + Ultimaker + CPE + Black + + a8955dc3-9d7e-404d-8c03-0fd6fee7f22d + 0 + #2a292a + + + 1.27 + 2.85 + + + 250 + 70 + 175 + + + + + + + + + + + + diff --git a/resources/materials/ultimaker_cpe_blue.xml.fdm_material b/resources/materials/ultimaker_cpe_blue.xml.fdm_material new file mode 100644 index 0000000000..f4675c7876 --- /dev/null +++ b/resources/materials/ultimaker_cpe_blue.xml.fdm_material @@ -0,0 +1,35 @@ + + + + + + Ultimaker + CPE + Blue + + 4d816290-ce2e-40e0-8dc8-3f702243131e + 0 + #00a3e0 + + + 1.27 + 2.85 + + + 250 + 70 + 175 + + + + + + + + + + + + diff --git a/resources/materials/ultimaker_cpe_dark-grey.xml.fdm_material b/resources/materials/ultimaker_cpe_dark-grey.xml.fdm_material new file mode 100644 index 0000000000..aa22712d08 --- /dev/null +++ b/resources/materials/ultimaker_cpe_dark-grey.xml.fdm_material @@ -0,0 +1,35 @@ + + + + + + Ultimaker + CPE + Dark Grey + + 10961c00-3caf-48e9-a598-fa805ada1e8d + 0 + #4f5250 + + + 1.27 + 2.85 + + + 250 + 70 + 175 + + + + + + + + + + + + diff --git a/resources/materials/ultimaker_cpe_green.xml.fdm_material b/resources/materials/ultimaker_cpe_green.xml.fdm_material new file mode 100644 index 0000000000..f22425f658 --- /dev/null +++ b/resources/materials/ultimaker_cpe_green.xml.fdm_material @@ -0,0 +1,35 @@ + + + + + + Ultimaker + CPE + Green + + 7ff6d2c8-d626-48cd-8012-7725fa537cc9 + 0 + #78be20 + + + 1.27 + 2.85 + + + 250 + 70 + 175 + + + + + + + + + + + + diff --git a/resources/materials/ultimaker_cpe_light-grey.xml.fdm_material b/resources/materials/ultimaker_cpe_light-grey.xml.fdm_material new file mode 100644 index 0000000000..1a996e9bf2 --- /dev/null +++ b/resources/materials/ultimaker_cpe_light-grey.xml.fdm_material @@ -0,0 +1,35 @@ + + + + + + Ultimaker + CPE + Light Grey + + 173a7bae-5e14-470e-817e-08609c61e12b + 0 + #c5c7c4 + + + 1.27 + 2.85 + + + 250 + 70 + 175 + + + + + + + + + + + + diff --git a/resources/materials/ultimaker_cpe_red.xml.fdm_material b/resources/materials/ultimaker_cpe_red.xml.fdm_material new file mode 100644 index 0000000000..77a9caa196 --- /dev/null +++ b/resources/materials/ultimaker_cpe_red.xml.fdm_material @@ -0,0 +1,35 @@ + + + + + + Ultimaker + CPE + Red + + 00181d6c-7024-479a-8eb7-8a2e38a2619a + 0 + #c8102e + + + 1.27 + 2.85 + + + 250 + 70 + 175 + + + + + + + + + + + + diff --git a/resources/materials/ultimaker_cpe_transparent.xml.fdm_material b/resources/materials/ultimaker_cpe_transparent.xml.fdm_material new file mode 100644 index 0000000000..ff3cbce64b --- /dev/null +++ b/resources/materials/ultimaker_cpe_transparent.xml.fdm_material @@ -0,0 +1,35 @@ + + + + + + Ultimaker + CPE + Transparent + + bd0d9eb3-a920-4632-84e8-dcd6086746c5 + 0 + #d0d0d0 + + + 1.27 + 2.85 + + + 250 + 70 + 175 + + + + + + + + + + + + diff --git a/resources/materials/ultimaker_cpe_white.xml.fdm_material b/resources/materials/ultimaker_cpe_white.xml.fdm_material new file mode 100644 index 0000000000..bb72152d09 --- /dev/null +++ b/resources/materials/ultimaker_cpe_white.xml.fdm_material @@ -0,0 +1,35 @@ + + + + + + Ultimaker + CPE + White + + 881c888e-24fb-4a64-a4ac-d5c95b096cd7 + 0 + #f1ece1 + + + 1.27 + 2.85 + + + 250 + 70 + 175 + + + + + + + + + + + + diff --git a/resources/materials/ultimaker_cpe_yellow.xml.fdm_material b/resources/materials/ultimaker_cpe_yellow.xml.fdm_material new file mode 100644 index 0000000000..8fe699277d --- /dev/null +++ b/resources/materials/ultimaker_cpe_yellow.xml.fdm_material @@ -0,0 +1,35 @@ + + + + + + Ultimaker + CPE + Yellow + + b9176a2a-7a0f-4821-9f29-76d882a88682 + 0 + #f6b600 + + + 1.27 + 2.85 + + + 250 + 70 + 175 + + + + + + + + + + + + diff --git a/resources/materials/ultimaker_pla_black.xml.fdm_material b/resources/materials/ultimaker_pla_black.xml.fdm_material new file mode 100644 index 0000000000..257f9b3235 --- /dev/null +++ b/resources/materials/ultimaker_pla_black.xml.fdm_material @@ -0,0 +1,51 @@ + + + + + + Ultimaker + PLA + Black + + 3ee70a86-77d8-4b87-8005-e4a1bc57d2ce + 0 + #0e0e10 + + + 1.24 + 2.85 + + + 200 + 60 + 175 + + + + + + + + + + + + + + + + 150 + + + + + + + + + 150 + + + diff --git a/resources/materials/ultimaker_pla_blue.xml.fdm_material b/resources/materials/ultimaker_pla_blue.xml.fdm_material new file mode 100644 index 0000000000..e75b9fada1 --- /dev/null +++ b/resources/materials/ultimaker_pla_blue.xml.fdm_material @@ -0,0 +1,51 @@ + + + + + + Ultimaker + PLA + Blue + + 44a029e6-e31b-4c9e-a12f-9282e29a92ff + 0 + #00387b + + + 1.24 + 2.85 + + + 200 + 60 + 175 + + + + + + + + + + + + + + + + 150 + + + + + + + + + 150 + + + diff --git a/resources/materials/ultimaker_pla_green.xml.fdm_material b/resources/materials/ultimaker_pla_green.xml.fdm_material new file mode 100644 index 0000000000..41b015b216 --- /dev/null +++ b/resources/materials/ultimaker_pla_green.xml.fdm_material @@ -0,0 +1,51 @@ + + + + + + Ultimaker + PLA + Green + + 2433b8fb-dcd6-4e36-9cd5-9f4ee551c04c + 0 + #61993b + + + 1.24 + 2.85 + + + 200 + 60 + 175 + + + + + + + + + + + + + + + + 150 + + + + + + + + + 150 + + + diff --git a/resources/materials/ultimaker_pla_magenta.xml.fdm_material b/resources/materials/ultimaker_pla_magenta.xml.fdm_material new file mode 100644 index 0000000000..4f821337dc --- /dev/null +++ b/resources/materials/ultimaker_pla_magenta.xml.fdm_material @@ -0,0 +1,51 @@ + + + + + + Ultimaker + PLA + Magenta + + fe3982c8-58f4-4d86-9ac0-9ff7a3ab9cbc + 0 + #bc4077 + + + 1.24 + 2.85 + + + 200 + 60 + 175 + + + + + + + + + + + + + + + + 150 + + + + + + + + + 150 + + + diff --git a/resources/materials/ultimaker_pla_orange.xml.fdm_material b/resources/materials/ultimaker_pla_orange.xml.fdm_material new file mode 100644 index 0000000000..1cd028efad --- /dev/null +++ b/resources/materials/ultimaker_pla_orange.xml.fdm_material @@ -0,0 +1,51 @@ + + + + + + Ultimaker + PLA + Orange + + d9549dba-b9df-45b9-80a5-f7140a9a2f34 + 0 + #ed6b21 + + + 1.24 + 2.85 + + + 200 + 60 + 175 + + + + + + + + + + + + + + + + 150 + + + + + + + + + 150 + + + diff --git a/resources/materials/ultimaker_pla_pearl-white.xml.fdm_material b/resources/materials/ultimaker_pla_pearl-white.xml.fdm_material new file mode 100644 index 0000000000..7e23606f65 --- /dev/null +++ b/resources/materials/ultimaker_pla_pearl-white.xml.fdm_material @@ -0,0 +1,51 @@ + + + + + + Ultimaker + PLA + Pearl-White + + d9fc79db-82c3-41b5-8c99-33b3747b8fb3 + 0 + #e3d9c6 + + + 1.24 + 2.85 + + + 200 + 60 + 175 + + + + + + + + + + + + + + + + 150 + + + + + + + + + 150 + + + diff --git a/resources/materials/ultimaker_pla_red.xml.fdm_material b/resources/materials/ultimaker_pla_red.xml.fdm_material new file mode 100644 index 0000000000..f4e381c815 --- /dev/null +++ b/resources/materials/ultimaker_pla_red.xml.fdm_material @@ -0,0 +1,51 @@ + + + + + + Ultimaker + PLA + Red + + 9cfe5bf1-bdc5-4beb-871a-52c70777842d + 0 + #bb1e10 + + + 1.24 + 2.85 + + + 200 + 60 + 175 + + + + + + + + + + + + + + + + 150 + + + + + + + + + 150 + + + diff --git a/resources/materials/ultimaker_pla_silver-metallic.xml.fdm_material b/resources/materials/ultimaker_pla_silver-metallic.xml.fdm_material new file mode 100644 index 0000000000..2b7fbaac46 --- /dev/null +++ b/resources/materials/ultimaker_pla_silver-metallic.xml.fdm_material @@ -0,0 +1,50 @@ + + + + + + Ultimaker + PLA + Silver Metallic + + 0e01be8c-e425-4fb1-b4a3-b79f255f1db9 + 0 + #a1a1a0 + + + 1.24 + 2.85 + + + 200 + 60 + 175 + + + + + + + + + + + + + + + + + + + + + + + + 150 + + + diff --git a/resources/materials/ultimaker_pla_transparent.xml.fdm_material b/resources/materials/ultimaker_pla_transparent.xml.fdm_material new file mode 100644 index 0000000000..773828b620 --- /dev/null +++ b/resources/materials/ultimaker_pla_transparent.xml.fdm_material @@ -0,0 +1,51 @@ + + + + + + Ultimaker + PLA + Transparent + + 532e8b3d-5fd4-4149-b936-53ada9bd6b85 + 0 + #d0d0d0 + + + 1.24 + 2.85 + + + 200 + 60 + 175 + + + + + + + + + + + + + + + + 150 + + + + + + + + + 150 + + + diff --git a/resources/materials/ultimaker_pla_white.xml.fdm_material b/resources/materials/ultimaker_pla_white.xml.fdm_material new file mode 100644 index 0000000000..acd5059cef --- /dev/null +++ b/resources/materials/ultimaker_pla_white.xml.fdm_material @@ -0,0 +1,51 @@ + + + + + + Ultimaker + PLA + White + + e509f649-9fe6-4b14-ac45-d441438cb4ef + 0 + #f1ece1 + + + 1.24 + 2.85 + + + 200 + 60 + 175 + + + + + + + + + + + + + + + + 150 + + + + + + + + + 150 + + + diff --git a/resources/materials/ultimaker_pla_yellow.xml.fdm_material b/resources/materials/ultimaker_pla_yellow.xml.fdm_material new file mode 100644 index 0000000000..92d947e555 --- /dev/null +++ b/resources/materials/ultimaker_pla_yellow.xml.fdm_material @@ -0,0 +1,51 @@ + + + + + + Ultimaker + PLA + Yellow + + 9c1959d0-f597-46ec-9131-34020c7a54fc + 0 + #f9a800 + + + 1.24 + 2.85 + + + 200 + 60 + 175 + + + + + + + + + + + + + + + + 150 + + + + + + + + + 150 + + + From 7c59f8f2f2aae28aca5a107a85a44351bcd4a97b Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Fri, 7 Oct 2016 12:51:51 +0200 Subject: [PATCH 08/20] Multiple objects are now handled with right transformation --- plugins/3MFReader/ThreeMFReader.py | 193 ++++++++++++++--------------- 1 file changed, 94 insertions(+), 99 deletions(-) diff --git a/plugins/3MFReader/ThreeMFReader.py b/plugins/3MFReader/ThreeMFReader.py index 45d48d362a..075eb757e4 100644 --- a/plugins/3MFReader/ThreeMFReader.py +++ b/plugins/3MFReader/ThreeMFReader.py @@ -11,6 +11,8 @@ from UM.Scene.GroupDecorator import GroupDecorator import UM.Application from UM.Job import Job +from UM.Math.Quaternion import Quaternion + import math import zipfile @@ -24,118 +26,111 @@ class ThreeMFReader(MeshReader): def __init__(self): super().__init__() self._supported_extensions = [".3mf"] - + self._root = None self._namespaces = { "3mf": "http://schemas.microsoft.com/3dmanufacturing/core/2015/02", "cura": "http://software.ultimaker.com/xml/cura/3mf/2015/10" } + def _createNodeFromObject(self, object, name = ""): + mesh_builder = MeshBuilder() + node = SceneNode() + vertex_list = [] + + components = object.find(".//3mf:components", self._namespaces) + if components: + for component in components: + id = component.get("objectid") + object = self._root.find("./3mf:resources/3mf:object[@id='{0}']".format(id), self._namespaces) + new_node = self._createNodeFromObject(object) + node.addChild(new_node) + transform = component.get("transform") + if transform is not None: + new_node.setTransformation(self._createMatrixFromTransformationString(transform)) + + if len(node.getChildren()) > 0: + group_decorator = GroupDecorator() + node.addDecorator(group_decorator) + + # for vertex in entry.mesh.vertices.vertex: + for vertex in object.findall(".//3mf:vertex", self._namespaces): + vertex_list.append([vertex.get("x"), vertex.get("y"), vertex.get("z")]) + Job.yieldThread() + + triangles = object.findall(".//3mf:triangle", self._namespaces) + mesh_builder.reserveFaceCount(len(triangles)) + + for triangle in triangles: + v1 = int(triangle.get("v1")) + v2 = int(triangle.get("v2")) + v3 = int(triangle.get("v3")) + + mesh_builder.addFaceByPoints(vertex_list[v1][0], vertex_list[v1][1], vertex_list[v1][2], + vertex_list[v2][0], vertex_list[v2][1], vertex_list[v2][2], + vertex_list[v3][0], vertex_list[v3][1], vertex_list[v3][2]) + + Job.yieldThread() + + # Rotate the model; We use a different coordinate frame. + rotation = Matrix() + rotation.setByRotationAxis(-0.5 * math.pi, Vector(1, 0, 0)) + + # TODO: We currently do not check for normals and simply recalculate them. + mesh_builder.calculateNormals() + mesh_builder.setFileName(name) + mesh_data = mesh_builder.build() #.getTransformed(rotation) + + if len(mesh_data.getVertices()): + node.setMeshData(mesh_data) + + node.setSelectable(True) + return node + + def _createMatrixFromTransformationString(self, transformation): + splitted_transformation = transformation.split() + ## Transformation is saved as: + ## M00 M01 M02 0.0 + ## M10 M11 M12 0.0 + ## M20 M21 M22 0.0 + ## M30 M31 M32 1.0 + ## We switch the row & cols as that is how everyone else uses matrices! + temp_mat = Matrix() + # Rotation & Scale + temp_mat._data[0, 0] = splitted_transformation[0] + temp_mat._data[1, 0] = splitted_transformation[1] + temp_mat._data[2, 0] = splitted_transformation[2] + temp_mat._data[0, 1] = splitted_transformation[3] + temp_mat._data[1, 1] = splitted_transformation[4] + temp_mat._data[2, 1] = splitted_transformation[5] + temp_mat._data[0, 2] = splitted_transformation[6] + temp_mat._data[1, 2] = splitted_transformation[7] + temp_mat._data[2, 2] = splitted_transformation[8] + + # Translation + temp_mat._data[0, 3] = splitted_transformation[9] + temp_mat._data[1, 3] = splitted_transformation[10] + temp_mat._data[2, 3] = splitted_transformation[11] + return temp_mat + def read(self, file_name): result = SceneNode() # The base object of 3mf is a zipped archive. archive = zipfile.ZipFile(file_name, "r") try: - root = ET.parse(archive.open("3D/3dmodel.model")) + self._root = ET.parse(archive.open("3D/3dmodel.model")) - # There can be multiple objects, try to load all of them. - objects = root.findall("./3mf:resources/3mf:object", self._namespaces) - if len(objects) == 0: - Logger.log("w", "No objects found in 3MF file %s, either the file is corrupt or you are using an outdated format", file_name) - return None + build_items = self._root.findall("./3mf:build/3mf:item", self._namespaces) - for entry in objects: - mesh_builder = MeshBuilder() - node = SceneNode() - vertex_list = [] + for build_item in build_items: + id = build_item.get("objectid") + object = self._root.find("./3mf:resources/3mf:object[@id='{0}']".format(id), self._namespaces) + build_item_node = self._createNodeFromObject(object) + transform = build_item.get("transform") + if transform is not None: + build_item_node.setTransformation(self._createMatrixFromTransformationString(transform)) + result.addChild(build_item_node) + build_item_node.rotate(Quaternion.fromAngleAxis(-0.5 * math.pi, Vector(1, 0, 0))) - # for vertex in entry.mesh.vertices.vertex: - for vertex in entry.findall(".//3mf:vertex", self._namespaces): - vertex_list.append([vertex.get("x"), vertex.get("y"), vertex.get("z")]) - Job.yieldThread() - - triangles = entry.findall(".//3mf:triangle", self._namespaces) - mesh_builder.reserveFaceCount(len(triangles)) - - for triangle in triangles: - v1 = int(triangle.get("v1")) - v2 = int(triangle.get("v2")) - v3 = int(triangle.get("v3")) - - mesh_builder.addFaceByPoints(vertex_list[v1][0], vertex_list[v1][1], vertex_list[v1][2], - vertex_list[v2][0], vertex_list[v2][1], vertex_list[v2][2], - vertex_list[v3][0], vertex_list[v3][1], vertex_list[v3][2]) - - Job.yieldThread() - - # Rotate the model; We use a different coordinate frame. - rotation = Matrix() - rotation.setByRotationAxis(-0.5 * math.pi, Vector(1, 0, 0)) - - # TODO: We currently do not check for normals and simply recalculate them. - mesh_builder.calculateNormals() - mesh_builder.setFileName(file_name) - mesh_data = mesh_builder.build().getTransformed(rotation) - - if not len(mesh_data.getVertices()): - Logger.log("d", "One of the objects does not have vertices. Skipping it.") - continue # This object doesn't have data, so skip it. - - node.setMeshData(mesh_data) - node.setSelectable(True) - - transformations = root.findall("./3mf:build/3mf:item[@objectid='{0}']".format(entry.get("id")), self._namespaces) - transformation = transformations[0] if transformations else None - if transformation is not None and transformation.get("transform"): - splitted_transformation = transformation.get("transform").split() - ## Transformation is saved as: - ## M00 M01 M02 0.0 - ## M10 M11 M12 0.0 - ## M20 M21 M22 0.0 - ## M30 M31 M32 1.0 - ## We switch the row & cols as that is how everyone else uses matrices! - temp_mat = Matrix() - # Rotation & Scale - temp_mat._data[0,0] = splitted_transformation[0] - temp_mat._data[1,0] = splitted_transformation[1] - temp_mat._data[2,0] = splitted_transformation[2] - temp_mat._data[0,1] = splitted_transformation[3] - temp_mat._data[1,1] = splitted_transformation[4] - temp_mat._data[2,1] = splitted_transformation[5] - temp_mat._data[0,2] = splitted_transformation[6] - temp_mat._data[1,2] = splitted_transformation[7] - temp_mat._data[2,2] = splitted_transformation[8] - - # Translation - temp_mat._data[0,3] = splitted_transformation[9] - temp_mat._data[1,3] = splitted_transformation[10] - temp_mat._data[2,3] = splitted_transformation[11] - - node.setTransformation(temp_mat) - - try: - node.getBoundingBox() # Selftest - There might be more functions that should fail - except: - Logger.log("w", "Bounding box test for object failed. Skipping this object") - continue - - # 3mf defines the front left corner as the 0, so we need to translate to their operating space. - global_container_stack = UM.Application.getInstance().getGlobalContainerStack() - if global_container_stack: - translation = Vector(x = -global_container_stack.getProperty("machine_width", "value") / 2, y = 0, z = global_container_stack.getProperty("machine_depth", "value") / 2) - node.translate(translation) - result.addChild(node) - - Job.yieldThread() - - # If there is more then one object, group them. - if len(objects) > 1: - group_decorator = GroupDecorator() - result.addDecorator(group_decorator) - elif len(objects) == 1: - if result.getChildren(): - result = result.getChildren()[0] # Only one object found, return that. - else: # we failed to load any data - return None except Exception as e: Logger.log("e", "exception occured in 3mf reader: %s", e) try: # Selftest - There might be more functions that should fail From 47870f43ef3d850492e528e05357fdddd8b87636 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Fri, 7 Oct 2016 13:51:53 +0200 Subject: [PATCH 09/20] Groups with just a single item are now discarded CURA-382 --- plugins/3MFReader/ThreeMFReader.py | 36 ++++++++++++++++++++++-------- 1 file changed, 27 insertions(+), 9 deletions(-) diff --git a/plugins/3MFReader/ThreeMFReader.py b/plugins/3MFReader/ThreeMFReader.py index 075eb757e4..8e2b21fc90 100644 --- a/plugins/3MFReader/ThreeMFReader.py +++ b/plugins/3MFReader/ThreeMFReader.py @@ -33,30 +33,35 @@ class ThreeMFReader(MeshReader): } def _createNodeFromObject(self, object, name = ""): - mesh_builder = MeshBuilder() node = SceneNode() + mesh_builder = MeshBuilder() vertex_list = [] components = object.find(".//3mf:components", self._namespaces) if components: for component in components: id = component.get("objectid") - object = self._root.find("./3mf:resources/3mf:object[@id='{0}']".format(id), self._namespaces) - new_node = self._createNodeFromObject(object) + new_object = self._root.find("./3mf:resources/3mf:object[@id='{0}']".format(id), self._namespaces) + + new_node = self._createNodeFromObject(new_object) node.addChild(new_node) transform = component.get("transform") if transform is not None: new_node.setTransformation(self._createMatrixFromTransformationString(transform)) - if len(node.getChildren()) > 0: - group_decorator = GroupDecorator() - node.addDecorator(group_decorator) - # for vertex in entry.mesh.vertices.vertex: for vertex in object.findall(".//3mf:vertex", self._namespaces): vertex_list.append([vertex.get("x"), vertex.get("y"), vertex.get("z")]) Job.yieldThread() + # If this object has no vertices and just one child, just return the child. + if len(vertex_list) == 0 and len(node.getChildren()) == 1: + return node.getChildren()[0] + + if len(node.getChildren()) > 0: + group_decorator = GroupDecorator() + node.addDecorator(group_decorator) + triangles = object.findall(".//3mf:triangle", self._namespaces) mesh_builder.reserveFaceCount(len(triangles)) @@ -74,11 +79,17 @@ class ThreeMFReader(MeshReader): # Rotate the model; We use a different coordinate frame. rotation = Matrix() rotation.setByRotationAxis(-0.5 * math.pi, Vector(1, 0, 0)) + flip_matrix = Matrix() + + flip_matrix._data[1, 1] = 0 + flip_matrix._data[1, 2] = 1 + flip_matrix._data[2, 1] = 1 + flip_matrix._data[2, 2] = 0 # TODO: We currently do not check for normals and simply recalculate them. mesh_builder.calculateNormals() mesh_builder.setFileName(name) - mesh_data = mesh_builder.build() #.getTransformed(rotation) + mesh_data = mesh_builder.build().getTransformed(flip_matrix) if len(mesh_data.getVertices()): node.setMeshData(mesh_data) @@ -110,6 +121,14 @@ class ThreeMFReader(MeshReader): temp_mat._data[0, 3] = splitted_transformation[9] temp_mat._data[1, 3] = splitted_transformation[10] temp_mat._data[2, 3] = splitted_transformation[11] + + flip_matrix = Matrix() + flip_matrix._data[1, 1] = 0 + flip_matrix._data[1, 2] = 1 + flip_matrix._data[2, 1] = 1 + flip_matrix._data[2, 2] = 0 + temp_mat.multiply(flip_matrix) + return temp_mat def read(self, file_name): @@ -129,7 +148,6 @@ class ThreeMFReader(MeshReader): if transform is not None: build_item_node.setTransformation(self._createMatrixFromTransformationString(transform)) result.addChild(build_item_node) - build_item_node.rotate(Quaternion.fromAngleAxis(-0.5 * math.pi, Vector(1, 0, 0))) except Exception as e: Logger.log("e", "exception occured in 3mf reader: %s", e) From 8ac75586774874099a702826d9b55ce5d1bb98bf Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Fri, 7 Oct 2016 14:31:48 +0200 Subject: [PATCH 10/20] Apply transformation again CURA-382 --- plugins/3MFReader/ThreeMFReader.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/plugins/3MFReader/ThreeMFReader.py b/plugins/3MFReader/ThreeMFReader.py index 8e2b21fc90..c833e1195a 100644 --- a/plugins/3MFReader/ThreeMFReader.py +++ b/plugins/3MFReader/ThreeMFReader.py @@ -157,4 +157,10 @@ class ThreeMFReader(MeshReader): except: return None + global_container_stack = UM.Application.getInstance().getGlobalContainerStack() + + if global_container_stack: + translation = Vector(x=-global_container_stack.getProperty("machine_width", "value") / 2, y=0, + z=global_container_stack.getProperty("machine_depth", "value") / 2) + result.translate(translation, SceneNode.TransformSpace.World) return result From 82c4460adf117f05ba80580719cac9b87b92803a Mon Sep 17 00:00:00 2001 From: Tim Kuipers Date: Fri, 7 Oct 2016 14:43:09 +0200 Subject: [PATCH 11/20] fix: update materials from fdm_materials (CURA-2567) --- resources/materials/generic_nylon.xml.fdm_material | 4 ++-- .../materials/ultimaker_pla_silver-metallic.xml.fdm_material | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/resources/materials/generic_nylon.xml.fdm_material b/resources/materials/generic_nylon.xml.fdm_material index 02b2d5414b..f127950860 100644 --- a/resources/materials/generic_nylon.xml.fdm_material +++ b/resources/materials/generic_nylon.xml.fdm_material @@ -9,7 +9,7 @@ Generic Nylon profile. Serves as an example file, data in this file is not corre Nylon Generic - 35ebb8df-66d2-41cd-9662-b7d96b9c2cbd + 28fb4162-db74-49e1-9008-d05f1e8bef5c 1 #3DF266 @@ -20,7 +20,7 @@ Generic Nylon profile. Serves as an example file, data in this file is not corre 250 60 - 175 + 100 diff --git a/resources/materials/ultimaker_pla_silver-metallic.xml.fdm_material b/resources/materials/ultimaker_pla_silver-metallic.xml.fdm_material index 2b7fbaac46..fd829abf6c 100644 --- a/resources/materials/ultimaker_pla_silver-metallic.xml.fdm_material +++ b/resources/materials/ultimaker_pla_silver-metallic.xml.fdm_material @@ -36,6 +36,7 @@ Automatically generated PLA profile. Data in this file may not be not correct. + 150 From e2dd9bb9587ed771550ffc9d40a8d5fc5c3907d7 Mon Sep 17 00:00:00 2001 From: Tim Kuipers Date: Fri, 7 Oct 2016 14:51:34 +0200 Subject: [PATCH 12/20] fix: added missing fdm_materials from fdm_materials repo (CURA-2567) --- .../ultimaker_nylon_black.xml.fdm_material | 25 +++++++++++++++++++ ...timaker_nylon_transparent.xml.fdm_material | 25 +++++++++++++++++++ 2 files changed, 50 insertions(+) create mode 100644 resources/materials/ultimaker_nylon_black.xml.fdm_material create mode 100644 resources/materials/ultimaker_nylon_transparent.xml.fdm_material diff --git a/resources/materials/ultimaker_nylon_black.xml.fdm_material b/resources/materials/ultimaker_nylon_black.xml.fdm_material new file mode 100644 index 0000000000..2d013ab408 --- /dev/null +++ b/resources/materials/ultimaker_nylon_black.xml.fdm_material @@ -0,0 +1,25 @@ + + + + + + Ultimaker + Nylon + Black + + c64c2dbe-5691-4363-a7d9-66b2dc12837f + 1 + #000000 + + + 1.14 + 2.85 + + + 250 + 60 + 100 + + diff --git a/resources/materials/ultimaker_nylon_transparent.xml.fdm_material b/resources/materials/ultimaker_nylon_transparent.xml.fdm_material new file mode 100644 index 0000000000..639f5188d4 --- /dev/null +++ b/resources/materials/ultimaker_nylon_transparent.xml.fdm_material @@ -0,0 +1,25 @@ + + + + + + Ultimaker + Nylon + Transparent + + e256615d-a04e-4f53-b311-114b90560af9 + 1 + #FFFFFF + + + 1.14 + 2.85 + + + 250 + 60 + 100 + + From 74669d79d193f33de3e949268da44278f0ce3ac9 Mon Sep 17 00:00:00 2001 From: Tim Kuipers Date: Fri, 7 Oct 2016 15:12:12 +0200 Subject: [PATCH 13/20] fix: use machine standby temp rather than Cura standby temp for Nylon fdm_material (CURA-2567) --- resources/materials/generic_nylon.xml.fdm_material | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/materials/generic_nylon.xml.fdm_material b/resources/materials/generic_nylon.xml.fdm_material index f127950860..7fdeef8645 100644 --- a/resources/materials/generic_nylon.xml.fdm_material +++ b/resources/materials/generic_nylon.xml.fdm_material @@ -20,7 +20,7 @@ Generic Nylon profile. Serves as an example file, data in this file is not corre 250 60 - 100 + 175 From dbea06689fcd9eeeacc6cabd6a264fd028bf6f9a Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Fri, 7 Oct 2016 17:42:56 +0200 Subject: [PATCH 14/20] Extruder manager now uses right definition for material selection --- cura/Settings/ExtruderManager.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cura/Settings/ExtruderManager.py b/cura/Settings/ExtruderManager.py index 071806e3ba..d0da064f92 100644 --- a/cura/Settings/ExtruderManager.py +++ b/cura/Settings/ExtruderManager.py @@ -205,7 +205,7 @@ class ExtruderManager(QObject): if preferred_material_id: search_criteria = { "type": "material", "id": preferred_material_id} if machine_definition.getMetaDataEntry("has_machine_materials"): - search_criteria["definition"] = machine_definition.id + search_criteria["definition"] = machine_definition_id if machine_definition.getMetaDataEntry("has_variants") and variant: search_criteria["variant"] = variant.id From 59457ad32602b52e625d4df9283178ca85af06db Mon Sep 17 00:00:00 2001 From: fieldOfView Date: Fri, 7 Oct 2016 19:56:52 +0200 Subject: [PATCH 15/20] Corrections suggested by @bagelorb CURA-2000 --- plugins/ChangeLogPlugin/ChangeLog.txt | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/plugins/ChangeLogPlugin/ChangeLog.txt b/plugins/ChangeLogPlugin/ChangeLog.txt index 8041bbb171..b5f7b35457 100644 --- a/plugins/ChangeLogPlugin/ChangeLog.txt +++ b/plugins/ChangeLogPlugin/ChangeLog.txt @@ -20,10 +20,10 @@ Select an individual item in a group or merged object and edit as usual. Just Ct Profile management is improved. You can now easily see and track changes made to your profiles. *Improved Setting Visibility -Make multiple settings visible at once. The Visibility Overview setting indicates why a setting is not shown in the sidebar even if it is selected. +Make multiple settings visible at once. The Visibility Overview setting indicates why a setting is not shown in the sidebar even if it is enabled. *Improved time estimation -Time estimations are more accurate. Based on our test time estimations should be within 5% accuracy. +Time estimations are more accurate. Based on our test time estimations should be within 5% accuracy for Ultimaker printers. *Optional G-code Machine Prefix Disable the g-code prefix in Preferences. No more UM2_ on your printer display! @@ -36,10 +36,10 @@ Configurations from older installations of Cura 2.1 are automatically imported i *Slicing features *Infill Improvements -We've introduced two new infill types: Tetrahedral and Cubic. They change along with the Z-axis for more uniform strength in all directions. Also, now you can change the density of the infill based on the distance from the top layers. You print get faster, use less material, and maintain the same object strength. +We've introduced two new infill types: Tetrahedral and Cubic. They change along with the Z-axis for more uniform strength in all directions. Also, now you can change the density of the infill based on the distance from the top layers. Your objects print faster, use less material, and maintain the same strength. *Set Acceleration and Jerk by Feature -You can now set Jerk and Acceleration by feature, (infill, walls, top/bottom, etc) for more precision. +You can now set Jerk and Acceleration by feature-type (infill, walls, top/bottom, etc), for more precision. *Outer Wall Offset Apply an offset to where the outer wall is printed for better surface quality when the outer wall line width is smaller than the nozzle size. @@ -56,8 +56,8 @@ The Skin Overlap setting allows you to overlap the skin lines with the walls for *Control Initial Layer Travel Speed Set the travel speed of the initial layer(s) to reduce risk of extruder pulling the print from the bed. -*Support Bottoms -This new feature duplicates the Support Roofs feature in the places where the support rests on the model. +*Support Interface +It is now possible to print a support bottom as well as a support roof. Support bottoms are placed where the support rests on the model. *Bug fixes & minor changes Deleting grouped objects works as intended again. @@ -81,7 +81,7 @@ Brim is now always printed just once. Overlap Compensation works as intended again. A raft now produces a reasonable amount of retractions. No more string plume on top of one-at-a-time printed objects. -Engine log can be viewed even when slicing is finished. +Engine log is now included in the application log. Support roofs now only occur just below overhang. Brim is now also generated under the support. Compensate overlapping wall parts now also works for inner walls. @@ -89,9 +89,10 @@ Bed Level and Checkup procedures for UMO+ can now be done without re-adding mach Undo and Redo now work correctly with multiple operations. The last used folder is now remembered (instead of defaulting to home folder) You can now adjust the speed at which the bed is lowered each layer. -Support roofs now only generate directly below the mesh. Settings shared between skirt and brim now also activate when brim is selected. Made it possible to add multiple Per Model Settings at once. +Support doesn't remove brim around the object any more. +Draft shield and Ooze shield get their own brim or raft. [2.1.3] From fd5b512554179945a97cc01522e1c1d0fc0e41cf Mon Sep 17 00:00:00 2001 From: fieldOfView Date: Sat, 8 Oct 2016 11:54:44 +0200 Subject: [PATCH 16/20] Hide incompatible material message when a compatible material is chosen CURA-2271 --- cura/Settings/MachineManager.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/cura/Settings/MachineManager.py b/cura/Settings/MachineManager.py index 195679e2e3..8f7f311f47 100644 --- a/cura/Settings/MachineManager.py +++ b/cura/Settings/MachineManager.py @@ -72,6 +72,9 @@ class MachineManager(QObject): self._auto_materials_changed = {} self._auto_hotends_changed = {} + self._material_incompatible_message = Message(catalog.i18nc("@info:status", + "The selected material is imcompatible with the selected machine or configuration.")) + globalContainerChanged = pyqtSignal() # Emitted whenever the global stack is changed (ie: when changing between printers, changing a global profile, but not when changing a value) activeMaterialChanged = pyqtSignal() activeVariantChanged = pyqtSignal() @@ -549,9 +552,9 @@ class MachineManager(QObject): material_container.nameChanged.connect(self._onMaterialNameChanged) if material_container.getMetaDataEntry("compatible") == False: - message = Message(catalog.i18nc("@info:status", - "The selected material is imcompatible with the selected machine or configuration.")) - message.show() + self._material_incompatible_message.show() + else: + self._material_incompatible_message.hide() new_quality_id = old_quality.getId() quality_type = old_quality.getMetaDataEntry("quality_type") From 5d3d13e9efe0020ddbbd0e5e6d6fca887b9837b0 Mon Sep 17 00:00:00 2001 From: fieldOfView Date: Sat, 8 Oct 2016 14:52:39 +0200 Subject: [PATCH 17/20] Make whole row for user & quality_changes values italic The italic pattern is now shared between the sidebar and the profile overview. Current settings (user) and the values set in the custom profile (quality_changes) are now made italic in both places. --- resources/qml/Preferences/ProfileTab.qml | 35 +++++++++++++++--------- 1 file changed, 22 insertions(+), 13 deletions(-) diff --git a/resources/qml/Preferences/ProfileTab.qml b/resources/qml/Preferences/ProfileTab.qml index 4a7192d4a7..1bfd8156a4 100644 --- a/resources/qml/Preferences/ProfileTab.qml +++ b/resources/qml/Preferences/ProfileTab.qml @@ -21,18 +21,11 @@ Tab anchors.fill: parent anchors.margins: UM.Theme.getSize("default_margin").width - TableViewColumn + Component { - role: "label" - title: catalog.i18nc("@title:column", "Setting") - width: parent.width * 0.4 - } - TableViewColumn - { - role: "profile_value" - title: catalog.i18nc("@title:column", "Profile") - width: parent.width * 0.18 - delegate: Rectangle + id: itemDelegate + + Rectangle { property var setting: qualitySettings.getItem(styleData.row) height: childrenRect.height @@ -44,14 +37,28 @@ Tab anchors.leftMargin: UM.Theme.getSize("default_margin").width anchors.right: parent.right text: styleData.value - font.weight: (setting.profile_value_source == "quality_changes") ? Font.Bold : Font.Normal - font.strikeout: quality == Cura.MachineManager.activeQualityId && setting.user_value != "" + font.strikeout: styleData.column == 1 && quality == Cura.MachineManager.activeQualityId && setting.user_value != "" + font.italic: setting.profile_value_source == "quality_changes" || (quality == Cura.MachineManager.activeQualityId && setting.user_value != "") opacity: font.strikeout ? 0.5 : 1 color: styleData.textColor elide: Text.ElideRight } } + } + TableViewColumn + { + role: "label" + title: catalog.i18nc("@title:column", "Setting") + width: parent.width * 0.4 + delegate: itemDelegate + } + TableViewColumn + { + role: "profile_value" + title: catalog.i18nc("@title:column", "Profile") + width: parent.width * 0.18 + delegate: itemDelegate } TableViewColumn { @@ -59,12 +66,14 @@ Tab title: catalog.i18nc("@title:column", "Current"); visible: quality == Cura.MachineManager.activeQualityId width: parent.width * 0.18 + delegate: itemDelegate } TableViewColumn { role: "unit" title: catalog.i18nc("@title:column", "Unit") width: parent.width * 0.14 + delegate: itemDelegate } section.property: "category" From 6bea0ad7b4e317adb8b9489bc6dc2a5560650a59 Mon Sep 17 00:00:00 2001 From: fieldOfView Date: Sat, 8 Oct 2016 15:14:11 +0200 Subject: [PATCH 18/20] Select the currently active extruder on the profiles tab --- resources/qml/Preferences/ProfilesPage.qml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/resources/qml/Preferences/ProfilesPage.qml b/resources/qml/Preferences/ProfilesPage.qml index 1c15e9aafc..42c055486a 100644 --- a/resources/qml/Preferences/ProfilesPage.qml +++ b/resources/qml/Preferences/ProfilesPage.qml @@ -208,6 +208,8 @@ UM.ManagementPage anchors.right: parent.right anchors.bottom: parent.bottom + currentIndex: ExtruderManager.activeExtruderIndex + 1; + ProfileTab { title: catalog.i18nc("@title:tab", "Global Settings"); From 90c3a09bc013805c48cfd0bc7eacc68efaf9d8ab Mon Sep 17 00:00:00 2001 From: fieldOfView Date: Sat, 8 Oct 2016 15:15:12 +0200 Subject: [PATCH 19/20] Add tooltip for formulas on profile overview tabs --- resources/qml/Preferences/ProfileTab.qml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/resources/qml/Preferences/ProfileTab.qml b/resources/qml/Preferences/ProfileTab.qml index 1bfd8156a4..3fd4ca6a5a 100644 --- a/resources/qml/Preferences/ProfileTab.qml +++ b/resources/qml/Preferences/ProfileTab.qml @@ -25,12 +25,13 @@ Tab { id: itemDelegate - Rectangle + UM.TooltipArea { property var setting: qualitySettings.getItem(styleData.row) height: childrenRect.height - color: "transparent" width: (parent != null) ? parent.width : 0 + text: (styleData.value.substr(0,1) == "=") ? styleData.value : "" + Label { anchors.left: parent.left From 608248bec825639d16d0c49029bfc14870d31a5e Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Sat, 8 Oct 2016 17:14:24 +0200 Subject: [PATCH 20/20] Fix display of inherited materials Materials are sometimes inherited, such as for UM2E+. The activeQualityDefinitionId is the definition from which it should get its profiles, including material profiles. Likewise for activeQualityVariantId. Contributes to issue CURA-2576. --- resources/qml/Preferences/MaterialsPage.qml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/resources/qml/Preferences/MaterialsPage.qml b/resources/qml/Preferences/MaterialsPage.qml index b3aa3c96a0..8ba26b6ac3 100644 --- a/resources/qml/Preferences/MaterialsPage.qml +++ b/resources/qml/Preferences/MaterialsPage.qml @@ -1,5 +1,5 @@ // Copyright (c) 2016 Ultimaker B.V. -// Uranium is released under the terms of the AGPLv3 or higher. +// Cura is released under the terms of the AGPLv3 or higher. import QtQuick 2.1 import QtQuick.Controls 1.1 @@ -21,10 +21,10 @@ UM.ManagementPage var result = { "type": "material" } if(Cura.MachineManager.filterMaterialsByMachine) { - result.definition = Cura.MachineManager.activeDefinitionId + result.definition = Cura.MachineManager.activeQualityDefinitionId; if(Cura.MachineManager.hasVariants) { - result.variant = Cura.MachineManager.activeVariantId + result.variant = Cura.MachineManager.activeQualityVariantId; } } else