diff --git a/lib/Slic3r/ExtrusionLoop.pm b/lib/Slic3r/ExtrusionLoop.pm
index da5be8985..a90725b0c 100644
--- a/lib/Slic3r/ExtrusionLoop.pm
+++ b/lib/Slic3r/ExtrusionLoop.pm
@@ -53,4 +53,18 @@ sub split_at_first_point {
     return $self->split_at($self->polygon->[0]);
 }
 
+# although a loop doesn't have endpoints, this method is provided to allow
+# ExtrusionLoop objects to be added to an ExtrusionPath::Collection and
+# sorted by the ->shortest_path() method
+sub endpoints {
+    my $self = shift;
+    return ($self->polygon->[0], $self->polygon->[-1]);
+}
+
+# provided for ExtrusionPath::Collection->shortest_path()
+sub points {
+    my $self = shift;
+    return $self->polygon;
+}
+
 1;