8174 Commits

Author SHA1 Message Date
Ghostkeeper
9b1941a4a2
Don't crash if there are no visible lines in a polyline 2021-04-03 17:07:01 +02:00
Ghostkeeper
b5bc4aecd5
Reset color scheme limits before every recalculation
This prevents previous measurements from influencing the colour scheme. Essentially previously it was showing the colour scheme based on all lines you had ever seen, rather than just the line types you were currently seeing.
2021-04-03 16:56:36 +02:00
Ghostkeeper
9f902f7a7a
Update colour scheme limits if visibility changed the limits
If the user makes certain structures visible or invisible, and this then causes the limits of the colour scheme to change, this now triggers the layer view to be re-rendered and updates the legend in the simulation view menu component.
2021-04-03 16:49:04 +02:00
Ghostkeeper
424f037dca
Trigger recalculation of colour scheme limits when visibility changes
While it's now correctly triggered to recalculate, it doesn't correctly update yet in the interface. We'll need to resolve that next.
2021-04-03 16:30:10 +02:00
Ghostkeeper
28f8da8f7b
Move calculation of simulation spectrum limits to separate function
This is just a refactor that shouldn't have any influence on the behaviour.
It is a necessary prerequisite to be able to trigger the updating of the layer view colour spectrum more frequently, i.e. if the visible line types change.
2021-04-03 16:16:02 +02:00
Ghostkeeper
8d13cfb5d6
Make limits in colour scheme depend on the visible line types
This way, if travel moves are not currently visible in the layer view, the travel moves don't get counted with the limits to determine the colour spectrum to grade each line with. Quite often, travel moves had a much greater speed than other moves, like 120mm/s instead of the fastest printed line 60mm/s. This caused all of the layer view to be pushed into the lower end of the spectrum. It makes it hard to distinguish the differences in speed and line width because travel moves influence the spectrum so much. This way, the travel moves only influence the spectrum if they are visible. If they are visible, it might be relevant to the user. Otherwise, the user gets the full spectrum to differentiate between all the line widths and speeds.

This currently doesn't update correctly yet. That is something we'll need to fix.
2021-04-03 16:03:20 +02:00
Ghostkeeper
fd6dbd3ede
Draw simulation view lines with a constant colour for the entire line
All of our current layer view colour schemes are properties of a line, not of a vertex. The line has a single feedrate, a single line type, a single layer thickness, a single material colour and a single width. This is even limited by the g-code specification itself, which is unable to represent lines with varying line width. However, we store this information in the vertices, the vertex data being the only data sent to layer view since layer view is sent as polylines to the shader.

This change makes the entire line take on the colour scheme of the vertex where its representative data is stored. This data is intended for the line, not just for that vertex, so it makes sense that the entire line listens to the data of the correct vertex, not just the nearest vertex of the line's endpoint.
2021-04-03 15:40:14 +02:00
jelle Spijker
27fc435724
Bumped up stack version to 5
CURA-8110_upgrader
2021-04-02 15:02:38 +02:00
jelle Spijker
ebc4f45da6
Revert "Removed the upgrader for the machine and extruder stack"
This reverts commit 4707560d
2021-04-02 14:45:16 +02:00
jelle Spijker
72478994ec
Bumped up the Preference version to 7
reverted the SettingVersion to 16

CURA-8110_upgrader
2021-04-02 14:41:52 +02:00
jelle Spijker
4707560dcb
Removed the upgrader for the machine and extruder stack
It is known that will cause some user scripts to default behaviour.
But this is accepted behaviour, and the benefits of not upgrading
the Cura Application version outweigh this.
2021-04-02 14:03:37 +02:00
Jaime van Kessel
67e03e8763
Merge branch '4.9' of github.com:Ultimaker/Cura into CURA-8110_upgrader 2021-04-02 13:48:39 +02:00
jelle Spijker
33e345d1bc
Removed upgrader for instance containers
CURA-8810_version_upgrade
2021-04-02 10:41:14 +02:00
jelle Spijker
5885c5afee
Fixed documentation of upgradeSettingVisibility
CURA-8810_version_upgrade
2021-04-02 09:44:56 +02:00
jelle Spijker
51efeb9767
Upgrade expanded categories as well
CURA-8810_version_upgrade
2021-04-01 16:47:43 +02:00
jelle Spijker
77ea5e5e89
Allow setting visibilities to be upgraded
CURA-8810_version_upgrade
2021-04-01 16:15:47 +02:00
jelle Spijker
85fa07f6dd
Add top_bottom category to visible settings in preference
CURA-8810_version_upgrade
2021-04-01 14:22:32 +02:00
Ghostkeeper
27185c268d
Strip whitespace around package name for display
The actual package name internally will still have the spaces.
People were using this to get ahead in the sorting of packages, which is a little unfair. This doesn't make that impossible, but prevents it for the most part.
2021-03-31 16:10:36 +02:00
jelle Spijker
b05b36ae56
Added the VersionUpgrade48to49 plugin to bundled packages
CURA-8810_version_upgrade
2021-03-31 15:14:18 +02:00
Ghostkeeper
c85cf7b9cb
Add version upgrade plug-in for 4.9
Needed to happen at some point...

