This commit is contained in:
parent
8ed91a8ec4
commit
0184b0f205
3 changed files with 9 additions and 6 deletions
|
@ -321,13 +321,13 @@ sub process_bridges {
|
|||
my @edges = (); # edges are POLYLINES
|
||||
foreach my $supporting_surface (@supporting_surfaces) {
|
||||
my @surface_edges = map $_->clip_with_polygon($contour_offset),
|
||||
($supporting_surface->contour, @{$supporting_surface->holes});
|
||||
($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;
|
||||
}
|
||||
push @edges, grep { @{$_->points} } @surface_edges;
|
||||
push @edges, grep { @$_ } @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;
|
||||
|
@ -340,12 +340,12 @@ sub process_bridges {
|
|||
}
|
||||
|
||||
if (@edges == 2) {
|
||||
my @chords = map Slic3r::Line->new($_->points->[0], $_->points->[-1]), @edges;
|
||||
my @chords = map Slic3r::Line->new($_->[0], $_->[-1]), @edges;
|
||||
my @midpoints = map $_->midpoint, @chords;
|
||||
my $line_between_midpoints = Slic3r::Line->new(@midpoints);
|
||||
$bridge_angle = rad2deg_dir($line_between_midpoints->direction);
|
||||
} elsif (@edges == 1) {
|
||||
my $line = Slic3r::Line->new($edges[0]->points->[0], $edges[0]->points->[-1]);
|
||||
my $line = Slic3r::Line->new($edges[0]->[0], $edges[0]->[-1]);
|
||||
$bridge_angle = rad2deg_dir($line->direction);
|
||||
} else {
|
||||
my $center = bounding_box_center([ map @{$_->points}, @edges ]);
|
||||
|
|
|
@ -83,7 +83,7 @@ sub make_perimeter {
|
|||
if ($_->isa('Slic3r::Polygon')) {
|
||||
push @{ $layer->perimeters }, Slic3r::ExtrusionLoop->new(polygon => $_, role => 'perimeter');
|
||||
} else {
|
||||
push @{ $layer->perimeters }, Slic3r::ExtrusionPath->new(polyline => $_->points, role => 'perimeter');
|
||||
push @{ $layer->perimeters }, Slic3r::ExtrusionPath->new(polyline => $_, role => 'perimeter');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -330,7 +330,10 @@ sub extrude_skirt {
|
|||
my $skirt_height = $Slic3r::skirt_height;
|
||||
$skirt_height = $self->layer_count if $skirt_height > $self->layer_count;
|
||||
my @layers = map $self->layer($_), 0..($skirt_height-1);
|
||||
my @points = map @$_, map $_->p, map +(@{$_->slices}, @{$_->thin_walls}), @layers;
|
||||
my @points = (
|
||||
(map @$_, map @{$_->expolygon}, map @{$_->slices}, @layers),
|
||||
(map @$_, map @{$_->thin_walls}, @layers),
|
||||
);
|
||||
return if !@points;
|
||||
|
||||
# find out convex hull
|
||||
|
|
Loading…
Reference in a new issue