226 Commits

Author SHA1 Message Date
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
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
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
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
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
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
Kostas Karmas
6ffd250965 Format spacing
CURA-7426
2020-05-07 14:10:45 +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
7302e8ba7f Update missed sdk versions from 7.1 to 7.2.0 for Cura 4.6
CURA-7383
2020-04-21 11:46:12 +02:00
Ghostkeeper
a1438e91d0
Merge branch '4.5'
Conflicts:
	cura_app.py -> Due to moving some imports around.
2020-02-25 12:07:47 +01: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
Jaime van Kessel
b86658996b
Revert "Chop up the render function to make it a bit more readable"
This reverts commit 61a605d02be0d0f34893fa5d544111a3b0d49132.
2020-02-24 12:45:13 +01:00
konskarm
069384e588
Merge pull request #7152 from Ultimaker/CURA-7231_no_layers_to_show_msg
Cura 7231 no layers to show msg
2020-02-24 12:02:06 +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
Remco Burema
b0418716fd
Rename 'Feedrate' to 'Speed'.
At least in the interface. Even though Feedrate is congruent with the CNCdefinition thereof, Speed is less confusing for the user.
2020-02-11 13:03:27 +01:00
Ghostkeeper
6f707f3149
Bump SDK version number of Cura 4.5 to 7.1
We've added new things to our API. This allows plug-in developers to use them.

Contributes to issue CURA-7205.
2020-02-10 10:45:07 +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
fieldOfView
6abf916ced Fix typing in __init__ methods to appease MYPY 2020-01-14 21:56:06 +01:00
Jaime van Kessel
043ef2e84f
Fix crash when layer does not exist 2020-01-06 10:47:47 +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
61a605d02b
Chop up the render function to make it a bit more readable 2020-01-02 13:34:57 +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
Nino van Hooff
c31c1dd6fb Refactor: simplify SimulationSliderLabel font metrics 2019-11-12 14:56:56 +01:00
Nino van Hooff
27b4e9a063 Refactor: simplify SimulationSliderLabel width 2019-11-12 14:55:00 +01:00
Nino van Hooff
f4b9c0fdd4 Fix SimulationSliderLabel width 2019-11-12 14:52:11 +01:00