diff --git a/lib/Slic3r/ExtrusionLoop.pm b/lib/Slic3r/ExtrusionLoop.pm index 2c9cffa198..9b2d773006 100644 --- a/lib/Slic3r/ExtrusionLoop.pm +++ b/lib/Slic3r/ExtrusionLoop.pm @@ -4,7 +4,7 @@ use warnings; use parent qw(Exporter); -our @EXPORT_OK = qw(EXTRL_ROLE_DEFAULT EXTRL_ROLE_EXTERNAL_PERIMETER +our @EXPORT_OK = qw(EXTRL_ROLE_DEFAULT EXTRL_ROLE_CONTOUR_INTERNAL_PERIMETER); our %EXPORT_TAGS = (roles => \@EXPORT_OK); diff --git a/lib/Slic3r/Layer/Region.pm b/lib/Slic3r/Layer/Region.pm index 5b7d4b4ad3..5ea7b2a8c6 100644 --- a/lib/Slic3r/Layer/Region.pm +++ b/lib/Slic3r/Layer/Region.pm @@ -271,15 +271,18 @@ sub make_perimeters { my $no_children = !@{ $polynode->{children} }; my $is_external = $is_contour ? $root_level : $no_children; my $is_internal = $is_contour ? $no_children : $root_level; + if ($is_contour && $is_internal) { + # internal perimeters are root level in case of holes + # and items with no children in case of contours + # Note that we set loop role to ContourInternalPerimeter + # also when loop is both internal and external (i.e. + # there's only one contour loop). + $loop_role = EXTRL_ROLE_CONTOUR_INTERNAL_PERIMETER; + } if ($is_external) { # external perimeters are root level in case of contours # and items with no children in case of holes $role = EXTR_ROLE_EXTERNAL_PERIMETER; - $loop_role = EXTRL_ROLE_EXTERNAL_PERIMETER; - } elsif ($is_contour && $is_internal) { - # internal perimeters are root level in case of holes - # and items with no children in case of contours - $loop_role = EXTRL_ROLE_CONTOUR_INTERNAL_PERIMETER; } # detect overhanging/bridging perimeters diff --git a/xs/src/libslic3r/ExtrusionEntity.hpp b/xs/src/libslic3r/ExtrusionEntity.hpp index ccd85a6892..cbcd80d52f 100644 --- a/xs/src/libslic3r/ExtrusionEntity.hpp +++ b/xs/src/libslic3r/ExtrusionEntity.hpp @@ -29,7 +29,6 @@ enum ExtrusionRole { /* Special flags describing loop */ enum ExtrusionLoopRole { elrDefault, - elrExternalPerimeter, elrContourInternalPerimeter, }; diff --git a/xs/xsp/ExtrusionLoop.xsp b/xs/xsp/ExtrusionLoop.xsp index 1256d75939..e7f4f03195 100644 --- a/xs/xsp/ExtrusionLoop.xsp +++ b/xs/xsp/ExtrusionLoop.xsp @@ -63,7 +63,6 @@ IV _constant() ALIAS: EXTRL_ROLE_DEFAULT = elrDefault - EXTRL_ROLE_EXTERNAL_PERIMETER = elrExternalPerimeter EXTRL_ROLE_CONTOUR_INTERNAL_PERIMETER = elrContourInternalPerimeter PROTOTYPE: CODE: