Newly the PrintObjects own PrintRegions and Print contains references
to PrintRegions owned by PrintObjects, so that a PrintRegion of the same
content is referenced by Print only once.
The refactoring is a WIP to support multi-material painting.
Fixes Solid infill where there should be none #6482
Also the safety offsetting was revised to be enabled only where needed,
the "do safety offset" is now easy to discover by
a new ApplySafetyOffset::Yes enum, and safety offset over union, which
is better done by offset() / offset_ex() has been replaced with
new union_safety_offset() / union_safety_offset_ex() functions, which
better convey their meaning and which could be better optimized than
union() with the safety offset applied.
this moves the print_time directly after the input_filename_base,
so it has the most chance of surviving truncation by marlin.
temperature is also added in front of the filament_type.
which was broken with 68666de521b1cb15e41ac6728c0e8d3b4b0d4ed0
"Reworked the "new" bridging to respect the bridge_flow_ratio
by maintaining extrusion spacing, but modifying the extrusion width
and / or height."
from the background slicing thread, that supports cancellation.
The generic mechanism is used for generating thumbnails into G-code and
Fixes Fix deadlock when canceling the slicing while gcode is creating thumbnails #6476
Thanks @supermerill for pointing out the issue.
Occasionally, some input polygons contained self-intersections that caused problems with Voronoi diagrams and consequently with the extraction of colored segments by function extract_colored_segments.
Also, occasionally input polygons contained several points very close together (distance between points is 1 or so). Such close points sometimes caused that the Voronoi diagram has self-intersecting edges around these vertices. This consequently leads to issues with the extraction of colored segments by function extract_colored_segments.
MMU segmentation no longer works directly on lslices, instead of it works on custom merged regions. So lslices in PrintObject are no longer overwritten because of MMU segmentation.
All regions are scaled by SCALED_EPSILON before merging and shrunk back by SCALED_EPSILON after merging. That fixed issues with multi-volume objects when very close regions weren't merged.
Also, small expolygons and holes are filtered out that fixed missing segmentation at the boundary of two volumes in the case of multi-volume objects.