diff --git a/lib/Slic3r/Polygon.pm b/lib/Slic3r/Polygon.pm index 96288f73d..50805ab47 100644 --- a/lib/Slic3r/Polygon.pm +++ b/lib/Slic3r/Polygon.pm @@ -19,6 +19,11 @@ sub boost_linestring { return Boost::Geometry::Utils::linestring([@$self, $self->[0]]); } +sub wkt { + my $self = shift; + return sprintf "POLYGON((%s))", join ',', map "$_->[0] $_->[1]", @$self; +} + sub is_counter_clockwise { my $self = shift; return Slic3r::Geometry::Clipper::is_counter_clockwise($self);