From ad9be0e4d703aab42b2721762a03373e98977515 Mon Sep 17 00:00:00 2001 From: Alessandro Ranellucci Date: Sun, 13 Jan 2013 10:18:34 +0100 Subject: [PATCH 01/26] Bugfix: crash when reading/writing files to paths containing non-ASCII characters on Windows. #651 #865 --- Build.PL | 1 + lib/Slic3r.pm | 8 ++++++++ lib/Slic3r/Config.pm | 6 +++--- lib/Slic3r/Format/AMF.pm | 4 ++-- lib/Slic3r/Format/OBJ.pm | 2 +- lib/Slic3r/Format/STL.pm | 4 ++-- lib/Slic3r/Print.pm | 4 ++-- lib/Slic3r/SVG.pm | 2 +- 8 files changed, 20 insertions(+), 11 deletions(-) diff --git a/Build.PL b/Build.PL index 53dccbbba8..e77e31fba6 100644 --- a/Build.PL +++ b/Build.PL @@ -8,6 +8,7 @@ my $build = Module::Build->new( license => 'perl', requires => { 'Boost::Geometry::Utils' => '0', + 'Encode::Locale' => '0', 'File::Basename' => '0', 'File::Spec' => '0', 'Getopt::Long' => '0', diff --git a/lib/Slic3r.pm b/lib/Slic3r.pm index 4a0b1bb371..4ca5b43838 100644 --- a/lib/Slic3r.pm +++ b/lib/Slic3r.pm @@ -27,7 +27,10 @@ warn "Running Slic3r under Perl >= 5.16 is not supported nor recommended\n" use FindBin; our $var = "$FindBin::Bin/var"; +use Encode; +use Encode::Locale; use Moo 0.091009; + use Slic3r::Config; use Slic3r::ExPolygon; use Slic3r::Extruder; @@ -88,4 +91,9 @@ sub parallelize { } } +sub open { + my ($fh, $mode, $filename) = @_; + return CORE::open $$fh, $mode, encode('locale_fs', $filename); +} + 1; diff --git a/lib/Slic3r/Config.pm b/lib/Slic3r/Config.pm index a310361d58..d79fdf9c40 100644 --- a/lib/Slic3r/Config.pm +++ b/lib/Slic3r/Config.pm @@ -946,7 +946,7 @@ sub new_from_cli { if ($args{$opt_key}) { die "Invalid value for --${_}-gcode: file does not exist\n" if !-e $args{$opt_key}; - open my $fh, "<", $args{$opt_key} + Slic3r::open(\my $fh, "<", $args{$opt_key}) or die "Failed to open $args{$opt_key}\n"; binmode $fh, ':utf8'; $args{$opt_key} = do { local $/; <$fh> }; @@ -1251,7 +1251,7 @@ sub write_ini { my $class = shift; my ($file, $ini) = @_; - open my $fh, '>', $file; + Slic3r::open(\my $fh, '>', $file); binmode $fh, ':utf8'; my $localtime = localtime; printf $fh "# generated by Slic3r $Slic3r::VERSION on %s\n", "$localtime"; @@ -1269,7 +1269,7 @@ sub read_ini { my ($file) = @_; local $/ = "\n"; - open my $fh, '<', $file; + Slic3r::open(\my $fh, '<', $file); binmode $fh, ':utf8'; my $ini = { _ => {} }; diff --git a/lib/Slic3r/Format/AMF.pm b/lib/Slic3r/Format/AMF.pm index 0e44353cfd..0b3bbc1ed7 100644 --- a/lib/Slic3r/Format/AMF.pm +++ b/lib/Slic3r/Format/AMF.pm @@ -13,7 +13,7 @@ sub read_file { 1; } or die "AMF parsing requires XML::SAX\n"; - open my $fh, '<', $file or die "Failed to open $file\n"; + Slic3r::open(\my $fh, '<', $file) or die "Failed to open $file\n"; my $model = Slic3r::Model->new; XML::SAX::ParserFactory @@ -30,7 +30,7 @@ sub write_file { my %vertices_offset = (); - open my $fh, '>', $file; + Slic3r::open(\my $fh, '>', $file); binmode $fh, ':utf8'; printf $fh qq{\n}; printf $fh qq{\n}; diff --git a/lib/Slic3r/Format/OBJ.pm b/lib/Slic3r/Format/OBJ.pm index d663cfb5a7..c5cc085558 100644 --- a/lib/Slic3r/Format/OBJ.pm +++ b/lib/Slic3r/Format/OBJ.pm @@ -5,7 +5,7 @@ sub read_file { my $self = shift; my ($file) = @_; - open my $fh, '<', $file or die "Failed to open $file\n"; + Slic3r::open(\my $fh, '<', $file) or die "Failed to open $file\n"; my $vertices = []; my $facets = []; while (my $_ = <$fh>) { diff --git a/lib/Slic3r/Format/STL.pm b/lib/Slic3r/Format/STL.pm index 6e96651854..5c992230e4 100644 --- a/lib/Slic3r/Format/STL.pm +++ b/lib/Slic3r/Format/STL.pm @@ -7,7 +7,7 @@ sub read_file { my $self = shift; my ($file) = @_; - open my $fh, '<', $file or die "Failed to open $file\n"; + Slic3r::open(\my $fh, '<', $file) or die "Failed to open $file\n"; # let's detect whether file is ASCII or binary my $mode; @@ -103,7 +103,7 @@ sub write_file { my $self = shift; my ($file, $model, %params) = @_; - open my $fh, '>', $file; + Slic3r::open(\my $fh, '>', $file); $params{binary} ? _write_binary($fh, $model->mesh) diff --git a/lib/Slic3r/Print.pm b/lib/Slic3r/Print.pm index e3f3c3adfb..5540632dbb 100644 --- a/lib/Slic3r/Print.pm +++ b/lib/Slic3r/Print.pm @@ -472,7 +472,7 @@ sub export_svg { my $output_file = $self->expanded_output_filepath($params{output_file}); $output_file =~ s/\.gcode$/.svg/i; - open my $fh, ">", $output_file or die "Failed to open $output_file for writing\n"; + Slic3r::open(\my $fh, ">", $output_file) or die "Failed to open $output_file for writing\n"; print "Exporting to $output_file..."; my $print_size = $self->size; print $fh sprintf <<"EOF", unscale($print_size->[X]), unscale($print_size->[Y]); @@ -647,7 +647,7 @@ sub write_gcode { if (ref $file eq 'IO::Scalar') { $fh = $file; } else { - open $fh, ">", $file + Slic3r::open(\$fh, ">", $file) or die "Failed to open $file for writing\n"; } diff --git a/lib/Slic3r/SVG.pm b/lib/Slic3r/SVG.pm index 8621614b55..0179ea7692 100644 --- a/lib/Slic3r/SVG.pm +++ b/lib/Slic3r/SVG.pm @@ -130,7 +130,7 @@ sub output_lines { sub write_svg { my ($svg, $filename) = @_; - open my $fh, '>', $filename; + Slic3r::open(\my $fh, '>', $filename); print $fh $svg->xmlify; close $fh; printf "SVG written to %s\n", $filename; From 68fc91d854ca7cc61b5b53af71574ec135f99916 Mon Sep 17 00:00:00 2001 From: Mike Sheldrake Date: Sun, 13 Jan 2013 02:50:49 -0800 Subject: [PATCH 02/26] offset miter limit to 3 - 801 828 836 851 875 - spikes and pimples Was set to 10 to address 801. Setting to 3 has the same effect for 801, and avoids spike artifacts that are likely causing "spike and pimple" problems in the referenced issues. --- lib/Slic3r/Geometry/Clipper.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Slic3r/Geometry/Clipper.pm b/lib/Slic3r/Geometry/Clipper.pm index 9dedc7a96a..0ec5536535 100644 --- a/lib/Slic3r/Geometry/Clipper.pm +++ b/lib/Slic3r/Geometry/Clipper.pm @@ -21,7 +21,7 @@ sub offset { my ($polygons, $distance, $scale, $joinType, $miterLimit) = @_; $scale ||= 100000; $joinType //= JT_MITER; - $miterLimit //= 10; + $miterLimit //= 3; my $offsets = Math::Clipper::offset($polygons, $distance, $scale, $joinType, $miterLimit); return @$offsets; From bce3e9621048f735bf96b2d6a16eea5d9518ab9f Mon Sep 17 00:00:00 2001 From: Mike Sheldrake Date: Mon, 14 Jan 2013 21:18:31 -0800 Subject: [PATCH 03/26] extraneous fill against sloped walls with fill every N layers #834 Polygons used for N x depth fill surfaces need to be offset by flow spacing before they are reused to clip lower fill surfaces. Otherwise thin fill sections remain on clipped layers against sloping walls, and the N x depth fill collides with them. --- lib/Slic3r/Print/Object.pm | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/lib/Slic3r/Print/Object.pm b/lib/Slic3r/Print/Object.pm index bf4f77aa07..f858249616 100644 --- a/lib/Slic3r/Print/Object.pm +++ b/lib/Slic3r/Print/Object.pm @@ -445,8 +445,8 @@ sub combine_infill { my $area_threshold = $Slic3r::flow->scaled_spacing ** 2; for my $region_id (0 .. ($self->print->regions_count-1)) { - # start from bottom, skip first layer - for (my $i = 1; $i < $self->layer_count; $i++) { + # start from top, skip lowest layer + for (my $i = $self->layer_count - 1; $i > 0; $i--) { my $layerm = $self->layers->[$i]->regions->[$region_id]; # skip layer if no internal fill surfaces @@ -506,6 +506,13 @@ sub combine_infill { { my @new_surfaces = (); push @new_surfaces, grep $_->surface_type != S_TYPE_INTERNAL, @{$lower_layerm->fill_surfaces}; + + # offset for the two different flow spacings + $intersection = [ map $_->offset_ex( + $lower_layerm->perimeter_flow->scaled_spacing / 2 + + $layerm->perimeter_flow->scaled_spacing / 2 + ), @$intersection]; + foreach my $depth (1..$Slic3r::Config->infill_every_layers) { push @new_surfaces, map Slic3r::Surface->new (expolygon => $_, surface_type => S_TYPE_INTERNAL, depth_layers => $depth), From 4bff4d0d508990845450144f54c71659d36c9402 Mon Sep 17 00:00:00 2001 From: Alessandro Ranellucci Date: Tue, 15 Jan 2013 12:50:15 +0100 Subject: [PATCH 04/26] Ignore perimeter_acceleration and infill_acceleration if their values are 25 and 50 to handle legacy configs gracefully. --- lib/Slic3r/Config.pm | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/lib/Slic3r/Config.pm b/lib/Slic3r/Config.pm index d79fdf9c40..f691ae35b5 100644 --- a/lib/Slic3r/Config.pm +++ b/lib/Slic3r/Config.pm @@ -1024,6 +1024,17 @@ sub set { $value = 1; } + # For historical reasons, the world's full of configs having these very low values; + # to avoid unexpected behavior we need to ignore them. Banning these two hard-coded + # values is a dirty hack and will need to be removed sometime in the future, but it + # will avoid lots of complaints for now. + if ($opt_key eq 'perimeter_acceleration' && $value == '25') { + $value = 0; + } + if ($opt_key eq 'infill_acceleration' && $value == '50') { + $value = 0; + } + if (!exists $Options->{$opt_key}) { my @keys = grep { $Options->{$_}{aliases} && grep $_ eq $opt_key, @{$Options->{$_}{aliases}} } keys %$Options; if (!@keys) { From 85934e17383d2f326ec0e725c654816d9636762b Mon Sep 17 00:00:00 2001 From: Mike Sheldrake Date: Tue, 15 Jan 2013 22:13:11 -0800 Subject: [PATCH 05/26] use infill flow spacing, not perimeter, for combine_infill() clip offsets --- lib/Slic3r/Print/Object.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/Slic3r/Print/Object.pm b/lib/Slic3r/Print/Object.pm index f858249616..01c71af45e 100644 --- a/lib/Slic3r/Print/Object.pm +++ b/lib/Slic3r/Print/Object.pm @@ -509,8 +509,8 @@ sub combine_infill { # offset for the two different flow spacings $intersection = [ map $_->offset_ex( - $lower_layerm->perimeter_flow->scaled_spacing / 2 - + $layerm->perimeter_flow->scaled_spacing / 2 + $lower_layerm->infill_flow->scaled_spacing / 2 + + $layerm->infill_flow->scaled_spacing / 2 ), @$intersection]; foreach my $depth (1..$Slic3r::Config->infill_every_layers) { From f3a1221039392fe40e47a6641babed021a4df294 Mon Sep 17 00:00:00 2001 From: Mike Sheldrake Date: Wed, 16 Jan 2013 05:52:26 -0800 Subject: [PATCH 06/26] per-thread clipper object for parallel support generation #888 --- lib/Slic3r/Print/Object.pm | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/Slic3r/Print/Object.pm b/lib/Slic3r/Print/Object.pm index 01c71af45e..cbafda2d50 100644 --- a/lib/Slic3r/Print/Object.pm +++ b/lib/Slic3r/Print/Object.pm @@ -674,6 +674,7 @@ sub generate_support_material { items => [ keys %layers ], thread_cb => sub { my $q = shift; + $Slic3r::Geometry::Clipper::clipper = Math::Clipper->new; my $result = {}; while (defined (my $layer_id = $q->dequeue)) { $result->{$layer_id} = [ $process_layer->($layer_id) ]; From ecc7e4560e661de3acbec2234dfa4d0b6f073f32 Mon Sep 17 00:00:00 2001 From: Alessandro Ranellucci Date: Thu, 17 Jan 2013 10:39:05 +0100 Subject: [PATCH 07/26] Don't fill gaps if fill density is 0. #915 --- lib/Slic3r/Layer/Region.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Slic3r/Layer/Region.pm b/lib/Slic3r/Layer/Region.pm index 238a8e98e6..37d9b7723b 100644 --- a/lib/Slic3r/Layer/Region.pm +++ b/lib/Slic3r/Layer/Region.pm @@ -252,7 +252,7 @@ sub make_perimeters { } # fill gaps - if ($Slic3r::Config->gap_fill_speed > 0) { + if ($Slic3r::Config->gap_fill_speed > 0 && $Slic3r::Config->fill_density > 0) { my $filler = Slic3r::Fill::Rectilinear->new(layer_id => $self->layer->id); my $w = $self->perimeter_flow->width; From 954520cba5e51832d668e9fc3c0837b370e2d6f7 Mon Sep 17 00:00:00 2001 From: Alessandro Ranellucci Date: Thu, 17 Jan 2013 10:40:45 +0100 Subject: [PATCH 08/26] Enable cooling by default --- lib/Slic3r/Config.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Slic3r/Config.pm b/lib/Slic3r/Config.pm index f691ae35b5..98e6702c8e 100644 --- a/lib/Slic3r/Config.pm +++ b/lib/Slic3r/Config.pm @@ -715,7 +715,7 @@ END tooltip => 'This flag enables all the cooling features.', cli => 'cooling!', type => 'bool', - default => 0, + default => 1, }, 'min_fan_speed' => { label => 'Min', From 0ddd6d9e553507e99b3975f108e444611aa3a92a Mon Sep 17 00:00:00 2001 From: Alessandro Ranellucci Date: Thu, 17 Jan 2013 11:11:22 +0100 Subject: [PATCH 09/26] Require Math::Clipper 1.17 --- Build.PL | 2 +- lib/Slic3r/Geometry/Clipper.pm | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Build.PL b/Build.PL index e77e31fba6..89af11ed83 100644 --- a/Build.PL +++ b/Build.PL @@ -12,7 +12,7 @@ my $build = Module::Build->new( 'File::Basename' => '0', 'File::Spec' => '0', 'Getopt::Long' => '0', - 'Math::Clipper' => '1.15', + 'Math::Clipper' => '1.17', 'Math::ConvexHull::MonotoneChain' => '0.01', 'Math::Geometry::Voronoi' => '1.3', 'Math::PlanePath' => '53', diff --git a/lib/Slic3r/Geometry/Clipper.pm b/lib/Slic3r/Geometry/Clipper.pm index 0ec5536535..292e88f27f 100644 --- a/lib/Slic3r/Geometry/Clipper.pm +++ b/lib/Slic3r/Geometry/Clipper.pm @@ -8,7 +8,7 @@ our @EXPORT_OK = qw(safety_offset offset offset_ex diff_ex diff union_ex intersection_ex xor_ex PFT_EVENODD JT_MITER JT_ROUND JT_SQUARE is_counter_clockwise); -use Math::Clipper 1.15 qw(:cliptypes :polyfilltypes :jointypes is_counter_clockwise area); +use Math::Clipper 1.17 qw(:cliptypes :polyfilltypes :jointypes is_counter_clockwise area); use Slic3r::Geometry qw(scale); our $clipper = Math::Clipper->new; From 4fc6fc5ab6f3ed632f6aa6efcd745ab40e4f2d0b Mon Sep 17 00:00:00 2001 From: Alessandro Ranellucci Date: Thu, 17 Jan 2013 11:51:00 +0100 Subject: [PATCH 10/26] Increase default value for retract_length_toolchange --- lib/Slic3r/Config.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Slic3r/Config.pm b/lib/Slic3r/Config.pm index 98e6702c8e..751462ef55 100644 --- a/lib/Slic3r/Config.pm +++ b/lib/Slic3r/Config.pm @@ -696,7 +696,7 @@ END type => 'f', serialize => $serialize_comma, deserialize => $deserialize_comma, - default => [3], + default => [10], }, 'retract_restart_extra_toolchange' => { label => 'Extra length on restart', From 4d8757bf5da269b35133c6d6be3f06c3465b9ec9 Mon Sep 17 00:00:00 2001 From: Alessandro Ranellucci Date: Thu, 17 Jan 2013 11:59:14 +0100 Subject: [PATCH 11/26] Interface support layers were clipped badly. Also, reduce simplification of the clipping boundaries. #583 --- lib/Slic3r/Print/Object.pm | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/lib/Slic3r/Print/Object.pm b/lib/Slic3r/Print/Object.pm index cbafda2d50..e9ca00428f 100644 --- a/lib/Slic3r/Print/Object.pm +++ b/lib/Slic3r/Print/Object.pm @@ -561,9 +561,14 @@ sub generate_support_material { my $layer = $self->layers->[$i]; my $lower_layer = $i > 0 ? $self->layers->[$i-1] : undef; + my @current_layer_offsetted_slices = map $_->offset_ex($distance_from_object), @{$layer->slices}; + # $queue[-1] contains the overhangs of the upper layer, regardless of any empty interface layers # $queue[0] contains the overhangs of the first upper layer above the empty interface layers - $layers_interfaces{$i} = [@{ $queue[-1] || [] }]; + $layers_interfaces{$i} = diff_ex( + [ @{ $queue[-1] || [] } ], + [ map @$_, @current_layer_offsetted_slices ], + ); # step 1: generate support material in current layer (for upper layers) push @current_support_regions, @{ shift @queue } if @queue && $i < $#{$self->layers}; @@ -576,11 +581,11 @@ sub generate_support_material { $layers{$i} = diff_ex( [ map @$_, @current_support_regions ], [ - (map @$_, map $_->offset_ex($distance_from_object), @{$layer->slices}), + (map @$_, @current_layer_offsetted_slices), (map @$_, @{ $layers_interfaces{$i} }), ], ); - $_->simplify($flow->scaled_spacing * 2) for @{$layers{$i}}; + $_->simplify($flow->scaled_spacing) for @{$layers{$i}}; # step 2: get layer overhangs and put them into queue for adding support inside lower layers # we need an angle threshold for this From 97f0b7a3724e10f4c7729a8e4d968df06ab377cb Mon Sep 17 00:00:00 2001 From: Alessandro Ranellucci Date: Thu, 17 Jan 2013 12:27:39 +0100 Subject: [PATCH 12/26] Update retraction.t to work with two-phase retractions (triggered by changing the default retract_length_toolchange to something greater than 3) --- t/retraction.t | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/t/retraction.t b/t/retraction.t index 8ad1fbc793..3d10876567 100644 --- a/t/retraction.t +++ b/t/retraction.t @@ -21,6 +21,7 @@ my $test = sub { my $tool = 0; my @toolchange_count = (); # track first usages so that we don't expect retract_length_toolchange when extruders are used for the first time my @retracted = (1); # ignore the first travel move from home to first point + my @retracted_length = (0); my $lifted = 0; my $changed_tool = 0; my $wait_for_toolchange = 0; @@ -52,21 +53,22 @@ my $test = sub { } } if ($info->{retracting}) { - if (_eq(-$info->{dist_E}, $print->extruders->[$tool]->retract_length)) { + $retracted[$tool] = 1; + $retracted_length[$tool] += -$info->{dist_E}; + if (_eq($retracted_length[$tool], $print->extruders->[$tool]->retract_length)) { # okay - } elsif (_eq(-$info->{dist_E}, $print->extruders->[$tool]->retract_length_toolchange)) { + } elsif (_eq($retracted_length[$tool], $print->extruders->[$tool]->retract_length_toolchange)) { $wait_for_toolchange = 1; } else { fail 'retracted by the correct amount'; } fail 'combining retraction and travel with G0' if $cmd ne 'G0' && $conf->g0 && ($info->{dist_Z} || $info->{dist_XY}); - $retracted[$tool] = 1; } if ($info->{extruding}) { fail 'only extruding while not lifted' if $lifted; if ($retracted[$tool]) { - my $expected_amount = $print->extruders->[$tool]->retract_length + $print->extruders->[$tool]->retract_restart_extra; + my $expected_amount = $retracted_length[$tool] + $print->extruders->[$tool]->retract_restart_extra; if ($changed_tool && $toolchange_count[$tool] > 1) { $expected_amount = $print->extruders->[$tool]->retract_length_toolchange + $print->extruders->[$tool]->retract_restart_extra_toolchange; $changed_tool = 0; @@ -74,6 +76,7 @@ my $test = sub { fail 'unretracted by the correct amount' if !_eq($info->{dist_E}, $expected_amount); $retracted[$tool] = 0; + $retracted_length[$tool] = 0; } } if ($info->{travel} && $info->{dist_XY} >= $print->extruders->[$tool]->retract_before_travel) { From 92feebf5fe474bb9c46f2033d6d26302186e496a Mon Sep 17 00:00:00 2001 From: Alessandro Ranellucci Date: Thu, 17 Jan 2013 12:32:57 +0100 Subject: [PATCH 13/26] Fixed regression introduced in 4d8757bf5da269b35133c6d6be3f06c3465b9ec9 causing crash during support material generation --- lib/Slic3r/Print/Object.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Slic3r/Print/Object.pm b/lib/Slic3r/Print/Object.pm index e9ca00428f..1457a66ec8 100644 --- a/lib/Slic3r/Print/Object.pm +++ b/lib/Slic3r/Print/Object.pm @@ -566,7 +566,7 @@ sub generate_support_material { # $queue[-1] contains the overhangs of the upper layer, regardless of any empty interface layers # $queue[0] contains the overhangs of the first upper layer above the empty interface layers $layers_interfaces{$i} = diff_ex( - [ @{ $queue[-1] || [] } ], + [ map @$_, @{ $queue[-1] || [] } ], [ map @$_, @current_layer_offsetted_slices ], ); From 6dc055fa13e7bd3a196e0332c5fbb7a87fbe6561 Mon Sep 17 00:00:00 2001 From: Alessandro Ranellucci Date: Thu, 17 Jan 2013 12:54:48 +0100 Subject: [PATCH 14/26] Fix help text s/perimeters-/perimeter-/. #917 --- README.markdown | 4 ++-- slic3r.pl | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.markdown b/README.markdown index bf7ff336b3..a6aaaf952d 100644 --- a/README.markdown +++ b/README.markdown @@ -274,7 +274,7 @@ The author of the Silk icon set is Mark James. (like 0.65) or a percentage over layer height (like 200%) --first-layer-extrusion-width Set a different extrusion width for first layer - --perimeters-extrusion-width + --perimeter-extrusion-width Set a different extrusion width for perimeters --infill-extrusion-width Set a different extrusion width for infill @@ -285,7 +285,7 @@ The author of the Silk icon set is Mark James. Multiple extruder options: --extruder-offset Offset of each extruder, if firmware doesn't handle the displacement (can be specified multiple times, default: 0x0) - --perimeters-extruder + --perimeter-extruder Extruder to use for perimeters (1+, default: 1) --infill-extruder Extruder to use for infill (1+, default: 1) --support-material-extruder diff --git a/slic3r.pl b/slic3r.pl index d109f9ff45..2a1ef7eb4b 100755 --- a/slic3r.pl +++ b/slic3r.pl @@ -322,7 +322,7 @@ $j (like 0.65) or a percentage over layer height (like 200%) --first-layer-extrusion-width Set a different extrusion width for first layer - --perimeters-extrusion-width + --perimeter-extrusion-width Set a different extrusion width for perimeters --infill-extrusion-width Set a different extrusion width for infill @@ -333,7 +333,7 @@ $j Multiple extruder options: --extruder-offset Offset of each extruder, if firmware doesn't handle the displacement (can be specified multiple times, default: 0x0) - --perimeters-extruder + --perimeter-extruder Extruder to use for perimeters (1+, default: 1) --infill-extruder Extruder to use for infill (1+, default: 1) --support-material-extruder From 8001059390b0653a27c2787341947dd708570b1d Mon Sep 17 00:00:00 2001 From: Alessandro Ranellucci Date: Thu, 17 Jan 2013 14:13:25 +0100 Subject: [PATCH 15/26] Add Mike Sheldrake in the About window --- lib/Slic3r/GUI/AboutDialog.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/Slic3r/GUI/AboutDialog.pm b/lib/Slic3r/GUI/AboutDialog.pm index f8936338e1..f2a390bb2a 100644 --- a/lib/Slic3r/GUI/AboutDialog.pm +++ b/lib/Slic3r/GUI/AboutDialog.pm @@ -47,12 +47,12 @@ sub new { '' . '' . '' . - 'Copyright © 2011-2012 Alessandro Ranellucci. All rights reserved. ' . + 'Copyright © 2011-2013 Alessandro Ranellucci. All rights reserved. ' . 'Slic3r is licensed under the ' . 'GNU Affero General Public License, version 3.' . '


' . 'Slic3r logo designed by Corey Daniels, Silk Icon Set designed by Mark James. ' . - 'Contributions by Henrik Brix Andersen, Nicolas Dandrimont, Mark Hindess and numerous others.' . + 'Contributions by Henrik Brix Andersen, Nicolas Dandrimont, Mark Hindess, Mike Sheldrake and numerous others.' . '
' . '' . ''; From 177347137f73fc29dc6af7f82f800782dc5cc1e2 Mon Sep 17 00:00:00 2001 From: Alessandro Ranellucci Date: Thu, 17 Jan 2013 14:56:31 +0100 Subject: [PATCH 16/26] New G-code flavor for Sailfish (thanks to fros1y for working on it). #826 --- README.markdown | 2 +- lib/Slic3r/Config.pm | 4 ++-- lib/Slic3r/GCode.pm | 40 +++++++++++++++++++++++++++++-------- lib/Slic3r/Print.pm | 13 +++++------- slic3r.pl | 2 +- utils/zsh/functions/_slic3r | 2 +- 6 files changed, 42 insertions(+), 21 deletions(-) diff --git a/README.markdown b/README.markdown index a6aaaf952d..c8a5e57e7d 100644 --- a/README.markdown +++ b/README.markdown @@ -108,7 +108,7 @@ The author of the Silk icon set is Mark James. (default: 100,100) --z-offset Additional height in mm to add to vertical coordinates (+/-, default: 0) - --gcode-flavor The type of G-code to generate (reprap/teacup/makerbot/mach3/no-extrusion, + --gcode-flavor The type of G-code to generate (reprap/teacup/makerbot/sailfish/mach3/no-extrusion, default: reprap) --use-relative-e-distances Enable this to get relative E values --gcode-arcs Use G2/G3 commands for native arcs (experimental, not supported diff --git a/lib/Slic3r/Config.pm b/lib/Slic3r/Config.pm index 751462ef55..922206dea7 100644 --- a/lib/Slic3r/Config.pm +++ b/lib/Slic3r/Config.pm @@ -64,8 +64,8 @@ our $Options = { tooltip => 'Some G/M-code commands, including temperature control and others, are not universal. Set this option to your printer\'s firmware to get a compatible output. The "No extrusion" flavor prevents Slic3r from exporting any extrusion value at all.', cli => 'gcode-flavor=s', type => 'select', - values => [qw(reprap teacup makerbot mach3 no-extrusion)], - labels => ['RepRap (Marlin/Sprinter)', 'Teacup', 'MakerBot', 'Mach3/EMC', 'No extrusion'], + values => [qw(reprap teacup makerbot sailfish mach3 no-extrusion)], + labels => ['RepRap (Marlin/Sprinter)', 'Teacup', 'MakerBot', 'Sailfish', 'Mach3/EMC', 'No extrusion'], default => 'reprap', }, 'use_relative_e_distances' => { diff --git a/lib/Slic3r/GCode.pm b/lib/Slic3r/GCode.pm index 0b9ff8bc6e..b60025df3d 100644 --- a/lib/Slic3r/GCode.pm +++ b/lib/Slic3r/GCode.pm @@ -6,6 +6,7 @@ use Slic3r::ExtrusionPath ':roles'; use Slic3r::Geometry qw(scale unscale scaled_epsilon points_coincide PI X Y B); has 'multiple_extruders' => (is => 'ro', default => sub {0} ); +has 'layer_count' => (is => 'ro', required => 1 ); has 'layer' => (is => 'rw'); has 'move_z_callback' => (is => 'rw'); has 'shift_x' => (is => 'rw', default => sub {0} ); @@ -65,6 +66,21 @@ sub set_shift { $self->shift_y($shift[Y]); } +sub change_layer { + my $self = shift; + my ($layer) = @_; + + $self->layer($layer); + + my $gcode = ""; + if ($Slic3r::Config->gcode_flavor =~ /^(?:makerbot|sailfish)$/) { + $gcode .= sprintf "M73 P%s%s\n", + int(100 * ($layer->id / ($self->layer_count - 1))), + ($Slic3r::Config->gcode_comments ? ' ; update progress' : ''); + } + return $gcode; +} + # this method accepts Z in scaled coordinates sub move_z { my $self = shift; @@ -452,7 +468,10 @@ sub set_extruder { # set the new extruder $self->extruder($extruder); - $gcode .= sprintf "T%d%s\n", $extruder->id, ($Slic3r::Config->gcode_comments ? ' ; change extruder' : ''); + $gcode .= sprintf "%s%d%s\n", + ($Slic3r::Config->gcode_flavor =~ /^(?:makerbot|sailfish)$/ ? 'M108 T' : 'T'), + $extruder->id, + ($Slic3r::Config->gcode_comments ? ' ; change extruder' : ''); $gcode .= $self->reset_e; return $gcode; @@ -467,11 +486,17 @@ sub set_fan { if ($speed == 0) { my $code = $Slic3r::Config->gcode_flavor eq 'teacup' ? 'M106 S0' - : 'M107'; + : $Slic3r::Config->gcode_flavor =~ /^(?:makerbot|sailfish)$/ + ? 'M127' + : 'M107'; return sprintf "$code%s\n", ($Slic3r::Config->gcode_comments ? ' ; disable fan' : ''); } else { - return sprintf "M106 %s%d%s\n", ($Slic3r::Config->gcode_flavor eq 'mach3' ? 'P' : 'S'), - (255 * $speed / 100), ($Slic3r::Config->gcode_comments ? ' ; enable fan' : ''); + if ($Slic3r::Config->gcode_flavor =~ /^(?:makerbot|sailfish)$/) { + return sprintf "M126%s\n", ($Slic3r::Config->gcode_comments ? ' ; enable fan' : ''); + } else { + return sprintf "M106 %s%d%s\n", ($Slic3r::Config->gcode_flavor eq 'mach3' ? 'P' : 'S'), + (255 * $speed / 100), ($Slic3r::Config->gcode_comments ? ' ; enable fan' : ''); + } } } return ""; @@ -481,14 +506,14 @@ sub set_temperature { my $self = shift; my ($temperature, $wait, $tool) = @_; - return "" if $wait && $Slic3r::Config->gcode_flavor eq 'makerbot'; + return "" if $wait && $Slic3r::Config->gcode_flavor =~ /^(?:makerbot|sailfish)$/; my ($code, $comment) = ($wait && $Slic3r::Config->gcode_flavor ne 'teacup') ? ('M109', 'wait for temperature to be reached') : ('M104', 'set temperature'); my $gcode = sprintf "$code %s%d %s; $comment\n", ($Slic3r::Config->gcode_flavor eq 'mach3' ? 'P' : 'S'), $temperature, - (defined $tool && $self->multiple_extruders) ? "T$tool " : ""; + (defined $tool && ($self->multiple_extruders || $Slic3r::Config->gcode_flavor =~ /^(?:makerbot|sailfish)$/)) ? "T$tool " : ""; $gcode .= "M116 ; wait for temperature to be reached\n" if $Slic3r::Config->gcode_flavor eq 'teacup' && $wait; @@ -501,8 +526,7 @@ sub set_bed_temperature { my ($temperature, $wait) = @_; my ($code, $comment) = ($wait && $Slic3r::Config->gcode_flavor ne 'teacup') - ? (($Slic3r::Config->gcode_flavor eq 'makerbot' ? 'M109' - : 'M190'), 'wait for bed temperature to be reached') + ? (($Slic3r::Config->gcode_flavor =~ /^(?:makerbot|sailfish)$/ ? 'M109' : 'M190'), 'wait for bed temperature to be reached') : ('M140', 'set bed temperature'); my $gcode = sprintf "$code %s%d ; $comment\n", ($Slic3r::Config->gcode_flavor eq 'mach3' ? 'P' : 'S'), $temperature; diff --git a/lib/Slic3r/Print.pm b/lib/Slic3r/Print.pm index 5540632dbb..1cd95334fb 100644 --- a/lib/Slic3r/Print.pm +++ b/lib/Slic3r/Print.pm @@ -242,11 +242,7 @@ sub object_copies { sub layer_count { my $self = shift; - my $count = 0; - foreach my $object (@{$self->objects}) { - $count = @{$object->layers} if @{$object->layers} > $count; - } - return $count; + return max(map { scalar @{$_->layers} } @{$self->objects}); } sub regions_count { @@ -675,7 +671,8 @@ sub write_gcode { # set up our extruder object my $gcodegen = Slic3r::GCode->new( - multiple_extruders => (@{$self->extruders} > 1), + multiple_extruders => (@{$self->extruders} > 1), + layer_count => $self->layer_count, ); my $min_print_speed = 60 * $Slic3r::Config->min_print_speed; my $dec = $gcodegen->dec; @@ -700,7 +697,7 @@ sub write_gcode { print $fh "G21 ; set units to millimeters\n"; if ($Slic3r::Config->gcode_flavor =~ /^(?:reprap|teacup)$/) { printf $fh $gcodegen->reset_e; - if ($Slic3r::Config->gcode_flavor =~ /^(?:reprap|makerbot)$/) { + if ($Slic3r::Config->gcode_flavor =~ /^(?:reprap|makerbot|sailfish)$/) { if ($Slic3r::Config->use_relative_e_distances) { print $fh "M83 ; use relative distances for extrusion\n"; } else { @@ -733,7 +730,7 @@ sub write_gcode { } # set new layer, but don't move Z as support material interfaces may need an intermediate one - $gcodegen->layer($self->objects->[$object_copies->[0][0]]->layers->[$layer_id]); + $gcode .= $gcodegen->change_layer($self->objects->[$object_copies->[0][0]]->layers->[$layer_id]); $gcodegen->elapsed_time(0); # prepare callback to call as soon as a Z command is generated diff --git a/slic3r.pl b/slic3r.pl index 2a1ef7eb4b..aa6d26b325 100755 --- a/slic3r.pl +++ b/slic3r.pl @@ -156,7 +156,7 @@ $j (default: $config->{print_center}->[0],$config->{print_center}->[1]) --z-offset Additional height in mm to add to vertical coordinates (+/-, default: $config->{z_offset}) - --gcode-flavor The type of G-code to generate (reprap/teacup/makerbot/mach3/no-extrusion, + --gcode-flavor The type of G-code to generate (reprap/teacup/makerbot/sailfish/mach3/no-extrusion, default: $config->{gcode_flavor}) --use-relative-e-distances Enable this to get relative E values --gcode-arcs Use G2/G3 commands for native arcs (experimental, not supported diff --git a/utils/zsh/functions/_slic3r b/utils/zsh/functions/_slic3r index 384c812a5b..41b2594bd8 100644 --- a/utils/zsh/functions/_slic3r +++ b/utils/zsh/functions/_slic3r @@ -22,7 +22,7 @@ _arguments -S \ '*--nozzle-diameter[specify nozzle diameter]:nozzle diameter in mm' \ '--print-center[specify print center coordinates]:print center coordinates in mm,mm' \ '--z-offset[specify Z-axis offset]:Z-axis offset in mm' \ - '--gcode-flavor[specify the type of G-code to generate]:G-code flavor:(reprap teacup makerbot mach3 no-extrusion)' \ + '--gcode-flavor[specify the type of G-code to generate]:G-code flavor:(reprap teacup makerbot sailfish mach3 no-extrusion)' \ '(--use-relative-e-distances --no-use-relative-e-distances)'--{no-,}use-relative-e-distances'[disable/enable relative E values]' \ '--extrusion-axis[specify letter associated with the extrusion axis]:extrusion axis letter' \ '(--gcode-arcs --no-gcode-arcs)'--{no-,}gcode-arcs'[disable/enable G2/G3 commands for native arcs]' \ From 73c70021df2ee2f37ed538660552e9505500c149 Mon Sep 17 00:00:00 2001 From: Alessandro Ranellucci Date: Thu, 17 Jan 2013 15:02:40 +0100 Subject: [PATCH 17/26] Change toolchange and G92 E0 order for makerbot and sailfish G-code flavors. #855 --- lib/Slic3r/GCode.pm | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/lib/Slic3r/GCode.pm b/lib/Slic3r/GCode.pm index b60025df3d..bad4db9188 100644 --- a/lib/Slic3r/GCode.pm +++ b/lib/Slic3r/GCode.pm @@ -468,11 +468,18 @@ sub set_extruder { # set the new extruder $self->extruder($extruder); - $gcode .= sprintf "%s%d%s\n", + my $toolchange_gcode = sprintf "%s%d%s\n", ($Slic3r::Config->gcode_flavor =~ /^(?:makerbot|sailfish)$/ ? 'M108 T' : 'T'), $extruder->id, ($Slic3r::Config->gcode_comments ? ' ; change extruder' : ''); - $gcode .= $self->reset_e; + + if ($Slic3r::Config->gcode_flavor =~ /^(?:makerbot|sailfish)$/) { + $gcode .= $self->reset_e; + $gcode .= $toolchange_gcode; + } else { + $gcode .= $toolchange_gcode; + $gcode .= $self->reset_e; + } return $gcode; } From 71052433de0ff1f3da04471ccbb572babafc3cae Mon Sep 17 00:00:00 2001 From: Alessandro Ranellucci Date: Thu, 17 Jan 2013 15:50:45 +0100 Subject: [PATCH 18/26] Releasing 0.9.8 --- lib/Slic3r.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Slic3r.pm b/lib/Slic3r.pm index 4ca5b43838..59df14307b 100644 --- a/lib/Slic3r.pm +++ b/lib/Slic3r.pm @@ -7,7 +7,7 @@ use strict; use warnings; require v5.10; -our $VERSION = "0.9.8-dev"; +our $VERSION = "0.9.8"; our $debug = 0; sub debugf { From 09bdd2ea5ddfef252a394e51402a7bb0932902cb Mon Sep 17 00:00:00 2001 From: Alessandro Ranellucci Date: Thu, 17 Jan 2013 17:44:56 +0100 Subject: [PATCH 19/26] Bump version number --- lib/Slic3r.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Slic3r.pm b/lib/Slic3r.pm index 59df14307b..3045fb1cfb 100644 --- a/lib/Slic3r.pm +++ b/lib/Slic3r.pm @@ -7,7 +7,7 @@ use strict; use warnings; require v5.10; -our $VERSION = "0.9.8"; +our $VERSION = "0.9.9-dev"; our $debug = 0; sub debugf { From 65ef3b35d9350a3a9843c1a40800f491c7ea9941 Mon Sep 17 00:00:00 2001 From: Mike Sheldrake Date: Fri, 18 Jan 2013 08:36:01 -0800 Subject: [PATCH 20/26] limit layer requests to object->layer_count when preparing skirt #901 Each object on the plater was being queried for points for producing the skirt for all skirt layers, even when the object was shorter than the skirt. layers of the print --- lib/Slic3r/Print.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/Slic3r/Print.pm b/lib/Slic3r/Print.pm index 1cd95334fb..8c2d94e462 100644 --- a/lib/Slic3r/Print.pm +++ b/lib/Slic3r/Print.pm @@ -546,10 +546,10 @@ sub make_skirt { return unless $Slic3r::Config->skirts > 0; # collect points from all layers contained in skirt height - my $skirt_height = $Slic3r::Config->skirt_height; - $skirt_height = $self->layer_count if $skirt_height > $self->layer_count; my @points = (); foreach my $obj_idx (0 .. $#{$self->objects}) { + my $skirt_height = $Slic3r::Config->skirt_height; + $skirt_height = $self->objects->[$obj_idx]->layer_count if $skirt_height > $self->objects->[$obj_idx]->layer_count; my @layers = map $self->objects->[$obj_idx]->layers->[$_], 0..($skirt_height-1); my @layer_points = ( (map @$_, map @$_, map @{$_->slices}, @layers), From 94bb1e54bb4e39cdbc6dddcabba773f0eeddc76b Mon Sep 17 00:00:00 2001 From: Alessandro Ranellucci Date: Wed, 23 Jan 2013 11:03:01 +0100 Subject: [PATCH 21/26] =?UTF-8?q?Raise=20max=20temperatures=20(in=20GUI)?= =?UTF-8?q?=20to=20400=C2=B0C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/Slic3r/Config.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/Slic3r/Config.pm b/lib/Slic3r/Config.pm index 922206dea7..ac474d92f8 100644 --- a/lib/Slic3r/Config.pm +++ b/lib/Slic3r/Config.pm @@ -158,7 +158,7 @@ our $Options = { sidetext => '°C', cli => 'temperature=i@', type => 'i', - max => 300, + max => 400, serialize => $serialize_comma, deserialize => sub { $_[0] ? [ split /,/, $_[0] ] : [0] }, default => [200], @@ -171,7 +171,7 @@ our $Options = { type => 'i', serialize => $serialize_comma, deserialize => sub { $_[0] ? [ split /,/, $_[0] ] : [0] }, - max => 300, + max => 400, default => [200], }, From f555a1ecc2102df83cd8f25d078429ac0adac67e Mon Sep 17 00:00:00 2001 From: Alessandro Ranellucci Date: Wed, 23 Jan 2013 19:16:57 +0100 Subject: [PATCH 22/26] Replace 'Less' with 'Fewer' in plater. #944 --- lib/Slic3r/GUI/Plater.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Slic3r/GUI/Plater.pm b/lib/Slic3r/GUI/Plater.pm index a8b30cba27..caa9dcb3fb 100644 --- a/lib/Slic3r/GUI/Plater.pm +++ b/lib/Slic3r/GUI/Plater.pm @@ -62,7 +62,7 @@ sub new { Wx::ToolTip::Enable(1); $self->{htoolbar} = Wx::ToolBar->new($self, -1, wxDefaultPosition, wxDefaultSize, wxTB_HORIZONTAL | wxTB_TEXT | wxBORDER_SIMPLE | wxTAB_TRAVERSAL); $self->{htoolbar}->AddTool(TB_MORE, "More", Wx::Bitmap->new("$Slic3r::var/add.png", wxBITMAP_TYPE_PNG), ''); - $self->{htoolbar}->AddTool(TB_LESS, "Less", Wx::Bitmap->new("$Slic3r::var/delete.png", wxBITMAP_TYPE_PNG), ''); + $self->{htoolbar}->AddTool(TB_LESS, "Fewer", Wx::Bitmap->new("$Slic3r::var/delete.png", wxBITMAP_TYPE_PNG), ''); $self->{htoolbar}->AddSeparator; $self->{htoolbar}->AddTool(TB_45CCW, "45° ccw", Wx::Bitmap->new("$Slic3r::var/arrow_rotate_anticlockwise.png", wxBITMAP_TYPE_PNG), ''); $self->{htoolbar}->AddTool(TB_45CW, "45° cw", Wx::Bitmap->new("$Slic3r::var/arrow_rotate_clockwise.png", wxBITMAP_TYPE_PNG), ''); From 18280da1b397823ad6017dbd72afe80d50411e54 Mon Sep 17 00:00:00 2001 From: Alessandro Ranellucci Date: Fri, 25 Jan 2013 18:02:01 +0100 Subject: [PATCH 23/26] Bugfix: the non-manifold warning was spitting out wrong coordinates --- lib/Slic3r/TriangleMesh.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/Slic3r/TriangleMesh.pm b/lib/Slic3r/TriangleMesh.pm index d830ba54c9..0f5df9a4e7 100644 --- a/lib/Slic3r/TriangleMesh.pm +++ b/lib/Slic3r/TriangleMesh.pm @@ -152,9 +152,9 @@ sub check_manifoldness { my ($first_bad_edge_id) = grep { @{ $self->edges_facets->[$_] } != 2 } 0..$#{$self->edges_facets}; if (defined $first_bad_edge_id) { - warn sprintf "Warning: The input file contains a hole near edge %f-%f (not manifold). " + warn sprintf "Warning: The input file contains a hole near edge %f,%f,%f-%f,%f,%f (not manifold). " . "You might want to repair it and retry, or to check the resulting G-code before printing anyway.\n", - @{$self->edges->[$first_bad_edge_id]}; + map @{$self->vertices->[$_]}, @{$self->edges->[$first_bad_edge_id]}; return 0; } return 1; From 599d76b70b35f6e6f4c3ad93c280578dec909a2f Mon Sep 17 00:00:00 2001 From: Mike Sheldrake Date: Fri, 25 Jan 2013 12:29:44 -0800 Subject: [PATCH 24/26] avoid DBus related crash on Ubuntu #954 An undocumented feature of Net::DBus->session() is that it returns the same connection object it creates the first time it's called for all subsequent calls. Somehow this exposes us to a bug where unref() is called on that object too many times, causing a segfault. Undefining the cached object after we've used it once avoids this. --- lib/Slic3r/GUI.pm | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/Slic3r/GUI.pm b/lib/Slic3r/GUI.pm index 7372049266..b431d307ba 100644 --- a/lib/Slic3r/GUI.pm +++ b/lib/Slic3r/GUI.pm @@ -413,6 +413,7 @@ sub notify { my $notifier = $serv->get_object('/org/freedesktop/Notifications', 'org.freedesktop.Notifications'); $notifier->Notify('Slic3r', 0, $self->{icon}, $title, $message, [], {}, -1); + undef $Net::DBus::bus_session; } }; } From bc61656057af4f93ba399f438ba38e941333fd76 Mon Sep 17 00:00:00 2001 From: Mike Sheldrake Date: Sat, 26 Jan 2013 09:31:28 -0800 Subject: [PATCH 25/26] harmless misplaced semicolon --- lib/Slic3r/GUI.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/Slic3r/GUI.pm b/lib/Slic3r/GUI.pm index b431d307ba..fb53b5cb54 100644 --- a/lib/Slic3r/GUI.pm +++ b/lib/Slic3r/GUI.pm @@ -414,8 +414,8 @@ sub notify { 'org.freedesktop.Notifications'); $notifier->Notify('Slic3r', 0, $self->{icon}, $title, $message, [], {}, -1); undef $Net::DBus::bus_session; - } - }; + }; + } } 1; From 4c62c1b5707866e833bd1657bdbe02087f4f4afb Mon Sep 17 00:00:00 2001 From: Alessandro Ranellucci Date: Sat, 26 Jan 2013 21:36:54 +0100 Subject: [PATCH 26/26] Support .gco extension too. #957 --- lib/Slic3r/GUI/SkeinPanel.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Slic3r/GUI/SkeinPanel.pm b/lib/Slic3r/GUI/SkeinPanel.pm index 8cdc8d7b2f..edb47a9fe6 100644 --- a/lib/Slic3r/GUI/SkeinPanel.pm +++ b/lib/Slic3r/GUI/SkeinPanel.pm @@ -18,7 +18,7 @@ use constant FILE_WILDCARDS => { obj => 'OBJ files (*.obj)|*.obj;*.OBJ', amf => 'AMF files (*.amf)|*.amf;*.AMF;*.xml;*.XML', ini => 'INI files *.ini|*.ini;*.INI', - gcode => 'G-code files *.gcode|*.gcode;*.GCODE|G-code files *.g|*.g;*.G', + gcode => 'G-code files (*.gcode, *.gco, *.g)|*.gcode;*.GCODE;*.gco;*.GCO;*.g;*.G', svg => 'SVG files *.svg|*.svg;*.SVG', }; use constant MODEL_WILDCARD => join '|', @{&FILE_WILDCARDS}{qw(stl obj amf)};