Use nozzle diameter as flow width when bridging

This commit is contained in:
Alessandro Ranellucci 2011-11-13 18:21:25 +01:00
parent 038caddcda
commit a2b4f9f671
4 changed files with 11 additions and 9 deletions

View File

@ -46,22 +46,24 @@ sub make_fill {
SURFACE: foreach my $surface (@$surfaces) {
Slic3r::debugf " Processing surface %s:\n", $surface->id;
my $filler = $Slic3r::fill_pattern;
my $density = $Slic3r::fill_density;
my $filler = $Slic3r::fill_pattern;
my $density = $Slic3r::fill_density;
my $flow_width = $Slic3r::flow_width;
# force 100% density and rectilinear fill for external surfaces
if ($surface->surface_type ne 'internal') {
my $is_bridge = $surface->isa('Slic3r::Surface::Bridge');
$density = 1;
$filler = $surface->isa('Slic3r::Surface::Bridge')
? 'rectilinear'
: $Slic3r::solid_fill_pattern;
$filler = $is_bridge ? 'rectilinear' : $Slic3r::solid_fill_pattern;
$flow_width = $Slic3r::nozzle_diameter if $is_bridge;
} else {
next SURFACE unless $density > 0;
}
my @paths = $self->fillers->{$filler}->fill_surface(
$surface,
density => $density,
density => $density,
flow_width => $flow_width,
);
push @path_collection, map Slic3r::ExtrusionPath->cast(

View File

@ -27,7 +27,7 @@ sub fill_surface {
my $rotate_vector = $self->infill_direction($surface);
$self->rotate_points($expolygon, $rotate_vector);
my $distance_between_lines = $Slic3r::flow_width / $Slic3r::resolution / $params{density} * $self->multiplier;
my $distance_between_lines = $params{flow_width} / $Slic3r::resolution / $params{density} * $self->multiplier;
my $bounding_box = [ bounding_box(map @$_, $expolygon) ];
(ref $self) =~ /::([^:]+)$/;

View File

@ -16,7 +16,7 @@ sub fill_surface {
$self->rotate_points($expolygon, $rotate_vector);
my $bounding_box = [ $expolygon->bounding_box ];
my $distance_between_lines = $Slic3r::flow_width / $Slic3r::resolution / $params{density};
my $distance_between_lines = $params{flow_width} / $Slic3r::resolution / $params{density};
my @paths = ();
my $x = $bounding_box->[X1];

View File

@ -16,7 +16,7 @@ sub fill_surface {
my $rotate_vector = $self->infill_direction($surface);
$self->rotate_points($polygons, $rotate_vector);
my $distance_between_lines = $Slic3r::flow_width / $Slic3r::resolution / $params{density};
my $distance_between_lines = $params{flow_width} / $Slic3r::resolution / $params{density};
my $number_of_lines = int(0.99999999 + $self->max_print_dimension / $distance_between_lines); # ceil
#printf "distance = %f\n", $distance_between_lines;