Apply overlap factor to bridges too

This commit is contained in:
Alessandro Ranellucci 2012-11-16 13:18:06 +01:00
parent 1c2bc94d5a
commit a81377d684

View file

@ -12,7 +12,7 @@ use Slic3r::Fill::OctagramSpiral;
use Slic3r::Fill::PlanePath;
use Slic3r::Fill::Rectilinear;
use Slic3r::ExtrusionPath ':roles';
use Slic3r::Geometry qw(X Y scale shortest_path);
use Slic3r::Geometry qw(X Y PI scale shortest_path);
use Slic3r::Geometry::Clipper qw(union_ex diff_ex);
use Slic3r::Surface ':types';
@ -135,7 +135,8 @@ sub make_fill {
$filler = $Slic3r::Config->solid_fill_pattern;
if ($is_bridge) {
$filler = 'rectilinear';
$flow_spacing = sqrt($Slic3r::Config->bridge_flow_ratio * ($layer->infill_flow->nozzle_diameter**2));
my $width = sqrt($Slic3r::Config->bridge_flow_ratio * ($layer->infill_flow->nozzle_diameter**2));
$flow_spacing = $width + &Slic3r::OVERLAP_FACTOR * ($width * PI / 4 - $width); # this should be moved to Flow.pm
} elsif ($surface->surface_type == S_TYPE_INTERNALSOLID) {
$filler = 'rectilinear';
}