From 08351b5e485d614615c862f3f9957c7e771cefcb Mon Sep 17 00:00:00 2001 From: bubnikv Date: Fri, 20 Jan 2017 15:17:32 +0100 Subject: [PATCH] Fix of ExtrusionMultiPath binding to Perl & G-code generator. --- lib/Slic3r/Print/GCode.pm | 18 ++++++++++++++---- xs/lib/Slic3r/XS.pm | 1 + 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/lib/Slic3r/Print/GCode.pm b/lib/Slic3r/Print/GCode.pm index f7fdf1a4e..ad7967e39 100644 --- a/lib/Slic3r/Print/GCode.pm +++ b/lib/Slic3r/Print/GCode.pm @@ -481,13 +481,23 @@ sub process_layer { if ($layer->isa('Slic3r::Layer::Support')) { if ($layer->support_interface_fills->count > 0) { $gcode .= $self->_gcodegen->set_extruder($object->config->support_material_interface_extruder-1); - $gcode .= $self->_gcodegen->extrude_path($_, 'support material interface', $object->config->get_abs_value('support_material_interface_speed')) - for @{$layer->support_interface_fills->chained_path_from($self->_gcodegen->last_pos, 0)}; + for my $path (@{$layer->support_interface_fills->chained_path_from($self->_gcodegen->last_pos, 0)}) { + if ($path->isa('Slic3r::ExtrusionMultiPath')) { + $gcode .= $self->_gcodegen->extrude_multipath($path, 'support material interface', $object->config->get_abs_value('support_material_interface_speed')); + } else { + $gcode .= $self->_gcodegen->extrude_path($path, 'support material interface', $object->config->get_abs_value('support_material_interface_speed')); + } + } } if ($layer->support_fills->count > 0) { $gcode .= $self->_gcodegen->set_extruder($object->config->support_material_extruder-1); - $gcode .= $self->_gcodegen->extrude_path($_, 'support material', $object->config->get_abs_value('support_material_speed')) - for @{$layer->support_fills->chained_path_from($self->_gcodegen->last_pos, 0)}; + for my $path (@{$layer->support_fills->chained_path_from($self->_gcodegen->last_pos, 0)}) { + if ($path->isa('Slic3r::ExtrusionMultiPath')) { + $gcode .= $self->_gcodegen->extrude_multipath($path, 'support material', $object->config->get_abs_value('support_material_speed')); + } else { + $gcode .= $self->_gcodegen->extrude_path($path, 'support material', $object->config->get_abs_value('support_material_speed')); + } + } } } diff --git a/xs/lib/Slic3r/XS.pm b/xs/lib/Slic3r/XS.pm index 83766d4b9..a66b8ad49 100644 --- a/xs/lib/Slic3r/XS.pm +++ b/xs/lib/Slic3r/XS.pm @@ -264,6 +264,7 @@ for my $class (qw( Slic3r::ExPolygon::Collection Slic3r::Extruder Slic3r::ExtrusionLoop + Slic3r::ExtrusionMultiPath Slic3r::ExtrusionPath Slic3r::ExtrusionPath::Collection Slic3r::ExtrusionSimulator