277 Commits

Author SHA1 Message Date
Remco Burema
c2ed0a9181
Workaround for if layer is None somehow. 2021-11-16 12:40:56 +01:00
Ghostkeeper
dc28370178
Remove implicit casts and comparisons of int to float
We can't change this index to an integer, because varying variables can't be integer, even though this variable will only really be tested on vertex level. Not sure if varying was the right choice, but I don't want to change that.
This prevents a crash, probably only occurring on certain GPUs.

Contributes to issue CURA-8657.
2021-11-15 15:19:57 +01:00
Remco Burema
51c5572f0f
Add draw-range behaviour to legacy-mode shaders. 2021-11-08 21:39:12 +01:00
Remco Burema
f486177465
Remove dead (shader) code.
These shader (files) are now only used for compatability mode. The 'modern' code is found in the '...3d.shader' versions of these files.
2021-11-08 21:37:57 +01:00
Remco Burema
4f20dc4c5d
Add documentation. 2021-11-07 22:26:34 +01:00
Remco Burema
a987b9972a
Merge branch 'master' into bremco-graphics_buffer_update 2021-09-16 22:27:52 +02:00
luz paz
9b203c834a Fix source typos 2021-09-07 11:34:22 -04:00
luz paz
d68f375e38 Fix various typos
Found via `codespell -q 3 -S *.po,*.pot -L childs,initialy,lod,ned,te,slicable,sur,tutoriels,wont`
2021-09-07 11:33:54 -04:00
Remco Burema
e119c46944
Fetch count from simple property instead of recalculation.
Polygons don't change when in layer-view. There's already an analogous elementCount property anyway, so a vertexCount property can't do much harm. Just keep in mind that when the polygons are altered, it should be either done via build, or the lineMeshXXXCount methods should be used instead.
2021-08-09 13:15:44 +02:00
Remco Burema
818438a8d6
Merge branch 'graphics_buffer_update' of https://github.com/bremco/Cura into bremco-graphics_buffer_update 2021-08-09 12:09:19 +02: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
Remco Burema
458fbd35f1 Merge branch 'master' into graphics_buffer_update 2021-07-25 22:30:39 +02:00
Remco Burema
96ca3b1417 Handle render-range in shader.
Instead of re-uploading the mesh each time the range changes, handle the range in the shaders with the new draw-range parameters. This does however, mean the range has to be in vertices, not in elements. This necessitates some changes to the simulation-view, and some added bits deeper in the base code. Mainly, since each time the type of a line changes, there is an extra vertex, there needs to be a type-change count available to get from 'paths' to range indices.
2021-07-25 22:26:59 +02:00
Jaime van Kessel
d4f249277e
Change icon in simulation view to rectangle
CURA-8379
2021-07-13 15:20:41 +02:00
Ghostkeeper
9046506f2a
Convert icons to UTF-8
As per our architecture design, all of these files should be UTF-8. Luckily it maps well.

Contributes to issue CURA-8342.
2021-06-28 18:28:50 +02:00
Ghostkeeper
1d0620908e
Remove useless and unused SVG elements
- Remove unused imports of xlink.
- Remove comments about which application originally wrote the text file. It's untrue because PyCharm edited it, etc.
- Remove unused IDs.
- Remove unused colours for icons rendered with RecolorImage.
- Remove useless x and y positions on 0, which is the default.
- Remove useless style setting the background to transparent.
- Remove useless whitespace in the path d attribute, and remove the then-useless XML space preserving attribute.
- Remove unused groups.
- Remove unused CSS classes.

Contributes to issue CURA-8342.
2021-06-28 18:22:52 +02:00
Ghostkeeper
0a75c772ed
Unrevert new icon set for all of Cura's interface
We created a new set of icons for Cura. These icons had to be reverted though because they weren't working out in the interface for the last release yet.
This unreverts them, basically adding them back hoping that we'll get them fixed in time for the next release.

Contributes to issue CURA-8342.

Revert "Revert "Fix merge conflict""

This reverts commit bb20e3307f43edc1ff53cb154d2351ddfe39e158.

Revert "Revert "Merge pull request #9716 from Ultimaker/CURA-8010_new_icons""

This reverts commit 70e4e9640e561e18a12870f30c905203ce8ccee7.

Revert "Revert "Fix typo in icon name""

This reverts commit 38ce22ba7c3f40b971bc6e1e0a8e776ca9d51512.

Revert "Revert "Add list for deprecated icons""

This reverts commit 119a957e7f978dbf1ddbcb3b0005bf38e8fed943.

Revert "Revert "Add Function icon""

This reverts commit 760726cf0bb953bb1b0fc277b448f419d4bd2544.

Revert "Revert "Switch out inherit icon""

This reverts commit 26afff609381e2004d194c280f504b6226859bd3.

Revert "Revert "Merge branch 'CURA-8205_Introduce_new_icons_in_Cura' of github.com:Ultimaker/Cura""

This reverts commit 6483db3d47ee052c1a966cdee3af7190577a5769.

Revert "Fix incorrect icons"

This reverts commit 02a4ade2a50a943ff36fd4895bdc9261cf2133eb.
2021-06-28 17:16:56 +02:00
Remco Burema
8aa071056b
Now unused API field only took integers originally.
We want to keep it this way so people can still make plugins work for older versions of Cura, like 3.6, where the 'api' field with just a single major version, instead of the 'supported_sdk_versions', which can be either a version-string like '7.6.0' or a list of version strings.
2021-06-17 11:15:33 +02:00
Remco Burema
04002056ae
Update SDK/API from 7.5.0 to 7.6.0 for 4.10
CURA-8320
2021-06-15 16:08:07 +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
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