81 Commits

Author SHA1 Message Date
Remco Burema
abe7c1bf7f
Search/replace Qt5->Qt6.
part of upgrading Qt to v6.2: CURA-8591
2021-12-28 14:46:02 +01:00
Jelle Spijker
2263969d5f
Updated message with message types
Contributes to CURA-8418
2021-07-28 08:45:42 +02:00
Jaime van Kessel
900db57f0f
Update messages to use the message_types
CURA-8418
2021-07-27 11:54:43 +02:00
Mark Burton
d2a7a4186a Avoid crash calculating max/min flow rates if there are no visible lines with extrusion. 2021-06-07 07:51:58 +01:00
Mark Burton
f65731e4c2 Reset min/max flow rates in calculateColorSchemeLimits(). 2021-06-06 12:17:19 +01:00
Mark Burton
2f1f370fe0 Remove local variable. 2021-06-06 12:17:03 +01:00
Mark Burton
4973d53057 Rework calculation of min/max flow rates for simulation view colour scheme.
The max value was being calculated as the product of the max line width, max layer thickness
and max feedrate but it should be calculated as the maximum of the products of the width,
thickness and feedrate for each individual line. i.e. calculate the flow for each line
and use the min and max values of the flows.
2021-06-06 09:34:56 +01: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
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
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
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
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
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
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
Nino van Hooff
c6e6c76962 Merge remote-tracking branch 'origin/master' into doxygen_to_restructuredtext_comments
# Conflicts:
#	cura/API/Account.py
#	plugins/SimulationView/SimulationView.py
2020-05-15 13:38:37 +02:00
Nino van Hooff
58e43c0a07 Convert doxygen to rst for SentryLogger, SimulationView, SliceInfo,
SolidView
2020-05-15 13:34:58 +02:00
Remco Burema
23cdf871c1
Add comments: Why a matrix4x4 and not a sampler1d?
part of CURA-7426
2020-05-07 18:55:55 +02:00
Remco Burema
99e99e4650
Layerview can now deal with visibility extruder nrs. 4+
part of CURA-7426
2020-05-06 18:03:32 +02:00
Nino van Hooff
d762ad4acc
Merge pull request #7156 from Ultimaker/CURA-7231_no_layers_to_show_msg
Cura 7231 no layers to show msg
2020-02-25 09:42:23 +01:00
Jaime van Kessel
239a8ea3db
Revert speedup 2020-02-24 13:07:59 +01:00
Tim Kuipers
c1d87fa474 Pop-up checkbox to never show [No layers to show] ever again, because the user ain't no noob
CURA-7231
2020-02-21 15:07:57 +01:00
Tim Kuipers
0a10a1220f Don't show 'no layer data' msg when Slice Automatically is enabled
CURA-7231
2020-02-21 15:07:26 +01:00
Ghostkeeper
5a7ec98f1e
Slightly improve wording
'Layer data' is a bit technical.
2020-02-04 14:14:23 +01:00
Ghostkeeper
2c28f70016
Add warning if you haven't sliced before going to layer view
Done as a 5 minute fix.

Fixes #7044.
2020-02-03 11:22:22 +01:00
Jaime van Kessel
3ffbdf2888
Ensure that after a reslice the nozzle location of re-slice is still correct 2020-01-03 11:28:29 +01:00
Jaime van Kessel
0d7421140f
Recalculate the start / end elements when the layer is changed instead of on render
About with larger models, about 30-40% of the time of the render was spent on this.
2020-01-02 13:28:14 +01:00
Remco Burema
1915100118
Fix: Layersliders work again. 2019-12-31 16:48:50 +01:00
Remco Burema
cb361e9543
Force sim-view to update after view-type change. 2019-12-31 16:14:02 +01:00
Lipu Fei
534b432e7e Fix another is None check for typing 2019-11-11 09:08:13 +01:00
Lipu Fei
7495d7900f Fix is None check for typing 2019-11-11 09:03:21 +01:00
Lipu Fei
adaea90d50 Fix typing 2019-11-11 08:48:04 +01:00
Nino van Hooff
5bb23e4c6f Make the height of the layer slider dynamic
Prevents the action panel from overlapping the layer slider

CURA-6853
2019-10-07 15:40:42 +02:00
Jaime van Kessel
24474b4434 Made too broad exception handling more specific 2019-09-02 09:52:36 +02:00
Jaime van Kessel
9b45b56e61 Fix simulation view not showing bars for g-code 2019-08-30 11:43:59 +02:00
Jaime van Kessel
e8cd5723c9 Speedup the layerview
We were doing a lot of re-calculations that served no purpose (and
even slowed down the rest of the application)
2019-08-27 13:26:55 +02:00
Jaime van Kessel
ea11187eaf Don't reset the data when the root updates
Resolves #6258
2019-08-27 13:18:11 +02:00