Use solid infill speed for internal bridges; apply slowdown if any; don't use bridge fan settings. #240
This commit is contained in:
parent
700fee14aa
commit
537fca47c5
3 changed files with 16 additions and 12 deletions
|
@ -5,8 +5,8 @@ require Exporter;
|
|||
our @ISA = qw(Exporter);
|
||||
our @EXPORT_OK = qw(EXTR_ROLE_PERIMETER EXTR_ROLE_EXTERNAL_PERIMETER
|
||||
EXTR_ROLE_CONTOUR_INTERNAL_PERIMETER
|
||||
EXTR_ROLE_FILL EXTR_ROLE_SOLIDFILL EXTR_ROLE_TOPSOLIDFILL EXTR_ROLE_BRIDGE EXTR_ROLE_SKIRT
|
||||
EXTR_ROLE_SUPPORTMATERIAL EXTR_ROLE_GAPFILL);
|
||||
EXTR_ROLE_FILL EXTR_ROLE_SOLIDFILL EXTR_ROLE_TOPSOLIDFILL EXTR_ROLE_BRIDGE
|
||||
EXTR_ROLE_INTERNALBRIDGE EXTR_ROLE_SKIRT EXTR_ROLE_SUPPORTMATERIAL EXTR_ROLE_GAPFILL);
|
||||
our %EXPORT_TAGS = (roles => \@EXPORT_OK);
|
||||
|
||||
use Slic3r::Geometry qw(PI X Y epsilon deg2rad rotate_points);
|
||||
|
@ -30,9 +30,10 @@ use constant EXTR_ROLE_FILL => 4;
|
|||
use constant EXTR_ROLE_SOLIDFILL => 5;
|
||||
use constant EXTR_ROLE_TOPSOLIDFILL => 6;
|
||||
use constant EXTR_ROLE_BRIDGE => 7;
|
||||
use constant EXTR_ROLE_SKIRT => 8;
|
||||
use constant EXTR_ROLE_SUPPORTMATERIAL => 9;
|
||||
use constant EXTR_ROLE_GAPFILL => 10;
|
||||
use constant EXTR_ROLE_INTERNALBRIDGE => 8;
|
||||
use constant EXTR_ROLE_SKIRT => 9;
|
||||
use constant EXTR_ROLE_SUPPORTMATERIAL => 10;
|
||||
use constant EXTR_ROLE_GAPFILL => 11;
|
||||
|
||||
use constant PACK_FMT => 'ffca*';
|
||||
|
||||
|
|
|
@ -156,11 +156,13 @@ sub make_fill {
|
|||
paths => [
|
||||
map Slic3r::ExtrusionPath->pack(
|
||||
polyline => Slic3r::Polyline->new(@$_),
|
||||
role => ($is_bridge
|
||||
? EXTR_ROLE_BRIDGE
|
||||
: $is_solid
|
||||
? ($surface->surface_type == S_TYPE_TOP ? EXTR_ROLE_TOPSOLIDFILL : EXTR_ROLE_SOLIDFILL)
|
||||
: EXTR_ROLE_FILL),
|
||||
role => ($surface->surface_type == S_TYPE_INTERNALBRIDGE
|
||||
? EXTR_ROLE_INTERNALBRIDGE
|
||||
: $is_bridge
|
||||
? EXTR_ROLE_BRIDGE
|
||||
: $is_solid
|
||||
? ($surface->surface_type == S_TYPE_TOP ? EXTR_ROLE_TOPSOLIDFILL : EXTR_ROLE_SOLIDFILL)
|
||||
: EXTR_ROLE_FILL),
|
||||
height => $surface->depth_layers * $layerm->height,
|
||||
flow_spacing => $params->{flow_spacing} || (warn "Warning: no flow_spacing was returned by the infill engine, please report this to the developer\n"),
|
||||
), @paths,
|
||||
|
|
|
@ -53,6 +53,7 @@ my %role_speeds = (
|
|||
&EXTR_ROLE_SOLIDFILL => 'solid_infill',
|
||||
&EXTR_ROLE_TOPSOLIDFILL => 'top_solid_infill',
|
||||
&EXTR_ROLE_BRIDGE => 'bridge',
|
||||
&EXTR_ROLE_INTERNALBRIDGE => 'solid_infill',
|
||||
&EXTR_ROLE_SKIRT => 'perimeter',
|
||||
&EXTR_ROLE_SUPPORTMATERIAL => 'support_material',
|
||||
&EXTR_ROLE_GAPFILL => 'gap_fill',
|
||||
|
@ -203,13 +204,13 @@ sub extrude_path {
|
|||
$acceleration = $Slic3r::Config->perimeter_acceleration;
|
||||
} elsif ($Slic3r::Config->infill_acceleration && $path->is_fill) {
|
||||
$acceleration = $Slic3r::Config->infill_acceleration;
|
||||
} elsif ($Slic3r::Config->infill_acceleration && $path->role == EXTR_ROLE_BRIDGE) {
|
||||
} elsif ($Slic3r::Config->infill_acceleration && ($path->role == EXTR_ROLE_BRIDGE || $path->role == EXTR_ROLE_INTERNALBRIDGE)) {
|
||||
$acceleration = $Slic3r::Config->bridge_acceleration;
|
||||
}
|
||||
$gcode .= $self->set_acceleration($acceleration) if $acceleration;
|
||||
|
||||
my $area; # mm^3 of extrudate per mm of tool movement
|
||||
if ($path->role == EXTR_ROLE_BRIDGE) {
|
||||
if ($path->role == EXTR_ROLE_BRIDGE || $path->role == EXTR_ROLE_INTERNALBRIDGE) {
|
||||
my $s = $path->flow_spacing;
|
||||
$area = ($s**2) * PI/4;
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue