mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-11-01 21:21:10 -06:00
More fixes for bridges. #58
This commit is contained in:
parent
d056535bd8
commit
eb64cc4965
4 changed files with 21 additions and 8 deletions
|
|
@ -266,14 +266,14 @@ sub process_bridges {
|
|||
my $bridge_over_hole = 0;
|
||||
my @edges = (); # edges are POLYLINES
|
||||
foreach my $supporting_surface (@supporting_surfaces) {
|
||||
my @surface_edges = $supporting_surface->contour->clip_with_polygon($contour_offset);
|
||||
my @surface_edges = map $_->clip_with_polygon($contour_offset),
|
||||
($supporting_surface->contour, @{$supporting_surface->holes});
|
||||
|
||||
if (@supporting_surfaces == 1 && @surface_edges == 1
|
||||
&& @{$supporting_surface->contour->p} == @{$surface_edges[0]->p}) {
|
||||
$bridge_over_hole = 1;
|
||||
} else {
|
||||
@surface_edges = grep { @{$_->points} } @surface_edges;
|
||||
}
|
||||
push @edges, @surface_edges;
|
||||
push @edges, grep { @{$_->points} } @surface_edges;
|
||||
}
|
||||
Slic3r::debugf " Bridge is supported on %d edge(s)\n", scalar(@edges);
|
||||
Slic3r::debugf " and covers a hole\n" if $bridge_over_hole;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue