Renamed "multiply" to "duplicate". #7
This commit is contained in:
parent
279bfbb10d
commit
71a44e253c
@ -45,7 +45,7 @@ Slic3r current features are:
|
|||||||
* save configuration profiles;
|
* save configuration profiles;
|
||||||
* center print around bed center point;
|
* center print around bed center point;
|
||||||
* multiple solid layers near horizontal external surfaces;
|
* multiple solid layers near horizontal external surfaces;
|
||||||
* ability to scale, rotate and multiply input object;
|
* ability to scale, rotate and duplicate input object;
|
||||||
* customizable initial and final GCODE (using command line only);
|
* customizable initial and final GCODE (using command line only);
|
||||||
* use different speed for bottom layer and perimeters;
|
* use different speed for bottom layer and perimeters;
|
||||||
* experimental support for G2/G3 native arcs.
|
* experimental support for G2/G3 native arcs.
|
||||||
@ -147,8 +147,8 @@ The author is Alessandro Ranellucci (me).
|
|||||||
Transform options:
|
Transform options:
|
||||||
--scale Factor for scaling input object (default: 1)
|
--scale Factor for scaling input object (default: 1)
|
||||||
--rotate Rotation angle in degrees (0-360, default: 0)
|
--rotate Rotation angle in degrees (0-360, default: 0)
|
||||||
--multiply-x Number of items along X axis (1+, default: 1)
|
--duplicate-x Number of items along X axis (1+, default: 1)
|
||||||
--multiply-y Number of items along Y axis (1+, default: 1)
|
--duplicate-y Number of items along Y axis (1+, default: 1)
|
||||||
--multiply-distance Distance in mm between copies (default: 6)
|
--duplicate-distance Distance in mm between copies (default: 6)
|
||||||
|
|
||||||
|
|
||||||
|
@ -83,8 +83,8 @@ our $skirt_distance = 6; # mm
|
|||||||
# transform options
|
# transform options
|
||||||
our $scale = 1;
|
our $scale = 1;
|
||||||
our $rotate = 0;
|
our $rotate = 0;
|
||||||
our $multiply_x = 1;
|
our $duplicate_x = 1;
|
||||||
our $multiply_y = 1;
|
our $duplicate_y = 1;
|
||||||
our $multiply_distance = 6; # mm
|
our $duplicate_distance = 6; # mm
|
||||||
|
|
||||||
1;
|
1;
|
||||||
|
@ -136,16 +136,16 @@ our $Options = {
|
|||||||
label => 'Rotate (°)',
|
label => 'Rotate (°)',
|
||||||
type => 'i',
|
type => 'i',
|
||||||
},
|
},
|
||||||
'multiply_x' => {
|
'duplicate_x' => {
|
||||||
label => 'Multiply along X',
|
label => 'Copies along X',
|
||||||
type => 'i',
|
type => 'i',
|
||||||
},
|
},
|
||||||
'multiply_y' => {
|
'duplicate_y' => {
|
||||||
label => 'Multiply along Y',
|
label => 'Copies along Y',
|
||||||
type => 'i',
|
type => 'i',
|
||||||
},
|
},
|
||||||
'multiply_distance' => {
|
'duplicate_distance' => {
|
||||||
label => 'Multiply distance',
|
label => 'Distance between copies',
|
||||||
type => 'i',
|
type => 'i',
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
@ -272,17 +272,17 @@ sub validate {
|
|||||||
die "Invalid value for --scale\n"
|
die "Invalid value for --scale\n"
|
||||||
if $Slic3r::scale <= 0;
|
if $Slic3r::scale <= 0;
|
||||||
|
|
||||||
# --multiply-x
|
# --duplicate-x
|
||||||
die "Invalid value for --multiply-x\n"
|
die "Invalid value for --duplicate-x\n"
|
||||||
if $Slic3r::multiply_x < 1;
|
if $Slic3r::duplicate_x < 1;
|
||||||
|
|
||||||
# --multiply-y
|
# --duplicate-y
|
||||||
die "Invalid value for --multiply-y\n"
|
die "Invalid value for --duplicate-y\n"
|
||||||
if $Slic3r::multiply_y < 1;
|
if $Slic3r::duplicate_y < 1;
|
||||||
|
|
||||||
# --multiply-distance
|
# --duplicate-distance
|
||||||
die "Invalid value for --multiply-distance\n"
|
die "Invalid value for --duplicate-distance\n"
|
||||||
if $Slic3r::multiply_distance < 1;
|
if $Slic3r::duplicate_distance < 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
1;
|
1;
|
||||||
|
@ -45,7 +45,7 @@ sub new {
|
|||||||
),
|
),
|
||||||
transform => Slic3r::GUI::OptionsGroup->new($self,
|
transform => Slic3r::GUI::OptionsGroup->new($self,
|
||||||
title => 'Transform',
|
title => 'Transform',
|
||||||
options => [qw(scale rotate multiply_x multiply_y multiply_distance)],
|
options => [qw(scale rotate duplicate_x duplicate_y duplicate_distance)],
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
$self->{panels} = \%panels;
|
$self->{panels} = \%panels;
|
||||||
|
@ -47,17 +47,17 @@ sub parse_file {
|
|||||||
$extents[$_][MAX] *= $Slic3r::scale;
|
$extents[$_][MAX] *= $Slic3r::scale;
|
||||||
}
|
}
|
||||||
|
|
||||||
# multiply object
|
# duplicate object
|
||||||
my @multiply_offset = (
|
my @duplicate_offset = (
|
||||||
(($extents[X][MAX] - $extents[X][MIN]) + $Slic3r::multiply_distance),
|
(($extents[X][MAX] - $extents[X][MIN]) + $Slic3r::duplicate_distance),
|
||||||
(($extents[Y][MAX] - $extents[Y][MIN]) + $Slic3r::multiply_distance),
|
(($extents[Y][MAX] - $extents[Y][MIN]) + $Slic3r::duplicate_distance),
|
||||||
);
|
);
|
||||||
$extents[X][MAX] += $multiply_offset[X] * ($Slic3r::multiply_x-1);
|
$extents[X][MAX] += $duplicate_offset[X] * ($Slic3r::duplicate_x-1);
|
||||||
$extents[Y][MAX] += $multiply_offset[Y] * ($Slic3r::multiply_y-1);
|
$extents[Y][MAX] += $duplicate_offset[Y] * ($Slic3r::duplicate_y-1);
|
||||||
my @copies = ();
|
my @copies = ();
|
||||||
for (my $i = 0; $i < $Slic3r::multiply_x; $i++) {
|
for (my $i = 0; $i < $Slic3r::duplicate_x; $i++) {
|
||||||
for (my $j = 0; $j < $Slic3r::multiply_y; $j++) {
|
for (my $j = 0; $j < $Slic3r::duplicate_y; $j++) {
|
||||||
push @copies, [ $multiply_offset[X] * $i, $multiply_offset[Y] * $j ];
|
push @copies, [ $duplicate_offset[X] * $i, $duplicate_offset[Y] * $j ];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
14
slic3r.pl
14
slic3r.pl
@ -66,9 +66,9 @@ GetOptions(
|
|||||||
# transform options
|
# transform options
|
||||||
'scale=f' => \$Slic3r::scale,
|
'scale=f' => \$Slic3r::scale,
|
||||||
'rotate=i' => \$Slic3r::rotate,
|
'rotate=i' => \$Slic3r::rotate,
|
||||||
'multiply-x=i' => \$Slic3r::multiply_x,
|
'duplicate-x=i' => \$Slic3r::duplicate_x,
|
||||||
'multiply-y=i' => \$Slic3r::multiply_y,
|
'duplicate-y=i' => \$Slic3r::duplicate_y,
|
||||||
'multiply-distance=i' => \$Slic3r::multiply_distance,
|
'duplicate-distance=i' => \$Slic3r::duplicate_distance,
|
||||||
);
|
);
|
||||||
|
|
||||||
# load configuration
|
# load configuration
|
||||||
@ -133,7 +133,7 @@ Usage: slic3r.pl [ OPTIONS ] file.stl
|
|||||||
by all firmwares)
|
by all firmwares)
|
||||||
|
|
||||||
Filament options:
|
Filament options:
|
||||||
--filament-diameter Diameter of your raw filament (default: $Slic3r::filament_diameter)
|
--filament-diameter Diameter in mm of your raw filament (default: $Slic3r::filament_diameter)
|
||||||
--filament-packing-density
|
--filament-packing-density
|
||||||
Ratio of the extruded volume over volume pushed
|
Ratio of the extruded volume over volume pushed
|
||||||
into the extruder (default: $Slic3r::filament_packing_density)
|
into the extruder (default: $Slic3r::filament_packing_density)
|
||||||
@ -184,9 +184,9 @@ Usage: slic3r.pl [ OPTIONS ] file.stl
|
|||||||
Transform options:
|
Transform options:
|
||||||
--scale Factor for scaling input object (default: $Slic3r::scale)
|
--scale Factor for scaling input object (default: $Slic3r::scale)
|
||||||
--rotate Rotation angle in degrees (0-360, default: $Slic3r::rotate)
|
--rotate Rotation angle in degrees (0-360, default: $Slic3r::rotate)
|
||||||
--multiply-x Number of items along X axis (1+, default: $Slic3r::multiply_x)
|
--duplicate-x Number of items along X axis (1+, default: $Slic3r::duplicate_x)
|
||||||
--multiply-y Number of items along Y axis (1+, default: $Slic3r::multiply_y)
|
--duplicate-y Number of items along Y axis (1+, default: $Slic3r::duplicate_y)
|
||||||
--multiply-distance Distance in mm between copies (default: $Slic3r::multiply_distance)
|
--duplicate-distance Distance in mm between copies (default: $Slic3r::duplicate_distance)
|
||||||
|
|
||||||
EOF
|
EOF
|
||||||
exit ($exit_code || 0);
|
exit ($exit_code || 0);
|
||||||
|
Loading…
Reference in New Issue
Block a user