This patch is cherry pick from Prusa, thanks to Prusa
Rework multi-material segmentation to work directly on the Voronoi diagram without creating a copy of it.
Previous algorithms assume that they can get an invalid Voronoi diagram. Because of that, during the multi-material segmentation, a copy of the Voronoi diagram was created, and there were several attempts to fix missing vertices and edges. But as it shows, this wasn't a good enough approach and sometimes led to several issues like bleeding layers.
After generalization, our approach for detection and repairs of invalid Voronoi diagrams from Arachne, we could assume that multi-material segmentation gets non-invalid Voronoi diagrams.
With this assumption, we reimplement multi-materials segmentation to work directly on the Voronoi diagram. That should make multi-material segmentation more stable.
So, this should fix several issues like bleeding layers. Also, memory consumption should decrease by a lot. Also, there should be some speedup of multi-materials segmentation.
Jira: none
Change-Id: I72aa6e1f9634d9ee8759aa469a0b39a36ace62f5
Jira: STUDIO-6166
most of the code come from orca
The original code is from PrusaSlicer and referring to the implementation of OrcaSlicer. Thanks for PrusaSlicer and OrcaSlicer , thanks for Lukas Matena and enricoturri1966 and so on.
commit f72d42f920334a05b0efa01f18eb4cc066809c00
Author: enricoturri1966 <enricoturri@seznam.cz>
Date: Tue Oct 31 11:43:04 2023 +0800
Measure: Initial porting of Measure Gizmo
diff --git a/resources/images/copy_menu.svg b/resources/images/copy_menu.svg
new file mode 100644
Change-Id: I81afa52165f14c34e0c63f2c40c953a04d76fc8b
Sync some code change and fix from Prusa.
Thanks Prusa.
This also can fix github issue #317
Signed-off-by: salt.wei <salt.wei@bambulab.com>
Change-Id: If6993e0149733ccf85ed85f82553caa03df7ac60