Commit graph

22028 commits

Author SHA1 Message Date
Ghostkeeper
6f67e6b55f
Simplify activeQualityType() and remove dependency on _current_quality_group
The shadow administration is annoying so I'm removing it.

Contributes to issue CURA-6600.
2019-08-27 11:16:00 +02:00
Ghostkeeper
84c6ec36dc
Catch case where there is no global stack
Contributes to issue CURA-6600.
2019-08-27 11:14:07 +02:00
Ghostkeeper
78db68369e
Simplify activeQualityOrQualityChangesName
Removed duplicate fallback mechanism if quality is empty. And removed dependency on shadow administration in _current_quality_group.

Contributes to issue CURA-6600.
2019-08-27 11:11:17 +02:00
Ghostkeeper
01796b99cd
Simplify getting layer height
The stack already makes it fall through properly, so there's no need to implement the fallback again here.

The only change is that it now displays 0.1mm as default layer height if there is no quality profile active. I don't think this makes a difference since we don't show the layer height then anyway. And technically it would be more correct too.

Contributes to issue CURA-6600.
2019-08-27 11:06:35 +02:00
Ghostkeeper
0db99e8f21
Get quality groups from container tree
Rather than from the quality manager.

Contributes to issue CURA-6600.
2019-08-27 11:03:46 +02:00
Lipu Fei
69e9dc1313 Allow importing "not supported" profiles
CURA-6542
2019-08-27 09:08:19 +02:00
Ghostkeeper
8f34b3dd73
Set quality profiles to preferred quality upon stack creation
A good default.
Possible bug: If there are multiple matching quality profiles but the preferred quality profiles matches none or multiple of them, a random one is chosen. The random profile for the global stack may not match the random one for the extruder?

Contributes to issue CURA-6600.
2019-08-27 09:07:23 +02:00
Lipu Fei
3853fb6d19 Add UI feedback on invalid firmware update
CURA-6537
2019-08-27 08:52:13 +02:00
Ghostkeeper
fcab800a8d
Add function to find preferred quality profile
Not for global yet, so it doesn't appear as if anything is loaded yet.

Contributes to issue CURA-6600.
2019-08-26 17:50:46 +02:00
Ghostkeeper
557c3d9515
Skip global stacks better
Otherwise it wouldn't skip custom-defined stacks, such as the PPA's stack class.

Contributes to issue CURA-6600.
2019-08-26 17:11:22 +02:00
Ghostkeeper
60939d220b
Log time it takes to add container tree for a printer
It's useful to know, at least while we're building this.

Contributes to issue CURA-6600.
2019-08-26 16:58:13 +02:00
Ghostkeeper
16ee96def9
Fix skipping definition containers when adding new printers
The speed improvement didn't work.
It still doesn't seem to have a lot of effect. Maybe it's not the creating of the tree that causes this slowdown?

Contributes to issue CURA-6600.
2019-08-26 16:30:16 +02:00
Ghostkeeper
be36ae278b
Fix tests mocking container tree instead of quality manager
Contributes to issue CURA-6600.
2019-08-26 16:23:20 +02:00
Ghostkeeper
01c0472872
Don't create container tree for extruder definitions
That wouldn't work properly anyway, but it still took quite a lot of time to create these.

Contributes to issue CURA-6600.
2019-08-26 15:49:52 +02:00
Lipu Fei
946ec1d32e Apply missing metadata fields from project files
CURA-6388
2019-08-26 15:40:34 +02:00
Ghostkeeper
599dcb34bc
Fix sorting qualities by quality type
Otherwise the dictionary ends up being filled by container ID which then causes the quality type to not be present in the dictionary, ending up with an empty list of quality groups.

Contributes to issue CURA-6600.
2019-08-26 15:25:11 +02:00
Ghostkeeper
a90b4cc136
Fix finding global qualities: Metadata is not boolean
It's a string, strangely.

Contributes to issue CURA-6600.
2019-08-26 15:05:01 +02:00
Jaime van Kessel
b20a349b44 Merge branch 'master' of github.com:Ultimaker/Cura 2019-08-26 14:55:59 +02:00
Jaime van Kessel
108b22932b Override saveDirtyContainers with Cura specific logic 2019-08-26 14:55:30 +02:00
Ghostkeeper
af9c5cd55c
Find global qualities for quality_definition as well
We don't have global qualities specific to e.g. the Ultimaker 3 Extended.

