mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-10-29 19:53:44 -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
|
|
@ -16,7 +16,7 @@ sub fill_surface {
|
|||
my $rotate_vector = $self->infill_direction($surface);
|
||||
$self->rotate_points($expolygon, $rotate_vector);
|
||||
|
||||
my ($expolygon_off) = $expolygon->offset_ex(scale $params{flow_spacing}/2);
|
||||
my $expolygon_off = $expolygon->offset_ex(scale $params{flow_spacing}/2)->[0];
|
||||
return {} if !defined $expolygon_off; # skip some very small polygons (which shouldn't arrive here)
|
||||
|
||||
my $flow_spacing = $params{flow_spacing};
|
||||
|
|
@ -67,7 +67,7 @@ sub fill_surface {
|
|||
# are kept even if the expolygon has vertical sides
|
||||
my @polylines = map Slic3r::Polyline->new(@$_),
|
||||
@{ Boost::Geometry::Utils::multi_polygon_multi_linestring_intersection(
|
||||
[ map $_->pp, $expolygon->offset_ex(scaled_epsilon) ],
|
||||
[ map $_->pp, @{ $expolygon->offset_ex(scaled_epsilon) } ],
|
||||
[ map $_->pp, @{ $self->cache->{$cache_id} } ],
|
||||
) };
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue