Rename brim_thickness to brim_width

degen-loop-screen
Alessandro Ranellucci 2012-06-23 22:27:59 +02:00
parent a9d480f7bf
commit e72bd56b9d
6 changed files with 11 additions and 11 deletions

View File

@ -193,7 +193,7 @@ The author is Alessandro Ranellucci.
--skirt-distance Distance in mm between innermost skirt and object
(default: 6)
--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)
Transform options:

View File

@ -154,7 +154,7 @@ our $fan_always_on = 0;
our $skirts = 1;
our $skirt_distance = 6; # mm
our $skirt_height = 1; # layers
our $brim_thickness = 0; # mm
our $brim_width = 0; # mm
# transform options
our $scale = 1;

View File

@ -422,9 +422,9 @@ our $Options = {
cli => 'skirt-height=i',
type => 'i',
},
'brim_thickness' => {
label => 'Brim thickness (mm)',
cli => 'brim-thickness=f',
'brim_width' => {
label => 'Brim width (mm)',
cli => 'brim-width=f',
type => 'f',
},

View File

@ -57,7 +57,7 @@ sub new {
},
skirt => {
title => 'Skirt',
options => [qw(skirts skirt_distance skirt_height brim_thickness)],
options => [qw(skirts skirt_distance skirt_height brim_width)],
},
gcode => {
title => 'G-code',

View File

@ -461,7 +461,7 @@ sub make_skirt {
sub make_brim {
my $self = shift;
return unless $Slic3r::brim_thickness > 0;
return unless $Slic3r::brim_width > 0;
my @islands = (); # array of polygons
foreach my $obj_idx (0 .. $#{$self->objects}) {
@ -472,7 +472,7 @@ sub make_brim {
}
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) {
push @{$self->brim}, Slic3r::ExtrusionLoop->new(
polygon => Slic3r::Polygon->new($_),
@ -567,7 +567,7 @@ sub write_gcode {
$extruder->shift_y($shift[Y]);
$gcode .= $extruder->set_acceleration($Slic3r::perimeter_acceleration);
# 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};
}
$skirt_done++;

View File

@ -238,8 +238,8 @@ $j
--skirt-distance Distance in mm between innermost skirt and object
(default: $Slic3r::skirt_distance)
--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
(mm, default: $Slic3r::brim_thickness)
--brim-width Width of the brim that will get added to each object to help adhesion
(mm, default: $Slic3r::brim_width)
Transform options:
--scale Factor for scaling input object (default: $Slic3r::scale)