mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-11-02 20:51:23 -07:00
Always fix self-intersecting polygons that Douglas-Peucker might return
This commit is contained in:
parent
dc0f706789
commit
33b40eda18
14 changed files with 85 additions and 55 deletions
|
|
@ -68,8 +68,8 @@ sub simplify {
|
|||
my $self = shift;
|
||||
my $tolerance = shift || 10;
|
||||
|
||||
@$self = @{ Boost::Geometry::Utils::linestring_simplify($self, $tolerance) };
|
||||
bless $_, 'Slic3r::Point' for @$self;
|
||||
my $simplified = Boost::Geometry::Utils::linestring_simplify($self, $tolerance);
|
||||
return (ref $self)->new($simplified);
|
||||
}
|
||||
|
||||
sub reverse {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue