mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-18 19:12:17 +00:00
Collect undetected lines (caused by dirty or non-manifold models), warn the user, post debug info. Includes some further ExPolygon refactoring.
This commit is contained in:
@@ -7,7 +7,7 @@ use warnings;
|
||||
# as a Slic3r::Polyline::Closed you're right. I plan to
|
||||
# ditch the latter and port everything to this class.
|
||||
|
||||
use Slic3r::Geometry qw(polygon_remove_parallel_continuous_edges);
|
||||
use Slic3r::Geometry qw(polygon_lines polygon_remove_parallel_continuous_edges);
|
||||
|
||||
# the constructor accepts an array(ref) of points
|
||||
sub new {
|
||||
@@ -18,10 +18,23 @@ sub new {
|
||||
} else {
|
||||
$self = [ @_ ];
|
||||
}
|
||||
|
||||
@$self = map Slic3r::Point->cast($_), @$self;
|
||||
bless $self, $class;
|
||||
$self;
|
||||
}
|
||||
|
||||
# legacy method, to be removed when we ditch Slic3r::Polyline::Closed
|
||||
sub closed_polyline {
|
||||
my $self = shift;
|
||||
return Slic3r::Polyline::Closed->cast($self);
|
||||
}
|
||||
|
||||
sub lines {
|
||||
my $self = shift;
|
||||
return map Slic3r::Line->new($_), polygon_lines($self);
|
||||
}
|
||||
|
||||
sub cleanup {
|
||||
my $self = shift;
|
||||
polygon_remove_parallel_continuous_edges($self);
|
||||
|
||||
Reference in New Issue
Block a user