Rename brim_thickness to brim_width
This commit is contained in:
parent
a9d480f7bf
commit
e72bd56b9d
@ -193,7 +193,7 @@ The author is Alessandro Ranellucci.
|
|||||||
--skirt-distance Distance in mm between innermost skirt and object
|
--skirt-distance Distance in mm between innermost skirt and object
|
||||||
(default: 6)
|
(default: 6)
|
||||||
--skirt-height Height of skirts to draw (expressed in layers, 0+, default: 1)
|
--skirt-height Height of skirts to draw (expressed in layers, 0+, default: 1)
|
||||||
--brim-thickness Thickness of the brim that will get added to each object to help adhesion
|
--brim-width Width of the brim that will get added to each object to help adhesion
|
||||||
(mm, default: 0)
|
(mm, default: 0)
|
||||||
|
|
||||||
Transform options:
|
Transform options:
|
||||||
|
@ -154,7 +154,7 @@ our $fan_always_on = 0;
|
|||||||
our $skirts = 1;
|
our $skirts = 1;
|
||||||
our $skirt_distance = 6; # mm
|
our $skirt_distance = 6; # mm
|
||||||
our $skirt_height = 1; # layers
|
our $skirt_height = 1; # layers
|
||||||
our $brim_thickness = 0; # mm
|
our $brim_width = 0; # mm
|
||||||
|
|
||||||
# transform options
|
# transform options
|
||||||
our $scale = 1;
|
our $scale = 1;
|
||||||
|
@ -422,9 +422,9 @@ our $Options = {
|
|||||||
cli => 'skirt-height=i',
|
cli => 'skirt-height=i',
|
||||||
type => 'i',
|
type => 'i',
|
||||||
},
|
},
|
||||||
'brim_thickness' => {
|
'brim_width' => {
|
||||||
label => 'Brim thickness (mm)',
|
label => 'Brim width (mm)',
|
||||||
cli => 'brim-thickness=f',
|
cli => 'brim-width=f',
|
||||||
type => 'f',
|
type => 'f',
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -57,7 +57,7 @@ sub new {
|
|||||||
},
|
},
|
||||||
skirt => {
|
skirt => {
|
||||||
title => 'Skirt',
|
title => 'Skirt',
|
||||||
options => [qw(skirts skirt_distance skirt_height brim_thickness)],
|
options => [qw(skirts skirt_distance skirt_height brim_width)],
|
||||||
},
|
},
|
||||||
gcode => {
|
gcode => {
|
||||||
title => 'G-code',
|
title => 'G-code',
|
||||||
|
@ -461,7 +461,7 @@ sub make_skirt {
|
|||||||
|
|
||||||
sub make_brim {
|
sub make_brim {
|
||||||
my $self = shift;
|
my $self = shift;
|
||||||
return unless $Slic3r::brim_thickness > 0;
|
return unless $Slic3r::brim_width > 0;
|
||||||
|
|
||||||
my @islands = (); # array of polygons
|
my @islands = (); # array of polygons
|
||||||
foreach my $obj_idx (0 .. $#{$self->objects}) {
|
foreach my $obj_idx (0 .. $#{$self->objects}) {
|
||||||
@ -472,7 +472,7 @@ sub make_brim {
|
|||||||
}
|
}
|
||||||
|
|
||||||
my $flow = $Slic3r::first_layer_flow || $Slic3r::flow;
|
my $flow = $Slic3r::first_layer_flow || $Slic3r::flow;
|
||||||
my $num_loops = sprintf "%.0f", $Slic3r::brim_thickness / $flow->width;
|
my $num_loops = sprintf "%.0f", $Slic3r::brim_width / $flow->width;
|
||||||
for my $i (reverse 1 .. $num_loops) {
|
for my $i (reverse 1 .. $num_loops) {
|
||||||
push @{$self->brim}, Slic3r::ExtrusionLoop->new(
|
push @{$self->brim}, Slic3r::ExtrusionLoop->new(
|
||||||
polygon => Slic3r::Polygon->new($_),
|
polygon => Slic3r::Polygon->new($_),
|
||||||
@ -567,7 +567,7 @@ sub write_gcode {
|
|||||||
$extruder->shift_y($shift[Y]);
|
$extruder->shift_y($shift[Y]);
|
||||||
$gcode .= $extruder->set_acceleration($Slic3r::perimeter_acceleration);
|
$gcode .= $extruder->set_acceleration($Slic3r::perimeter_acceleration);
|
||||||
# skip skirt if we have a large brim
|
# skip skirt if we have a large brim
|
||||||
if ($layer_id < $Slic3r::skirt_height && ($layer_id != 0 || $Slic3r::skirt_distance + ($Slic3r::skirts * $Slic3r::flow->width) > $Slic3r::brim_thickness)) {
|
if ($layer_id < $Slic3r::skirt_height && ($layer_id != 0 || $Slic3r::skirt_distance + ($Slic3r::skirts * $Slic3r::flow->width) > $Slic3r::brim_width)) {
|
||||||
$gcode .= $extruder->extrude_loop($_, 'skirt') for @{$self->skirt};
|
$gcode .= $extruder->extrude_loop($_, 'skirt') for @{$self->skirt};
|
||||||
}
|
}
|
||||||
$skirt_done++;
|
$skirt_done++;
|
||||||
|
@ -238,8 +238,8 @@ $j
|
|||||||
--skirt-distance Distance in mm between innermost skirt and object
|
--skirt-distance Distance in mm between innermost skirt and object
|
||||||
(default: $Slic3r::skirt_distance)
|
(default: $Slic3r::skirt_distance)
|
||||||
--skirt-height Height of skirts to draw (expressed in layers, 0+, default: $Slic3r::skirt_height)
|
--skirt-height Height of skirts to draw (expressed in layers, 0+, default: $Slic3r::skirt_height)
|
||||||
--brim-thickness Thickness of the brim that will get added to each object to help adhesion
|
--brim-width Width of the brim that will get added to each object to help adhesion
|
||||||
(mm, default: $Slic3r::brim_thickness)
|
(mm, default: $Slic3r::brim_width)
|
||||||
|
|
||||||
Transform options:
|
Transform options:
|
||||||
--scale Factor for scaling input object (default: $Slic3r::scale)
|
--scale Factor for scaling input object (default: $Slic3r::scale)
|
||||||
|
Loading…
Reference in New Issue
Block a user