Contributes to issue CURA-7787.
2021-03-31 15:08:47 +02:00
Ghostkeeper
0787594a3d
Accept Griffin-style time estimation header
Otherwise it doesn't work for those printers.

Contributes to issue CURA-7787.
2021-03-31 15:08:33 +02:00
Jaime van Kessel
aed653546a
Merge branch 'CURA-8126_Fix_Toolbox_not_closing_instantly_after_quitting' of github.com:Ultimaker/Cura 2021-03-30 14:26:47 +02:00
Kostas Karmas
54b30f20a3 Fix Toolbox window not closing instantly after pressing "Quit Cura"
After installing a package and hitting the "Close Ultimaker Cura" button, the Toolbox window
was remaining open for a few seconds, even though the Cura window was instantly closing.

This is not fixed by explicitly hiding the Toolbox dialog once that button is pressed.

CURA-8126
2021-03-30 11:49:56 +02:00
Kostas Karmas
6abb029afd Fix marketplace button not directing to the web marketplace
We generally disabled the clicks in the mouseArea of the tooltips.
In this case though it should still accept the left click since it acts as a button.

CURA-8125
2021-03-30 11:40:03 +02:00
Kostas Karmas
189d00c3ed Fix toolbox not initializing due to enabledChanged signal
The Connections in qml is a QObject and it has an enabledChanged signal by default.
Therefore, we cannot really use the Connections to connect to the enabledChanged signal of e.g.
a python class, because qml complains that there is already a function named enabledChanged() in
the Connections.

To circumvent that, we can simply rename the enabledChanged() signal of the Toolbox to
toolboxEnabledChanged().
2021-03-30 09:02:56 +02:00
Kostas Karmas
7827b36ab7 Fix QML warnings due to depricated on<signal> calls in Connections
As of 5.12, the signals used in connections should not be declared as on<signal>, but as
function on<signal>(arguments).
2021-03-30 09:02:48 +02:00
pnt103
2ed40fe2c6
Get last position from previous layer instead.
Old code was next-next layer, which is actually the layer _after_ the one that is meant.

Fixes #9430
CURA-8116
2021-03-25 09:19:45 +01:00
Ghostkeeper
91fe9e8ebf
Merge branch 'patch-1' of https://github.com/EGOiST1991/Cura into EGOiST1991-patch-1 2021-03-23 13:57:00 +01:00
Ghostkeeper
2c33ebdd05
Document part of the vertex positions generated here
Encountered as I made a failed attempt at solving the issue with rendering transparent support. I tried to order vertices appropriately but failed miserably.
2021-03-21 23:15:15 +01:00
Ghostkeeper
bcf180985d
Fix crash when adding USB device before global stack is created
Like when you plug in a 3D printer via USB while still in the welcome screen.

Fixes Sentry issue CURA-1ZR.
2021-03-18 16:17:09 +01:00
Jelle Spijker
2e3d85b9d0
Merge pull request #9377 from Ultimaker/fix_layer_view_greyout_on_model_switch
Fix layer view being greyed out after reslicing gives same current layer
2021-03-10 07:49:24 +01:00
Ghostkeeper
a379e01f1d
Fix layer view being greyed out after reslicing gives same current layer
This fixes a very old bug in Cura where sometimes after re-slicing it would display the layer as if you've been going horizontal through the path slider, even if you never touched the horizontal path slider.
This was caused by a tracking flag in the SimulationPass, _switching_layers. This bit of state in the SimulationPass was tracking whether the user is going through the vertical layer slider (True) or the horizontal path slider (False). If False, the nozzle mesh is drawn and lower layers get drawn in a shadowy shader. The state of this flag was being updated on every render by looking at whether the previous render has the same current layer number but a different path index. If so, it changed to False, meaning that it assumes you're going through the paths on a layer and things get shadowy.
However if you slice a different object such that the number of layers stay the same (or at least the current layer) but the number of paths on a layer change (e.g. by reducing Maximum Resolution, or by loading a different model that happens to be equally tall) then it would falsely think you were going through the horizontal path slider.

