Commit graph

2269 commits

Author SHA1 Message Date
Kostas Karmas
1a759f81df Change print sequence when the number of enabled extruders changes
Fixes https://github.com/Ultimaker/Cura/issues/8682 while still maintaining the correct behavior for CURA-6914.

CURA-7827
2020-11-05 16:58:47 +01:00
Ghostkeeper
31ee864f04
Disallow printer names that start with a dot
Fixes #8639.
2020-10-30 11:10:46 +01:00
Konstantinos Karmas
4e6097f499
Revert "Prevent duplicate adding of extruders" 2020-10-27 11:29:08 +01:00
Ghostkeeper
5cfe18d31c
Clarify user-facing string to remove internal terminology
The user doesn't know what a global stack is. This is a message that more clearly specifies what is really happening as far as the user can see.

The global stack may be None if this code is executed while there is no active printer. Normally the only time there is no active printer is:
- during first launch, while in the welcome screen
- during start-up until the profiles have been loaded
- if there was a profile corruption of some kind with the active printer.

So this function should not get called during those times. It probably isn't called except for the last case (in which case it's acceptable I guess).
This change is made after a request from a translator what the hell this means.

Contributes to issue CURA-7783.
2020-10-27 10:54:07 +01:00
Konstantinos Karmas
4804072625
Merge pull request #8553 from Ultimaker/CURA-7501_no_double_adding_extruders
Prevent duplicate adding of extruders
2020-10-26 17:02:51 +01:00
Ghostkeeper
4b3fda21e2
Prevent duplicate adding of extruders
The addMachineExtruders function assumes that this is a new printer (first time the printer is activated since a restart of Cura) and it needs to add the extruder stacks to it. However most of the time when we're switching, it's not to a new printer. If it's not a new printer, this function would get called anyway and we'd be adding the extruders multiple times. This then does a lot of unnecessary work and eventually fails a couple of calls deep.
This change prevents it from adding the extruders if there are already extruders associated with the printer, thus preventing this unnecessary work (switch is faster) and preventing the error from happening.

Discovered during work on CURA-7501.
2020-10-16 16:09:37 +02:00
Jaime van Kessel
50ae33c42d
Force an re-evaluation of a setting when extruder has been disabled
CURA-7770
2020-10-16 10:50:05 +02:00
Kostas Karmas
f25bfd717e Recalculate the number of user settings after setting the quality group
So that the dialog ensures actually knows that there are no changed settings and will not show up.

CURA-7728
2020-10-06 09:55:11 +02:00
Jaime van Kessel
dd359da1cf
Prevent crash when material is unknown
Fixes CURA-GV
2020-09-16 16:37:09 +02:00
Remco Burema
3fcd7d567f
Show warning icon on import non-visible profile.
part of CURA-7691
2020-09-16 08:26:41 +02:00
Kostas Karmas
0524e8d129 Fix missing quality profile when message says its successful
Make sure to add the container before doing any other checks. Then, if the importing fails, remove
all the profiles related to that quality.

CURA-7691
2020-09-11 11:35:39 +02:00
Kostas Karmas
665496ceff Warn when importing quality profiles that don't match the current configuration
When importing a profile that doesn't much the current nozzle combination (e.g. importing a 'high'
quality when we have AA0.8 and AA0.4 nozzles), the profile was being accepted and a success message
was shown to the user, but the quality did not show up in the profile list.

This commit fixes that by accepting the quality profile and informing the user that the profile is
not visible due to the current configuration.

CURA-7691
2020-09-10 16:58:30 +02:00
Jelle Spijker
0725bdcd64
Merge pull request #8335
Speed up disable extruder
2020-09-09 09:42:36 +02:00
Ghostkeeper
6e2738a254
Don't update extruders that Cura doesn't have
This is a bit of defensive coding. If the position is out of bounds for Cura it should now ignore those extruders.
This could be due to broken firmware, or maybe someone MITM-ing the connection and changing it, or perhaps because the printer was changed while the sync was ongoing? Whatever the cause, it now puts a warning in the log about it and doesn't crash any more.

Fixes Sentry issue CURA-156.
2020-09-08 12:53:30 +02:00
Jaime van Kessel
175244fdc8
No longer spam the GUI with hasUserSettingsUpdates
The QML profiler showed me that it was causing a *lot* of issues
when switching between extruders. More than 10% of the time in QML
was spent on just updating ine property in the workspace summary dialog.
There were other properties that were also being updated without there being a point.

Contributes to #8250
2020-09-04 17:23:52 +02:00
Jaime van Kessel
6dbdee8d98
Don't switch away from disabled extruder
In some situations this could cause a slowdown, since halfway through
calculating the values the extruder switch would happen. If this is
split up a bit, it's at least less noticeable

Contributes to #8250
2020-09-04 16:43:53 +02:00
Jaime van Kessel
c383fe9656
Don't force an update when disabling an extruder
All the settings that are changed get a notification from the settingRelation.
There should be no need to re-fire all of those settings again!

