mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-08-13 02:59:03 +08:00
Use bridge flow for 3D honeycomb
This commit is contained in:
parent
5435d88924
commit
d5eb6b7be0
@ -10,11 +10,19 @@ use Slic3r::Geometry::Clipper qw(intersection_pl);
|
|||||||
sub fill_surface {
|
sub fill_surface {
|
||||||
my ($self, $surface, %params) = @_;
|
my ($self, $surface, %params) = @_;
|
||||||
|
|
||||||
|
# use bridge flow since most of this pattern hangs in air
|
||||||
|
my $flow = Slic3r::Flow->new(
|
||||||
|
width => $params{flow}->width,
|
||||||
|
height => $params{flow}->height,
|
||||||
|
nozzle_diameter => $params{flow}->nozzle_diameter,
|
||||||
|
bridge => 1,
|
||||||
|
);
|
||||||
|
|
||||||
my $expolygon = $surface->expolygon;
|
my $expolygon = $surface->expolygon;
|
||||||
my $bb = $expolygon->bounding_box;
|
my $bb = $expolygon->bounding_box;
|
||||||
my $size = $bb->size;
|
my $size = $bb->size;
|
||||||
|
|
||||||
my $distance = $params{flow}->scaled_spacing / $params{density};
|
my $distance = $flow->scaled_spacing / $params{density};
|
||||||
|
|
||||||
# generate pattern
|
# generate pattern
|
||||||
my @polylines = map Slic3r::Polyline->new(@$_),
|
my @polylines = map Slic3r::Polyline->new(@$_),
|
||||||
@ -53,7 +61,7 @@ sub fill_surface {
|
|||||||
}
|
}
|
||||||
|
|
||||||
# TODO: return ExtrusionLoop objects to get better chained paths
|
# TODO: return ExtrusionLoop objects to get better chained paths
|
||||||
return { flow => $params{flow} }, @polylines;
|
return { flow => $flow}, @polylines;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user