Add a wkt() method to ExPolygon
This commit is contained in:
parent
50526dea5a
commit
4c8c725eec
1 changed files with 6 additions and 0 deletions
|
@ -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, @_);
|
||||
|
|
Loading…
Reference in a new issue