mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-23 14:44:19 -06: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:
parent
91e250a2fd
commit
fec816b065
9 changed files with 92 additions and 34 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue