mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-15 18:58:00 -06:00
Merge branch 'avoid-crossing-perimeters'
Conflicts: lib/Slic3r/GCode.pm
This commit is contained in:
commit
a016a06fa6
18 changed files with 404 additions and 26 deletions
|
@ -6,7 +6,7 @@ use warnings;
|
|||
|
||||
use Boost::Geometry::Utils;
|
||||
use Math::Geometry::Voronoi;
|
||||
use Slic3r::Geometry qw(X Y A B point_in_polygon same_line line_length);
|
||||
use Slic3r::Geometry qw(X Y A B point_in_polygon same_line line_length epsilon);
|
||||
use Slic3r::Geometry::Clipper qw(union_ex JT_MITER);
|
||||
|
||||
# the constructor accepts an array of polygons
|
||||
|
@ -159,15 +159,13 @@ sub clip_line {
|
|||
my $self = shift;
|
||||
my ($line) = @_; # line must be a Slic3r::Line object
|
||||
|
||||
return Boost::Geometry::Utils::polygon_linestring_intersection(
|
||||
$self->boost_polygon,
|
||||
$line->boost_linestring,
|
||||
);
|
||||
return Boost::Geometry::Utils::polygon_multi_linestring_intersection($self, [$line]);
|
||||
}
|
||||
|
||||
sub simplify {
|
||||
my $self = shift;
|
||||
$_->simplify(@_) for @$self;
|
||||
$self;
|
||||
}
|
||||
|
||||
sub scale {
|
||||
|
@ -178,11 +176,13 @@ sub scale {
|
|||
sub translate {
|
||||
my $self = shift;
|
||||
$_->translate(@_) for @$self;
|
||||
$self;
|
||||
}
|
||||
|
||||
sub rotate {
|
||||
my $self = shift;
|
||||
$_->rotate(@_) for @$self;
|
||||
$self;
|
||||
}
|
||||
|
||||
sub area {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue