mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-24 07:03:59 -06:00
Port offset_ex() and offset2_ex() to XS
This commit is contained in:
parent
9458c7db97
commit
898007fc36
20 changed files with 4349 additions and 52 deletions
|
@ -766,9 +766,9 @@ sub write_gcode {
|
|||
]);
|
||||
# discard layers only containing thin walls (offset would fail on an empty polygon)
|
||||
if (@$convex_hull) {
|
||||
my @island = Slic3r::ExPolygon->new($convex_hull)
|
||||
->translate(scale $shift[X], scale $shift[Y])
|
||||
->offset_ex(scale $distance_from_objects, 1, JT_SQUARE);
|
||||
my $expolygon = Slic3r::ExPolygon->new($convex_hull);
|
||||
$expolygon->translate(scale $shift[X], scale $shift[Y]);
|
||||
my @island = @{$expolygon->offset_ex(scale $distance_from_objects, 1, JT_SQUARE)};
|
||||
foreach my $copy (@{ $self->objects->[$obj_idx]->copies }) {
|
||||
push @islands, map $_->clone->translate(@$copy), @island;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue