OrcaSlicer/resources
SoftFever ba5f0e707d
Some checks are pending
Build all / Build Linux (push) Waiting to run
Build all / Build Non-Linux (push) Waiting to run
Build all / Unit Tests (push) Blocked by required conditions
Build all / Flatpak (push) Waiting to run
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
..
calib Calibration Cornering Jerk Test + Generic interpolator + Fix (#10962) 2025-10-26 20:44:19 +08:00
cert FIX:use a complete certificate 2025-09-29 23:38:22 +08:00
dailytip Add the full source of BambuStudio 2022-07-15 23:42:08 +08:00
data Url update: SoftFever/OrcaSlicer -> OrcaSlicer/OrcaSlicer (#11371) 2025-11-17 11:17:54 +08:00
flush ENH: update flush data for H2D 2025-09-23 21:42:00 +08:00
fonts Feature/bs1.8beta (#2844) 2023-12-01 10:42:45 +00:00
handy_models Add Cali Cat handy model (#11663) 2025-12-18 12:25:59 +00:00
hms ENH: update HMS for 22E 2025-10-28 15:30:02 +08:00
i18n Fix translations (#11282) 2025-11-05 17:51:50 +08:00
images Merge branch 'main' into libvgcode 2026-01-06 11:09:09 +08:00
info ENH: support E3D print parts display 2025-10-28 15:30:00 +08:00
printers FIX: fixed o1s wiki link redirection 2025-10-30 14:56:49 +08:00
profiles Add support for Cubicon xCeler-Plus printer and profiles. (#11771) 2026-01-06 10:56:00 +08:00
profiles_template Fix typo in filament_sbs_template.json (#11837) 2026-01-06 08:34:34 +00:00
shaders Merge remote-tracking branch 'upstream/main' into libvgcode 2025-11-15 11:11:20 -05:00
tooltip post changes after merging BS1.7.4 2023-08-26 18:45:43 +08:00
web Relax flushing volume thresholds for printers needing higher purge. (#11778) 2026-01-05 22:41:04 +00:00
check_access_code.txt ENH:Update IP address input process 2023-02-01 16:24:44 +08:00
Icon.icns fix Mac icon 2023-09-08 00:41:23 +08:00