Contributes to #8250
2020-09-04 16:39:06 +02:00
Jaime van Kessel
8ecdce3b26
Remove postponeEmit that didn't do anything
The signals it was postponing weren't ever being triggered
2020-09-04 16:38:15 +02:00
Jaime van Kessel
1097dbdfa5
Fix copypaste mistake 2020-08-24 10:11:49 +02:00
Jaime van Kessel
13600504d4
Fix mypy failure 2020-08-24 09:33:56 +02:00
Jaime van Kessel
87fb495e07
Add some property tests for MachineManager 2020-08-21 16:36:04 +02:00
Jaime van Kessel
4a47606176
Fix mypy issue 2020-08-21 15:52:13 +02:00
Jaime van Kessel
ce930220e9
Add tests for SetActiveMachine 2020-08-21 15:14:44 +02:00
Jelle Spijker
b685da5a24
Merge pull request #8195 from Ultimaker/GetPropertySpeedImprovements
Get property speed improvements
2020-08-19 16:41:26 +02:00
Jaime van Kessel
907caa53f0
Ensure that changing material type results in profile re-evaluation
CURA-7657
2020-08-18 13:54:21 +02:00
Jaime van Kessel
bc67b057ea
Add missing required typing 2020-08-14 15:19:59 +02:00
Jaime van Kessel
eee84a82bf
Use exception instead of check if key is in dict
Since the amount of times that the key is in there is orders of magnitude
larger, it's better to catch the exception when it doesn't (as that is
slightly faster)
2020-08-14 15:15:33 +02:00
Jaime van Kessel
9c904f95ce
Add a cache for settable_per_extruder property 2020-08-14 14:51:46 +02:00
Jaime van Kessel
51737dccd6
Don't create a context when it's not provided
The rest of the functions already assume that None is an empty context
2020-08-14 14:19:19 +02:00
Jaime van Kessel
4c00a8ff2c
Add extra short-circuit for resolve 2020-08-14 13:57:09 +02:00
Jaime van Kessel
9a0264644b
Simplify the _shouldResolve function
This increases the speed of the setting resolvement.
2020-08-14 13:41:20 +02:00
Jaime van Kessel
dd42c87da7
Merge branch 'CURA-7646_Settings_not_applied_when_creating_new_CFFF_from_project_file' of github.com:Ultimaker/Cura into 4.7 2020-08-12 13:42:14 +02:00
Jaime van Kessel
e42369179f
Merge branch '4.7' of github.com:Ultimaker/Cura into 4.7 2020-08-11 11:38:31 +02:00
Kostas Karmas
61cc8c9a95 Remove reference to JIRA ticket in comments
CURA-7646
2020-08-10 14:58:59 +02:00
Kostas Karmas
2828f45e89 Add optional machine_extruder_count when creating a machine
If the machine_extruder_count is not taken into consideration on machine creation, calling the
extruderList of that machine will return an incomplete list of extruders (since it considers the
default machine_extruder_count). This causes problems in machines with settable number of extruders
where the default machine_extruder_count is 1 while the machine may have more than 1 extruders.

The problem becomes especially visible when opening a project file with e.g. a CFFF with multiple
extruders, because when the machine is created we do not know yet how many extruders the printer
actually has.

CURA-7646
2020-08-10 14:49:41 +02:00
Ghostkeeper
e7d95f6d90
Give an error message when stack fails to build
This way we may venture at a reason why it failed to build.
2020-08-10 11:26:09 +02:00
Jaime van Kessel
724498cba7
Reset quality if none was found
CURA-7589
2020-08-06 17:12:14 +02:00
Jaime van Kessel
f9c6bbb092
Fix strict noneCHeck mypy issue 2020-07-29 12:24:38 +02:00
Jaime van Kessel
fb2f40fba7
Add missing typing 2020-07-29 12:12:54 +02:00
Jaime van Kessel
65377770c4
Remove invalid quality_changes from the container registry
Fixes CURA-3T
2020-07-29 12:03:03 +02:00
Jaime van Kessel
6934e9521f
Make sure that loading an invalid container gets handled correctly
Previously it would still add them, which caused issues.
2020-07-29 11:08:10 +02:00
Nino van Hooff
649cc4a881 Replace support_tree_enable by a support_structure enum
CURA-6711
2020-07-09 17:17:40 +02:00
Konstantinos Karmas
c6fd25e7e9
Merge pull request #7971 from Ultimaker/CURA-7106-Speedup-multiple-objects-on-build-plate
CURA-7106 Speedup multiple objects on build plate
2020-06-29 12:36:02 +02:00
Ghostkeeper
ffac9adb96
Add default for extruder position
The position argument metadata always be there. However if it's not (because the file is old, or manually modified, or a version upgrade worked incorrectly, or whatever) then we shouldn't crash. We just don't know how to order it correctly then. This tries to repair it as best it can.
2020-06-25 15:08:08 +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
Jaime van Kessel
1dc688dd4a
Prevent double updateNextStack during deepcopy
CURA-7106
2020-06-23 11:40:52 +02:00