Files
OrcaSlicer/resources
SoftFever ba5f0e707d Port libvgcode/improved G-code viewer from PrusaSlicer 2.8.0 (#10735)
# Description

Fixes #6813 
Fixes #7782 
Fixes #6367

This is a port of libvgcode, OpenGL Core Profile (libvgcode requires OpenGL 3.2+), and probably other stuff I forgot from PrusaSlicer. libvgcode is also known as "Improved G-code Viewer" which was introduced in [PrusaSlicer 2.8.0](https://github.com/prusa3d/PrusaSlicer/releases/tag/version_2.8.0-alpha5). It significantly improves performance of the G-code preview and allows displaying the actual speed and volumetric flow rate.

## TODO

- [x] Make the sliders work properly again
- [x] Make view type selection work
- [x] Fix toggling of feature type visibility
- [x] Expose actual speed/actual flow view types
- [x] Fix display of G2/G3 arcs
- [x] Wire up actual speed graph widgets
- [x] Fix painter gizmos
- [x] Fix crash when selecting filament view type on Windows
- [ ] Figure out display color management (#10827)
- [x] Fix incorrect rendering of small area flow compensation (or any extrusions with varying flow)
- [ ] Localization
- [ ] Testing
- [ ] Code cleanup, performance optimization

## Removed functionality

Some functionality is not supported by libvgcode:

- Toggling visibility of tools
- Toggling visibility of colors in color print view
- Support for systems with OpenGL <3.2
- Bambu's implementation of G2/G3 arcs was replaced with PrusaSlicer's implementation

# Screenshots/Recordings/Graphs

https://github.com/user-attachments/assets/c1413a82-3058-4541-b96c-3d5f7cdef174

<details>
<summary>Outdated Stuff</summary>

https://github.com/user-attachments/assets/ca172ef4-0828-4d21-8768-b08a4132c9ab

<img width="1611" height="1145" alt="image" src="https://github.com/user-attachments/assets/5e0d04ff-8046-4636-a08a-cdedc60303bc" />
</details>

## Tests

- [x] Normally sliced G-code
- [ ] G-code viewer mode
- [x] Arc fitting enabled
- [x] Spiral Z-hops
- [x] Multi-extruder/multi-color
- [x] Vase mode
- [x] Skirt/brim
- [x] Supports
- [ ] Support transition (whatever this is)
- [x] Painter gizmos
- [x] Measurement gizmo
- [x] Move/rotate/scale gizmos
- [x] H2D/H2S support (oh no)
- [ ] Windows
- [x] macOS
- [ ] Linux
2026-01-06 23:15:16 +08:00
..
2025-09-29 23:38:22 +08:00
2025-09-23 21:42:00 +08:00
2025-10-28 15:30:02 +08:00
2025-11-05 17:51:50 +08:00
2026-01-06 11:09:09 +08:00
2025-10-28 15:30:00 +08:00