28 Commits

Author SHA1 Message Date
Ghostkeeper
606bef9b5f
Use ContainerTree structure to get quality groups
Contributes to issue CURA-6600.
2019-08-15 17:01:23 +02:00
Jaime van Kessel
e18820b846 Fix tests for ContainerManager
CURA-6600
2019-08-12 15:37:19 +02:00
Lipu Fei
8863516aa4 Rename function name and fix tests
CURA-6597
2019-07-09 12:53:44 +02:00
Lipu Fei
f086c1eb11 Minor cleanup changes
CURA-6597
2019-07-09 11:57:46 +02:00
Ghostkeeper
3729e90b24
Fix getting original intent category
It's now a property so it doesn't need the brackets.

Contributes to issue CURA-6597.
2019-07-05 13:06:27 +02:00
Ghostkeeper
fd32abd53c
Add property for currently selected intent
This is necessary for the interface to highlight the correct bullet or the correct menu item.

Contributes to issue CURA-6597.
2019-07-04 11:10:06 +02:00
Ghostkeeper
926df1111b
Iterate over all extruder stacks rather than just the used ones
Otherwise it usually only iterates over the one that the model is printing with or something. We want to iterate over all extruders that are not deactivated.

Contributes to issue CURA-6597.
2019-07-04 11:06:47 +02:00
Ghostkeeper
c2b20e5cc6
Only return intents from intentMetadatas
Otherwise we also get quality profiles for the same printer...

Contributes to issue CURA-6597.
2019-07-04 09:43:25 +02:00
Ghostkeeper
3cce33be6f
Get intents for every active extruder, not every used extruder
We want the intents for basically any extruder, not just the one that would get used by a slice using the current settings for extruder_nr.

Contributes to issue CURA-6597.
2019-07-04 09:14:06 +02:00
Ghostkeeper
951b91e3d8
Filter on 'material' metadata instead of material_id
This is consistent with how the material is stored in other profiles, such as quality profiles.

Contributes to issue CURA-6597.
2019-07-04 09:09:22 +02:00
Ghostkeeper
c75b83be21
Resolve circular imports
Can't import CuraApplication because we create instances of IntentManager from the IntentsModel which is created in CuraApplication.

Contributes to issue CURA-6597.
2019-07-04 09:08:15 +02:00
Remco Burema
270cf28ea1 Fix comments code review IntentManager.
part of CURA-6091
2019-07-02 14:43:56 +02:00
Remco Burema
810fee37eb Start to test other IntentManager functions.
Very rudimentary at the moment, need to split the method into 3, and make a class for the setup.
This also uncovered that the currentAvailableIntents doesn't (unless the global stack is missing) retrun any default intents, while currentAvailableIntentCategories does do that.
Since it's not clear how we're going to handle that right now, I made a TODO in the code, which of course will have to be fixed before this/these branch/es are merged.

part of CURA-6091
2019-06-28 12:10:39 +02:00
Remco Burema
e8a1c68d92 Added (partial) test for 'currentAvailableIntents'.
part of CURA-6091
2019-06-27 17:07:26 +02:00
Remco Burema
9e3f3c194c Small refactor: Dont retrieve global-stack twice.
Part of CURA-6091
2019-06-25 18:00:58 +02:00
Remco Burema
308fcb6b9f Fix typing for IntentManager
Part of CURA-6091.
2019-06-21 15:39:27 +02:00
Remco Burema
f03c239041 Update some documentation. [CURA-6091] 2019-06-20 17:57:15 +02:00
Remco Burema
d076bfae77 Merge branch 'feature_intent_per_quality' of https://github.com/Ultimaker/Cura into feature_intent_per_quality 2019-06-20 17:49:41 +02:00
Remco Burema
fd80a6c1b6 Change some leftover pseudo-code to real code.
Part of CURA-6091.
2019-06-20 17:48:52 +02:00
Ghostkeeper
ede6efb799
Missing documentation
Contributes to issue CURA-6091.
2019-06-20 16:09:56 +02:00
Ghostkeeper
96c111553a
Implement selectDefaultIntent
Bit of a weird one.

Contributes to issue CURA-6091.
2019-06-20 15:30:57 +02:00
Ghostkeeper
aa0bf2f6ba
Implement selectIntent
Selects a certain intent profile, applying it to the stack.

Contributes to issue CURA-6091.
2019-06-20 15:27:07 +02:00
Ghostkeeper
744fbec38c
Implement defaultIntent
We keep this function in as a way of documentation.

Contributes to issue CURA-6091.
2019-06-20 15:12:53 +02:00
Ghostkeeper
2b775497b5
Implement complete code for currentAvailableIntentCategories
There is an inconsistency here with the available quality types. It's documented in the function for now.

Contributes to issue CURA-6091.
2019-06-20 15:06:24 +02:00
Ghostkeeper
28e2569c86
Implement complete code for currentAvailableIntents
Slightly more complex than the original pseudocode was indicating: It needs to filter on the available quality types first in order to only show the quality types that can be printed with all extruders, but still show the union of all intents for those quality types.

Contributes to issue CURA-6091.
2019-06-20 14:48:18 +02:00
Ghostkeeper
c83b9d158b
Final implementation of intentMetadatas and intentCategories
Instead of pseudocode.

Contributes to issue CURA-6091.
2019-06-20 14:02:34 +02:00
Ghostkeeper
64e3a99ad3
Also select correct quality level on the stack when changing intent
Contributes to issue CURA-6091.
2019-06-19 16:52:54 +02:00
Ghostkeeper
fa65875824
Add psuedocode/boilerplate for intent manager
This won't run. Don't try to import this class yet. It's outlining what we need to implement to get intents per stack.

It does no form of caching at this point. Build first, optimise later, right.

Contributes to issue CURA-6091.
2019-06-19 14:29:19 +02:00