mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-24 23:23:59 -06:00
Faster support generation. Includes a new implementation of the Douglas-Peucker algorithm
This commit is contained in:
parent
94e673e050
commit
eba7c10018
9 changed files with 166 additions and 183 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue