Before, partial bridges were calculated. For each of these an angle
has been choosen and after that all the bridges have been merged.
Becouse of the merge a single angle had to be picked.
The first angle that the algorithm has stumbled upon has been picked,
resulting in sub-optimal bridging directions.
Now the partial bridges are calcualted, then merged and then
the angle is decided over the whole merged bridge.
This approach at least ensures that the orientation is the best possible
for the merged bridge.
This enables addition of other expansion zones in the future.
For example to make sure bridges are anchored properly even
if there is top fill next to them.
Split the function expand_bridges_detect_orientations into
multiple functions. And allow any number of expansion zones
by using a vector instead of explicitly listing the
parameters.
Fixed a typo in typo, Vojtech needs vacation.
Follow-up to 02f69575ef580ef3dd8ed0ea7a82646157de5335
Fix of SPE-1752, GH #10736:
Extended the bridge expansion algorithm to expand into sparse infill
by a maximum of 1 perimeter width.
Extended the bridge expansion algorithm to expand into sparse infill
by a maximum of 1 perimeter width. This solves a situation, where
the "ensure vertical wall thickness" region is filtered out as
too narrow to be important for print stability while the bridge expansion
only happened into the "ensure vertical wall thickness" regions before.
Partial revert of cf6b6ff4e4c47ebbe08f97cf80d923cde81c29af, reverts
Fix SPE-1726 - hole between bridges and perimeters caused by thin internal fill surface
GithubIssue https://github.com/prusa3d/PrusaSlicer/issues/10231#issuecomment-1546779200
During sorting of surfaces into top, bottom and internal, expand bottom bridges by one spacing unit, to ensure better anchoring
to reduce zig-zag movements of the print head on overhangs.
Always use thick bridges on internal bridges.
Co-authored-by: lane.wei <lane.wei@bambulab.com>
1) Flipped the order of "discover_vertical_shells" and "process_external_surfaces",
now the external surfaces are expanded after "discover_vertical_shells"
aka "ensure vertical wall thickness" is solved.
2) Reworked LayerRegion::process_external_surfaces() to only expand into
"ensure vertical wall thickness" regions, also the expansion is done
in small steps to avoid overflowing into neighbor regions.
also:
Utility functions reserve_more(), reserve_power_of_2(), reserve_more_power_of_2()
Various SurfaceCollecion::filter_xxx() modified to accept an initializer list of surface types.
New bridges detector refactored to accept overhang boundaries.
BoundingBoxWrapper was moved from RetractCrossingPerimeters to AABBTreeIndirect.
Implementation of extra perimeters on steep overhangs/flat unsupported parts
Also contains:
Principal components computation over polygon area
New fast bridge direction estimation which minimizes amount of unanchored bridge endpoints
Refactored PerimeterGenerator for functional style, better constness
with the goal of calling PerimeterGenerator::process_xxx()
for each surface at once to collect its fill expolygons.
into a graph with links to the layer above / below.
In addition:
Members of LayerRegion were made private, public interface const only.
this->m_xxx replaced with just m_xxx
SurfacesPtr was made a vector of const pointers.
Now Lightning infill will ignore this setting and treat it as off. Because Lightning infill and "Only infill where needed" do a similar thing, and their combination doesn't make much sense.
For this particular model, ClipperLib numerical instability causes
one of the internal surfaces to turn into bridging surfaces
on reslicing. The issue was fixed by reverting to untyped slices if possible.
Fix of an extremely slow bridging calculation, caused by an extremely
slow bridged area detection function, of which the results were never used.
Fixes "slicing fails or takes too long #5974"
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.