253 Commits

Author SHA1 Message Date
Jaime van Kessel
70e4e9640e
Revert "Merge pull request #9716 from Ultimaker/CURA-8010_new_icons"
This reverts commit 6120d8a054b8c04bf90b8b3d3cb219d691bece2f, reversing
changes made to 95652556fef90f70adbf25bfa9bd3b8af7220d4a.
2021-05-27 16:06:20 +02:00
Jaime van Kessel
cfb32bfd50
Also notify layercolor changed if the feedrate with extrusion changed
CURA-8196
2021-05-19 16:44:49 +02:00
Jaime van Kessel
de07286900
Change logger severity of log
CURA-8196
2021-05-19 16:38:55 +02:00
Jaime van Kessel
a49627a1f7
Remove unneeded declaration
CURA-8196
2021-05-19 11:10:25 +02:00
Jaime van Kessel
a9970800f6
Don't use travel moves to calculate max flow
CURA-8196
2021-05-19 11:03:29 +02:00
Jaime van Kessel
5bfb0fc437
Use properties instead of slots for min & max flow
This fixes some update issues in the simulation view display

CURA-8196
2021-05-18 16:18:45 +02:00
Jaime van Kessel
91c4d8b5f2
Fix rendering issue in flow view 2021-05-17 10:37:38 +02:00
Felipe Navas
62bc71572a Add flow color scheme on preview 2021-05-10 01:04:01 -03:00
Jaime van Kessel
eb3bdfc18a
Merge branch 'layer_view_statistic_limits_only_visible' of github.com:Ultimaker/Cura 2021-05-06 13:10:38 +02:00
Jaime van Kessel
aac9ba03ec
Merge branch 'fix_path_minimum_limit' of github.com:Ultimaker/Cura 2021-05-03 15:14:31 +02:00
Konstantinos Karmas
6120d8a054
Merge pull request #9716 from Ultimaker/CURA-8010_new_icons
Cura 8010 new icons
2021-04-28 19:02:47 +02:00
Kostas Karmas
f887db23f6 Use detail_level to describe the icons (instead of size)
Previously the icons were organized according to "size" which could prove to be confusing.
This commit fixes that by organizing them according to "detail_level".

CURA-8010
2021-04-28 18:53:32 +02:00
jelle Spijker
247412b16a
Implemeted new icons in on-boarding dialog
CURA-8010_new_icons
2021-04-28 16:54:26 +02:00
Ghostkeeper
171d425bf6
Match precision of input to precision of previous stage output
It'd probably get cast, but this is better.

Contributes to issue CURA-8189.
2021-04-28 16:33:24 +02:00
jelle Spijker
2bd6f28f3a
Update Icons
Subdivided the new icons in 3 size categories. As requested by UX
Used the company naming scheme for uniformity and easy recognition.

Known issues:
- Top/Bottom category wasn't taken into account by UX at the time. Since
 this is a recent addition. Both the Walls and Top/Bottom will be updated.
- Cloud/Network connection icons 12px don't render correctly. Due to the
 theme-ing.
- Extruder Icons do not render correctly.

CURA-8010_new_icons
2021-04-26 19:42:17 +02:00
Jim Watson
396c26ce3d
Fix for crashes on Mac 10.13 in 2010 era hardware
Not sure I understand why this works - size_x/y are for the end of the line not the start
2021-04-24 18:56:08 +01:00
Ghostkeeper
972e024a43
Add typing for get/setShowTravelMoves
This one was missing. The rest already seems to have typing.
2021-04-15 19:31:57 +02:00
Ghostkeeper
cd551555ef
Merge branch 'master' into layer_view_statistic_limits_only_visible 2021-04-15 19:30:56 +02:00
Ghostkeeper
95297f0410
Merge branch '4.9' 2021-04-06 13:30:03 +02:00
Ghostkeeper
08be77adad
Increment SDK version to 7.5.0
The Cura 4.9 release will have expanded functionality. If you have a plug-in that uses this functionality, marking it as using SDK 7.5.0 will notify older Cura releases that they can't use that plug-in.
2021-04-06 13:28:08 +02:00
Ghostkeeper
71b217c624
Fix colour calculations if spectrum is entirely one value
If the range of the colour spectrum is 0, i.e. there is only one value for the current colour spectrum, then this would previously give a division by 0 in the shader, causing the final colour to become black. This is unexpected and makes the layer view hard to read. Instead, we'll now use the middle of the range then.
This was likely a problem for a long time but only really became visible due to the colour spectrum now showing only the range of values for the visible structures. Previously it was a problem e.g. for layer thickness if all layers had the same thickness (i.e. initial layer height == layer height).
2021-04-03 17:29:33 +02:00
Ghostkeeper
6209a08121
Fix accidentally always taking 0th line along
The input array here is 2D, but always 1 by N long. The output of where then gives a tuple of two arrays, one indicating the Y positions and the other the X positions. The X positions were therefore always 0. The amin and amax functions were then always taking this index 0 along in their results, regardless of whether the line at that index was visible at all or not.
This will also improve performance since it's checking the limits now only for half as many indices.
2021-04-03 17:19:24 +02:00
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
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
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
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
Ghostkeeper
dc68fbc94a
Add colour scheme for line width
Implements CURA-7741.
2021-02-19 10:10:16 +01:00
Remco Burema
1e155662d9
Only show line-starts in non-legacy OpenGL mode.
CURA-7981
2021-02-02 15:14:54 +01:00
Jaime van Kessel
b219f57b22
Merge branch 'dev' of https://github.com/BasF0/Cura 2021-01-27 10:56:35 +01:00
Ghostkeeper
f28b90a1a4
Make Line Type the default selection for layer view colour scheme
Implements CURA-7983.
Fixes #9154.
2021-01-22 11:04:59 +01:00
bas
46933693a7 removed hardcoded 0: now using LayerPolygon.MoveCombingType 2021-01-20 21:56:44 +01:00
BasF0
d8440edd4d
Merge branch 'master' into dev 2020-11-11 13:57:13 +01:00
bas
f6badcaeca Added starts color to theme, and support in shader / simulationpass 2020-11-11 13:44:21 +01:00
Ghostkeeper
e8e90e398a
Don't render non-printed meshes as if being outside of build volume
They aren't rendering like that in the solid view either.

Contributes to issue CURA-7797.
2020-10-29 12:29:10 +01:00
bas
757d7eee50 layers3d.shader now detects and draws 'starts' as boxes
Also adds a "show starts" option to the SimulationViewMenuComponent and corresponding logic

SimulationPass.py adds a prev_line_types attribute to the shader, which the shader uses to compare with its line_type to detect starts.
2020-10-28 09:49:26 +01:00
Kostas Karmas
03dc8d00fe Up the SDK version to 7.4.0
In preparation for release of the 4.8.

CURA-7795
2020-10-22 11:29:25 +02:00
Remco Burema
24f95a9cab
Fix confusing nozzle-node 'ghost' in simulation-view.
part of a 30-min fix
2020-10-07 16:22:22 +02:00
Ghostkeeper
9ea418c0a1
Revert "Revert "Merge branch '4.7' of github.com:Ultimaker/Cura into 4.7""
This reverts commit 28f4d8513db7efce17bfd8b80fa7c8b237fd1c18.
The original revert was to revert an accidental merge from master to 4.7. This now reverts the revert on Master, so that we still have those changes on Master.
2020-08-20 16:35:52 +02:00
Ghostkeeper
28f4d8513d
Revert "Merge branch '4.7' of github.com:Ultimaker/Cura into 4.7"
This reverts commit 7f47f12bf0a9cf305542b6c21600ce9b804c1dfd, reversing
changes made to dd42c87da762d2030ee2220bc6f0a3e44cf85c28.
2020-08-20 16:01:46 +02:00
Remco Burema
99cd8ab1b0
Show models outside of BP clearly in layerview.
CURA-7586
2020-08-12 17:42:10 +02:00
Kostas Karmas
bd54ef8d5a Update the SDK version to 7.3.0 for 4.7
CURA-7641
2020-08-07 11:12:27 +02:00