36 Commits

Author SHA1 Message Date
Ghostkeeper
9140b71b19
Merge branch 'libArachne_rebased'
Conflicts:
	plugins/SimulationView/SimulationPass.py -> Reverted layer view optimisation in Master while some whitespace changed in Arachne.
	resources/definitions -> Bunch of conflicts with profile updates.
	resources/quality -> Bunch of conflicts with profile updates.
	resources/texts/change_log.txt -> Removed the Arachne change log (as they are internal versions). It'll have to be re-added when we release this version as stable.
2021-12-14 11:48:58 +01:00
Ghostkeeper
41ebd593c5
Revert "Merge branch 'bremco-graphics_buffer_update'"
This reverts commit 5e60cc6208c16d966505e7a97d9bbbb0644d2716, reversing
changes made to c9feace0fbe02beb2089ec0af7be35127d7420f7.
2021-12-08 12:02:49 +01:00
Ghostkeeper
0da37ae6e7
Revert "Workaround for if layer is None somehow."
This reverts commit f0cb9dd39ef996225ebd6d7b8d5ffc986c90e2f0.
2021-12-08 12:02:42 +01:00
Remco Burema
c2ed0a9181
Workaround for if layer is None somehow. 2021-11-16 12:40:56 +01:00
Remco Burema
f0cb9dd39e
Workaround for if layer is None somehow. 2021-11-16 12:33:29 +01:00
Remco Burema
4f20dc4c5d
Add documentation. 2021-11-07 22:26:34 +01: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
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
Felipe Navas
62bc71572a Add flow color scheme on preview 2021-05-10 01:04:01 -03: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
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
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
Remco Burema
99e99e4650
Layerview can now deal with visibility extruder nrs. 4+
part of CURA-7426
2020-05-06 18:03:32 +02: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
Jaime van Kessel
043ef2e84f
Fix crash when layer does not exist 2020-01-06 10:47:47 +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
Lipu Fei
495fc8bbd7 WIP: Refactor BuildPlateModel and split MultiBuildPlateModel 2018-02-17 22:24:05 +01:00
Lipu Fei
b54b075cc9 Use isinstance() instead or issubclass()
CURA-4525
2018-01-12 16:42:34 +01:00
Diego Prado Gesto
4c8c4c78da CURA-4772 Create a CuraSceneNode instead of a SceneNode when reading a
GCode. Avoid creating an empty CuraSceneNode if the node is already an
instance of it.
2018-01-09 09:16:21 +01:00
Jack Ha
5152b2ae65 Solved merge conflicts. CURA-4525 2017-12-21 10:52:51 +01:00
Ruben D
79d7de050e
Enable backface culling for layer view
This effectively doubles the rendering performance of layer view.
2017-12-13 01:42:24 +01:00
Diego Prado Gesto
b97ed4c211 CURA-4609 Minor improvements in Simulation View:
Increase simulation speed.
Hide Layer Thickness option in color scheme.
Hide nozzle when switching layers.
Set the handles in front of the view.
Name changed back to "Layer View"
2017-11-23 09:59:34 +01:00
Diego Prado Gesto
d415c5fcbb CURA-4526 Add transparency to the nozzle so the user can see the lines
and layers through the nozzle.
2017-11-21 13:42:46 +01:00
Diego Prado Gesto
abe9ba3795 CURA-4526 Stop simulation when changing preferences.
Hide nozzle node when in compatibility mode.
2017-11-21 13:23:47 +01:00
Diego Prado Gesto
2df06bbbb9 CURA-4526 Add Simulation View plugin 2017-11-21 10:51:57 +01:00