mirror of
https://github.com/FULU-Foundation/OrcaSlicer-bambulab.git
synced 2026-11-26 05:56:35 +01:00
Faster support generation. Includes a new implementation of the Douglas-Peucker algorithm
This commit is contained in:
1 parent
94e673e050
commit
eba7c10018
9 files changed
+166
-183
No files matched your search
@@ -108,6 +108,17 @@ sub bounding_box {
|
||||
return Slic3r::Geometry::bounding_box($self->contour);
|
||||
}
|
||||
|
||||
sub bounding_box_polygon {
|
||||
my $self = shift;
|
||||
my @bb = $self->bounding_box;
|
||||
return Slic3r::Polygon->new([
|
||||
[ $bb[0], $bb[1] ],
|
||||
[ $bb[2], $bb[1] ],
|
||||
[ $bb[2], $bb[3] ],
|
||||
[ $bb[0], $bb[3] ],
|
||||
]);
|
||||
}
|
||||
|
||||
sub clip_line {
|
||||
my $self = shift;
|
||||
my ($line) = @_;
|
||||
@@ -141,6 +152,11 @@ sub clip_line {
|
||||
return [@lines];
|
||||
}
|
||||
|
||||
sub simplify {
|
||||
my $self = shift;
|
||||
$_->simplify(@_) for @$self;
|
||||
}
|
||||
|
||||
sub translate {
|
||||
my $self = shift;
|
||||
$_->translate(@_) for @$self;
|
||||
|
||||
Reference in new issue
Block a user