Customizable overlap ratio (it defaults to 0.15 now)

This commit is contained in:
Alessandro Ranellucci 2011-12-07 19:33:59 +01:00
parent 9f6be233f8
commit d9a70ea80d
15 changed files with 67 additions and 42 deletions

View file

@ -85,12 +85,12 @@ sub make_fill {
])};
SURFACE: foreach my $surface (@surfaces) {
my $filler = $Slic3r::fill_pattern;
my $density = $Slic3r::fill_density;
my $flow_width = $Slic3r::flow_width;
my $flow_ratio = 1;
my $is_bridge = $layer->id > 0 && $surface->surface_type eq 'bottom';
my $is_solid = $surface->surface_type =~ /^(top|bottom)$/;
my $filler = $Slic3r::fill_pattern;
my $density = $Slic3r::fill_density;
my $flow_spacing = $Slic3r::flow_spacing;
my $flow_ratio = 1;
my $is_bridge = $layer->id > 0 && $surface->surface_type eq 'bottom';
my $is_solid = $surface->surface_type =~ /^(top|bottom)$/;
# force 100% density and rectilinear fill for external surfaces
if ($surface->surface_type ne 'internal') {
@ -98,7 +98,8 @@ sub make_fill {
$filler = $Slic3r::solid_fill_pattern;
if ($is_bridge) {
$filler = 'rectilinear';
$flow_width = sqrt($Slic3r::bridge_flow_ratio * ($Slic3r::nozzle_diameter**2));
$flow_spacing = sqrt($Slic3r::bridge_flow_ratio * ($Slic3r::nozzle_diameter**2))
* (1-$Slic3r::overlap_ratio);
$flow_ratio = $Slic3r::bridge_flow_ratio;
}
} else {
@ -107,8 +108,8 @@ sub make_fill {
my @paths = $self->fillers->{$filler}->fill_surface(
$surface,
density => $density,
flow_width => $flow_width,
density => $density,
flow_spacing => $flow_spacing,
);
my $params = shift @paths;