Contributes to issue CURA-6600.
2019-08-26 14:47:58 +02:00
Ghostkeeper
3655981c41
Use container tree to get the current printer's quality groups
Contributes to issue CURA-6600.
2019-08-26 14:00:35 +02:00
Ian Paschal
f5af418b03
Merge pull request #6247 from Ultimaker/feature_ms_slots
Support available configurations for network printing
2019-08-26 11:34:06 +02:00
pinchies
15e91bb32a Add JGAurora A3S (#6235)
* Add profile for JGAurora JGMaker Magic

CURA-6734
2019-08-26 10:34:58 +02:00
Ghostkeeper
23f4aa6e4f
Fix potential race condition when slice messages arrive after clearing build plate
Fixes #6245.
2019-08-26 09:15:37 +02:00
trouch
a9fb282a41 add CR-10 Max and Ender-5 Plus definitions 2019-08-25 11:47:38 +02:00
Ghostkeeper
51710c2868
Use new MachineNode.getQualityChangesGroups instead of quality manager
I hope that the machine node doesn't become a collection of functions that don't fit anywhere else, but this isn't contributing to that hope. However I still think that this is particular to a certain printer, so it's within the object-oriented programming paradigm. And it's also within the scope of the class, which is getting the available profiles. So it still sort of fits.

Contributes to issue CURA-6600.
2019-08-23 17:29:32 +02:00
Ghostkeeper
b1ce9b64d4
Add function to construct QualityChangesGroups for machine
It doesn't cache these any more, but reconstructs them when asked for.

Contributes to issue CURA-6600.
2019-08-23 17:26:57 +02:00
Jaime van Kessel
63f9483037 Connect the config changed of the configuration to that of the output model 2019-08-23 17:15:08 +02:00
Ghostkeeper
bcd450daa0
Don't make QualityChangesGroup hold ContainerNodes
It can't hold ContainerNodes since the quality changes are no longer nodes in any tree.

This now makes it hold metadata instead.

Contributes to issue CURA-6600.
2019-08-23 17:11:21 +02:00
ChrisTerBeke
882352c99d Test fixes, not working yet 2019-08-23 17:03:39 +02:00
Ghostkeeper
430bcc90a8
Make QualityChangesGroup depend on intent
This is probably the main implementation of CURA-6600.
2019-08-23 16:44:08 +02:00
ChrisTerBeke
73b423138a Add a test to ensure empty configurations are not shown in the list 2019-08-23 16:35:15 +02:00
ChrisTerBeke
36f6dba2fc Fix not displaying configuration with both extruders empty 2019-08-23 16:23:51 +02:00
Ghostkeeper
1febfde3cc
Fix switching to printers without variant
Since the 'empty_variant' nozzle is now just in the tree, this check is no longer even necessary.

Contributes to issue CURA-6600.
2019-08-23 15:38:58 +02:00
Ghostkeeper
4fb656ea7b
Don't use deprecated Preferences.getInstance()
Contributes to issue CURA-6600.
2019-08-23 14:46:42 +02:00
Ghostkeeper
3de5aa3307
Remove _initMachineState
It seems to only set profiles to whatever was already in the stack.

Contributes to issue CURA-6600.
2019-08-23 14:43:50 +02:00
Ghostkeeper
f1f25e5350
Get Quality Groups from container tree rather than quality manager
The quality manager is deprecated after all.

Contributes to issue CURA-6600.
2019-08-23 14:23:18 +02:00
Ghostkeeper
617419ccc6
Use .container property of nodes to switch profiles
This also fixes a crash when switching nozzles since the variant was set to a list of profiles rather than just one profile.

Contributes to issue CURA-6600.
2019-08-23 13:51:24 +02:00
Ghostkeeper
40b562093d
Don't unnecessarily deprecate the getMetaDataEntry functionality
If possible you should group the metadata queries but otherwise this is still fine to use.

Contributes to issue CURA-6600.
2019-08-23 13:43:30 +02:00
Ghostkeeper
99bf82dee3
Fix displaying list of nozzles
Make it use the ContainerTree structure since the original VariantManager's structure is not populated any more.

Contributes to issue CURA-6600.
2019-08-23 13:22:25 +02:00
ChrisTerBeke
c491d7f3e2 Some reformatting 2019-08-23 10:40:17 +02:00
ChrisTerBeke
d674494cdb Don't look at available configurations when no slots are available 2019-08-23 10:10:44 +02:00
ChrisTerBeke
3578afd4ac
Add support for multiple available configurations via network and cloud 2019-08-22 23:47:07 +02:00
Ghostkeeper
8e06786e7b
Use ContainerTree when updating material upon nozzle switch
Rather than the material manager which is deprecated.

Contributes to issue CURA-6600.
2019-08-22 17:27:39 +02:00
Ghostkeeper
37bd7c6b0e
Always return a MaterialNode from getDefaultMaterial
Its function is, after all, to find the default. It should always have a default. Sometimes that will be the empty material, but so be it.

Contributes to issue CURA-6600.
2019-08-22 17:13:46 +02:00
Ghostkeeper
431c8f4900
Build stack using container tree's preferred material/nozzle
No need to really implement the fallbacks any more for when there are no materials. Only for when the preferred material can't be found.

Contributes to issue CURA-6600.
2019-08-22 17:03:01 +02:00
Ghostkeeper
9bcf2698d5
Log warning when preferred material can't be found
Contributes to issue CURA-6600.
2019-08-22 17:02:09 +02:00
Ghostkeeper
9dca6c0127
Return empty node if preferred node couldn't be found
Or any node, really. There must now always be a subnode.

Contributes to issue CURA-6600.
2019-08-22 16:52:38 +02:00
Ghostkeeper
d06ce211ff
Document new requirement that there must always be one child
Contributes to issue CURA-6600.
2019-08-22 16:47:57 +02:00
Ghostkeeper
46cf7aafa9
Encode empty containers in container tree if necessary
You can now be assured that there is ALWAYS at least one child node, except for child nodes of intent profiles which don't exist.

Contributes to issue CURA-6600.
2019-08-22 16:44:52 +02:00