diff --git a/lib/Slic3r/ExPolygon.pm b/lib/Slic3r/ExPolygon.pm index f19cfcd5d..23ee8cc5c 100644 --- a/lib/Slic3r/ExPolygon.pm +++ b/lib/Slic3r/ExPolygon.pm @@ -59,6 +59,12 @@ sub boost_polygon { return Boost::Geometry::Utils::polygon(@$self); } +sub wkt { + my $self = shift; + return sprintf "POLYGON(%s)", + join ',', map "($_)", map { join ',', map "$_->[0] $_->[1]", @$_ } @$self; +} + sub offset { my $self = shift; return Slic3r::Geometry::Clipper::offset($self, @_);