248 Commits

Author SHA1 Message Date
Jaime van Kessel
1ada1b04df
Remove unneeded whitespace
Boyscouting CURA-10342
2023-02-28 10:35:02 +01:00
Joey de l'Arago
1e6184448c
Apply suggestions from code review
Co-authored-by: Casper Lamboo <c.lamboo@ultimaker.com>
Co-authored-by: Jelle Spijker <j.spijker@ultimaker.com>
2022-12-12 11:44:21 +01:00
Joey de l'Arago
e6f4055df5 Remove part of hack for fixing extrudersCHanged signal at the wrong time.
Other things rely on the extruders changed signal so it is better to just emit it again at the correct time.

CURA-9793
2022-12-08 13:11:14 +01:00
Joey de l'Arago
bcdfa808a8 Switch to checking enabled extruder count for showing print with Component. This is because we want the SingleSettingExtruderBar to be hidden when there are 1 or less extruders, but also when there are 1 or less enabled extruders.
CURA-9793
2022-12-07 17:33:13 +01:00
Joey de l'Arago
443252ae10 Use globalStackExtruderIds instead of extruderIds. extruderIds notifys change before the extruders change when doing a machine swap. Fixing this will take a long time so this is a workaround. If you are reading this 🙏 good luck fixing it 🙏
CURA-9793
2022-12-07 16:57:35 +01:00
Joey de l'Arago
d8cf234a17 Use different signal for triggering update to extrduderIds. **This is a hack**. Actually fixing this problem could take days.
CURA-9793
2022-12-07 12:25:33 +01:00
Joey de l'Arago
3ddebe7a84 The extrudersCHanged signal was incorrectly being emitted before the global stack had updated. This was causing the extruderIds to always return the old extruderIds to connected qml components.
The setting slider was incorrectly setting the slider value when updating the model.

CURA-9793
2022-12-06 10:37:06 +01:00
Remco Burema
ab51bd699e Merge branch 'main' into brim_per_material_optimized_order 2022-10-25 17:31:13 +02:00
Ghostkeeper
d6bd7cce9e
Oops 2022-05-31 13:39:47 +02:00
Ghostkeeper
35147d7f5e
Don't crash if machine_extruder_trains metadata is missing
This old function is only necessary for upgrading from before v3.4. Best not let it crash in any other case, even if that would sometimes make very old machine instances corrupt if I made a mistake in thinking here.

Fixes Sentry issue CURA-3XG.
2022-05-31 11:24:08 +02:00
Tim Kuipers
33e3a45b5c fixes for optional skirt_brim_extruder_nr 2022-03-16 11:31:40 +01:00
Tim Kuipers
2698cd76c5 make skirt_brim_extruder_nr an optional_extruder to allow for the brim_per_material feature 2022-03-16 11:31:40 +01:00
Ghostkeeper
c7d7dd11d1
Merge branch 'master' into PyQt6_upgrade
Conflicts:
	cura/PlatformPhysics.py -> Removed shapely on master, while QTimer import got updated to Qt6.
	plugins/Toolbox -> Entire folder is deleted in master, but it was updated to Qt6 here. This can all be removed.
2022-02-21 11:52:28 +01:00
Ghostkeeper
3534894eeb
Don't mark interface extruder as used when there are none
If there are 0 interface layers, the extruder doesn't necessarily gets used.

Contributes to issue CURA-8915.
2022-02-03 15:59:21 +01:00
Ghostkeeper
403d92a760
Fix getting used and starting extruders with new adhesion extruder settings
Getting more involved than I thought. But it's not complex yet.

Contributes to issue CURA-8868.
2022-01-12 14:29:01 +01:00
Ghostkeeper
ab0c03cf65
Catch KeyError['empty_material'] when evaluating whether there's any profiles
This is currently only used in the pre-read of workspaces. In some cases, the project file may have a material that is not compatible with its own stack using the current rules in Cura, either because the rules changed or because the project file is wrongly crafted/edited. This causes Cura to say there are no quality profiles if the material profile is not compatible with the printer, preventing a crash due to the KeyError.
2022-01-05 10:26:28 +01:00
Remco Burema
6586bcc762
Qt5->Qt6: Fix cause of stack-overflow errors for newer Python/Qt.
part of CURA-8591
2021-12-29 09:23:11 +01:00
Remco Burema
abe7c1bf7f
Search/replace Qt5->Qt6.
part of upgrading Qt to v6.2: CURA-8591
2021-12-28 14:46:02 +01:00
fieldOfView
0c668053e5 Add warning icon to show which extruder makes the configuration Not Supported 2020-11-12 14:04:58 +01:00
Nino van Hooff
649cc4a881 Replace support_tree_enable by a support_structure enum
CURA-6711
2020-07-09 17:17:40 +02:00
Jaime van Kessel
68807d99d2
Fix issue that no disallowed areas were show if there were no active objects
CURA-7106
2020-06-24 15:18:20 +02:00
Jaime van Kessel
7e8e051eb2
Short circuit finding the extruders that are active
CURA-7106
2020-06-23 13:38:00 +02:00
Jaime van Kessel
f9b288f3c6
Move checking for some global features outside of the per node loop
CURA-7106
2020-06-23 13:24:22 +02:00
Jaime van Kessel
1f698fd664
Further simplify the getUsedExtruderStacks function
Should be a tiny bit faster

CURA-7106
2020-06-23 13:13:49 +02:00
Jaime van Kessel
1d9c92c47f
Use cached values for anti overhang and support mesh
CURA-7106
2020-06-23 13:08:03 +02:00
Kostas Karmas
8c6a7d3098 Remove definitionChanges before removing a printer
When removing a printer, the files in %appdata%/cura/<version>/
/definition_changes/ remained intact. This commit fixes that by
making sure that the definitionChanges are removed before removing
the machine.
2020-06-09 15:56:13 +02:00
Nino van Hooff
58ffc9dcae Merge remote-tracking branch 'origin/master' into doxygen_to_restructuredtext_comments
# Conflicts:
#	cura/API/__init__.py
#	cura/Settings/CuraContainerRegistry.py
#	cura/Settings/ExtruderManager.py
#	plugins/PostProcessingPlugin/scripts/PauseAtHeight.py
#	plugins/UM3NetworkPrinting/src/Cloud/CloudApiClient.py
#	plugins/UM3NetworkPrinting/src/Cloud/ToolPathUploader.py
#	plugins/UM3NetworkPrinting/src/Network/LocalClusterOutputDeviceManager.py
2020-05-28 17:31:24 +02:00
Nino van Hooff
c2c96faf5f Convert remaining doxygen to rst 2020-05-28 17:13:44 +02:00
Ghostkeeper
b231a4b3a2
Remove unnecessary re-adding of extruders
This was originally added for backwards compatibility with old versions of Uranium. However the link between Cura versions and Uranium versions is already very strong (Cura crashes with old Uranium versions) so this is not necessary.
It was also adding warnings in our log that these extruders had already been added to the printer.

Done during Turbo Testing and Tooling, to clean up our log files.
2020-05-15 14:26:44 +02:00
Ghostkeeper
3d399672d0
Select default extruder if a setting has an extruder nr that's not available
Fixes Sentry issue CURA-G2.
2020-04-07 13:45:41 +02:00
Ghostkeeper
d18c0703b4
Fix getting correct initial extruder number
As found in the discussion in #6847.

This was done as a 5 minute fix.
2020-01-16 13:59:02 +01:00
Jaime van Kessel
00078fd659
Remove a bunch of unused imports 2019-11-08 13:38:42 +01:00
ninovanhooff
b9b086a8c0
Merge pull request #6542 from Ultimaker/CURA-6793_performance
Performance improvements
2019-10-23 16:50:04 +02:00
Lipu Fei
7544d049c5 Remove deprecated ExtruderManager.getExtruderName
CURA-6858
2019-10-22 14:11:40 +02:00
Ghostkeeper
0238f65e6a
Remove double call of _onGlobalContainerChanged and activeExtruderChanged on switching
When switching printers, it would first emit the global container changed signal which connects to _onGlobalContainerChanged, then update stuff in the extruder manager, then manually call _onGlobalContainerChanged again to update some other stuff with the new data from the extruder manager. This was prohibitively expensive, so this prevents that.
Another double or triple emit of the activeExtruderChanged was removed in the extruder manager when creating the extruders for a printer: It would first set the extruder number to 0, possibly emitting the signal, then emit the signal just to be sure since the extruder itself changed (rather than just the number), and then change the extruder number to the preferred extruder, possibly again emitting a signal. Now it just sets the extruder number to the preferred extruder and always emits the signal once (either through setting the extruder number or manually afterwards).

Contributes to issue CURA-6793.
2019-10-08 16:32:20 +02:00
Ghostkeeper
dd8ee2e3d8
Switch early fail around to reduce indentation
Makes this more readable.

Contributes to issue CURA-6793.
2019-10-08 15:22:12 +02:00
Ghostkeeper
b137e6a36d
Don't add extruders twice upon start-up
The extruders are added when changing printers anyway, and we call this change signal upon start-up. So one of them is going to do unnecessary work.

Contributes to issue CURA-6793.
2019-10-08 15:21:19 +02:00
Jaime van Kessel
0ff9d72c4c
Remove use of deprecated extruders property 2019-09-13 17:27:16 +02:00
Lipu Fei
c841382bbd Add more info in exceptions 2019-08-02 11:12:16 +02:00
Jaime van Kessel
d8ddcba091 Fix typing ignore for breath frist iterator 2019-07-23 13:40:40 +02:00
Jaime van Kessel
9ceb9ce18b Fix typing issues
They were caused by upgrading to a higher mypy version, which found more mistakes
2019-07-23 12:58:46 +02:00
Jaime van Kessel
1c93dffc22 Added deprecation warning to getExtruderName 2019-07-19 13:36:53 +02:00
Jaime van Kessel
f329d7aed9 Made typing hint a bit more specific 2019-06-28 15:08:46 +02:00
Jaime van Kessel
1759e01b27 Make _geSettingFromAllExtruders use zip
This is a bit cleaner to use
2019-06-07 13:40:41 +02:00
Jaime van Kessel
915e0e2047 Only add extrudernr to used extruders if it actually exists
This can cause issues when a profile got messed up (especially when using profiles between different custom machines)
2019-05-16 15:41:52 +02:00
Ghostkeeper
8c5f871185
Also omit support meshes from used extruders list
Their own extruder doesn't get used necessarily, because these meshes are then printed using the support extruder.

Contributes to issue CURA-6440.
2019-04-04 16:35:48 +02:00
Lipu Fei
8da1f8fa7d Exclude support blockers in used extruders
CURA-6440
2019-04-02 14:16:57 +02:00
Ghostkeeper
1d25f52df6
Merge branch '4.0' 2019-03-06 15:23:55 +01:00
Jaime van Kessel
91cceea6e0 Fix the situation where an upgraded single extrusion machine and loading project caused issues
If the upgraded single extrusion machine was never activated, it would not have it's extruders set.

CURA-6252
2019-02-28 16:17:34 +01:00
Remco Burema
f1b6e527be Rectified wrong placement of brackets causing logic change. [CURA-5864] 2019-02-14 14:55:12 +01:00