mirror of
https://github.com/FULU-Foundation/OrcaSlicer-bambulab.git
synced 2026-10-21 14:09:54 +02:00
Bugfix: fill escapes perimeters. #139
This commit is contained in:
1 parent
4a4c4b4e7d
commit
be9886eac3
3 files changed
+20
-9
No files matched your search
@@ -5,7 +5,7 @@ use warnings;
|
||||
# an ExPolygon is a polygon with holes
|
||||
|
||||
use Math::Geometry::Voronoi;
|
||||
use Slic3r::Geometry qw(X Y A B point_in_polygon);
|
||||
use Slic3r::Geometry qw(X Y A B point_in_polygon same_line);
|
||||
use Slic3r::Geometry::Clipper qw(union_ex JT_MITER);
|
||||
|
||||
# the constructor accepts an array of polygons
|
||||
@@ -93,6 +93,14 @@ sub encloses_point {
|
||||
|| grep($_->point_on_segment($point), $self->holes));
|
||||
}
|
||||
|
||||
sub encloses_line {
|
||||
my $self = shift;
|
||||
my ($line) = @_;
|
||||
|
||||
my $clip = $self->clip_line($line);
|
||||
return @$clip == 1 && same_line($clip->[0], $line);
|
||||
}
|
||||
|
||||
sub point_on_segment {
|
||||
my $self = shift;
|
||||
my ($point) = @_;
|
||||
|
||||
Reference in new issue
Block a user