Fix: collision warnings (#12122)

* Fix: Enable instance collision detection in GCode and Print clearance

Squashed commit containing:
- Fix gcode path conflict detection in ConflictChecker.cpp by iterating all instances.
- Improve clearance validation in Print.cpp by calculating convex hulls per instance (fixes scaling/mirroring issues).
- Added // Orca: comments to mark changes.

* Fix Wipe Tower G-code conflict detection for WipeTower2

* Fix: Improve object/instance selection for collision and validation warnings

- Updated validation logic in Print.cpp to report specific ModelInstance instead of ModelObject for collision/clearance warnings.

- Updated NotificationManager and Plater to handle ModelInstance selection in 'Jump to' links.

- Added fallback to object selection if specific instance cannot be selected.

- Included fixes for G-code conflict detection (ConflictChecker, GLCanvas3D) to also report instances.

- Improved GUI_ObjectList to update canvas selection when items are selected via API.

* Fix: Prevent crash when loading .3mf projects

Moved update_selections_on_canvas() out of ObjectList::select_items() to avoid premature UI updates during loading. Canvas updates are now explicitly called in NotificationManager and Plater callbacks where needed.

* Fix: Address code review comments

- Fix memory allocation for extrusion layers deep copy

- Remove unused variable in GLCanvas3D

- Fix string formatting crash risk in NotificationManager

- Remove dead code in Plater

---------

Co-authored-by: SoftFever <softfeverever@gmail.com>
This commit is contained in:
tome9111991
2026-04-26 12:01:41 +02:00
committed by GitHub
parent a9cfcb9d5d
commit fdff62c796
6 changed files with 343 additions and 67 deletions

View File

@@ -218,6 +218,7 @@ public:
void upload_job_notification_show_canceled(int id, const std::string& filename, const std::string& host);
void upload_job_notification_show_error(int id, const std::string& filename, const std::string& host);
void push_slicing_serious_warning_notification(const std::string &text, std::vector<ModelObject const *> objs);
void push_slicing_serious_warning_notification(const std::string &text, std::vector<ModelInstance const *> insts);
void close_slicing_serious_warning_notification(const std::string &text);
// Creates Slicing Error notification with a custom text and no fade out.
void push_slicing_error_notification(const std::string &text, std::vector<ModelObject const *> objs);