This change effectively resets this state flag when any layer data is changed in the scene. So if you re-slice, it always goes back to _switching_layers = True.

The side effect is that if you were going through the paths of a layer and you re-slice, you won't end up on the same path even if the number of paths on your current layer didn't change due to the reslice. But I think that is more towards what the user would accept a re-slice to do anyway.

I decided to take a look into this bug because I'm making a script to automatically refresh the screenshots of the Settings Guide plug-in. This script frequently hits cases like this, and it's easier to fix this bug than to work around it in my script.
2021-03-06 15:48:32 +01:00
Ghostkeeper
2cdb025adb
Document layer view navigation functions 2021-03-06 14:21:38 +01:00
Ghostkeeper
e9d3ba9b74
Simplify limits on [minimum] layer/path number
Just a few calls to min() or max() do the trick, rather than if statements.
I consider this more semantic, because we just intend to clamp values here, and min() and max() are commonly used to do that.
It should also be slightly faster because it's less Python and more internal in CPython, but considering that this happens at best like 60 times per second the performance impact of this will be practically nil.
2021-03-06 14:15:48 +01:00
Ghostkeeper
3ef01ecbd8
Limit minimum path number to path count, not layer count
This was probably copy-pasted wrongly years ago.
The Cura interface currently doesn't allow changing the minimum path anyway, so this doesn't have any effect on the actual behaviour of Cura. Still, can't hurt to fix this, for posterity.
2021-03-06 14:05:17 +01:00
Konstantinos Karmas
f7c45f6cb6
Merge pull request #9358 from Ultimaker/CURA-7820_reword_nonmanifold
[CURA-7820] Reword the non-manifold message, add link.
2021-03-04 09:49:19 +01:00
Remco Burema
62056f3b0a
Reword previous rewording ('import' -> 'open').
CURA-7820
2021-03-04 09:32:07 +01:00
Ghostkeeper
2c55c4a562
Merge branch 'master' into CURA-7871_lowest_print_height 2021-03-03 17:13:30 +01:00
Remco Burema
8bb57ac0e6
Reword the nonmanifold message, add link.
UX found that users where confused by the word nonmanifold. Reword the message and add an explanatory link.

CURA-7820
2021-03-03 17:13:08 +01:00
Ghostkeeper
b83193bc0f
Fix lowest slice height
Don't always divide by 2. Just for slicing tolerance: Middle. And then just once.

Contributes to issue CURA-7871.
2021-03-03 17:05:01 +01:00
Jaime van Kessel
2806dc6947
Merge branch 'fix_attr_addresses_not_found' of github.com:Ultimaker/Cura 2021-03-01 15:07:31 +01:00
Remco Burema
2b88a2dc87
Fix error log spam.
The code is clearly written to take into account that 'addresses' may be null. But not that the whole 'addresses' attribute may not exist. And then instead of printing one warning (Could not get information about XX) it instead printed a stacktrace and retried and printed a stacktrace and retried and printed a stacktrace and.... It ended up driving me a bit nuts when looking at the logs for unrelated reasons. So Ifinallay fixed it. Could end up as a speedup in some cases as well I suppose?
2021-02-26 21:56:33 +01:00
Chris ter Beke
aac004cd2b
Fix case where constraints is None 2021-02-25 12:20:32 +01:00
Chris ter Beke
d2c4dd0f65
Fix cluster print job constraints typing and optionality 2021-02-25 12:12:38 +01:00
Ghostkeeper
dc68fbc94a
Add colour scheme for line width
Implements CURA-7741.
2021-02-19 10:10:16 +01:00
Jaime van Kessel
d24bbc4071
Merge branch 'fix_postprocessing_script_roots' of https://github.com/fieldOfView/Cura 2021-02-12 16:29:28 +01:00
Ghostkeeper
b815d63096
Add cura: namespace before setting keys, and store the rest in um_node.metadata
This retains per-node metadata entries.

Contributes to issue CURA-7615.
2021-02-08 17:37:38 +01:00
Ghostkeeper
c89a397e59
Merge branch 'master' into CURA-7615_store_metadata 2021-02-08 16:27:38 +01:00
Ghostkeeper
06086dfaaf
Fix reading per-object settings from 3MF object resources
This metadata has been changed to contain other information. Readers of information from 3MF need to adjust their stance too to filter out the information they need from the metadata of the metadata.

Contributes to issue CURA-7615.
2021-02-08 15:07:33 +01:00
Ghostkeeper
577e45595e
Don't crash when cloud response is invalid JSON
Perhaps if the connection is interrupted this could happen.

Fixes Sentry issue CURA-1QX.
2021-02-04 17:05:55 +01:00