1
0
mirror of https://github.com/FULU-Foundation/OrcaSlicer-bambulab.git synced 2026-07-12 08:14:26 +00:00

Add a wkt() method to ExPolygon

This commit is contained in:
Alessandro Ranellucci
2013-01-28 00:02:34 +01:00
parent 50526dea5a
commit 4c8c725eec
+6
View File
@@ -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, @_);