mirror of
https://github.com/FULU-Foundation/OrcaSlicer-bambulab.git
synced 2026-05-14 13:02:39 -07:00
Faster support generation. Includes a new implementation of the Douglas-Peucker algorithm
This commit is contained in:
@@ -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