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

@ -48,13 +48,14 @@ sub make_fill {
my $filler = $Slic3r::fill_pattern; my $filler = $Slic3r::fill_pattern;
my $density = $Slic3r::fill_density; my $density = $Slic3r::fill_density;
my $flow_width = $Slic3r::flow_width;
# force 100% density and rectilinear fill for external surfaces # force 100% density and rectilinear fill for external surfaces
if ($surface->surface_type ne 'internal') { if ($surface->surface_type ne 'internal') {
my $is_bridge = $surface->isa('Slic3r::Surface::Bridge');
$density = 1; $density = 1;
$filler = $surface->isa('Slic3r::Surface::Bridge') $filler = $is_bridge ? 'rectilinear' : $Slic3r::solid_fill_pattern;
? 'rectilinear' $flow_width = $Slic3r::nozzle_diameter if $is_bridge;
: $Slic3r::solid_fill_pattern;
} else { } else {
next SURFACE unless $density > 0; next SURFACE unless $density > 0;
} }
@ -62,6 +63,7 @@ sub make_fill {
my @paths = $self->fillers->{$filler}->fill_surface( my @paths = $self->fillers->{$filler}->fill_surface(
$surface, $surface,
density => $density, density => $density,
flow_width => $flow_width,
); );
push @path_collection, map Slic3r::ExtrusionPath->cast( push @path_collection, map Slic3r::ExtrusionPath->cast(

View File

@ -27,7 +27,7 @@ sub fill_surface {
my $rotate_vector = $self->infill_direction($surface); my $rotate_vector = $self->infill_direction($surface);
$self->rotate_points($expolygon, $rotate_vector); $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) ]; my $bounding_box = [ bounding_box(map @$_, $expolygon) ];
(ref $self) =~ /::([^:]+)$/; (ref $self) =~ /::([^:]+)$/;

View File

@ -16,7 +16,7 @@ sub fill_surface {
$self->rotate_points($expolygon, $rotate_vector); $self->rotate_points($expolygon, $rotate_vector);
my $bounding_box = [ $expolygon->bounding_box ]; 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 @paths = ();
my $x = $bounding_box->[X1]; my $x = $bounding_box->[X1];

View File

@ -16,7 +16,7 @@ sub fill_surface {
my $rotate_vector = $self->infill_direction($surface); my $rotate_vector = $self->infill_direction($surface);
$self->rotate_points($polygons, $rotate_vector); $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 my $number_of_lines = int(0.99999999 + $self->max_print_dimension / $distance_between_lines); # ceil
#printf "distance = %f\n", $distance_between_lines; #printf "distance = %f\n", $distance_between_lines;