mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-25 07:34:03 -06:00
Fixes to pass all tests
This commit is contained in:
parent
b6005327d6
commit
49040db9a3
3 changed files with 7 additions and 3 deletions
|
@ -149,7 +149,11 @@ sub medial_axis {
|
||||||
my $expolygon = $self->clone;
|
my $expolygon = $self->clone;
|
||||||
my @points = ();
|
my @points = ();
|
||||||
foreach my $polygon (@$expolygon) {
|
foreach my $polygon (@$expolygon) {
|
||||||
Slic3r::Geometry::polyline_remove_short_segments($polygon, $width / 2);
|
{
|
||||||
|
my $p = $polygon->pp;
|
||||||
|
Slic3r::Geometry::polyline_remove_short_segments($p, $width / 2);
|
||||||
|
$polygon = Slic3r::Polygon->new(@$p);
|
||||||
|
}
|
||||||
|
|
||||||
# subdivide polygon segments so that we don't have anyone of them
|
# subdivide polygon segments so that we don't have anyone of them
|
||||||
# being longer than $width / 2
|
# being longer than $width / 2
|
||||||
|
|
|
@ -674,7 +674,7 @@ sub make_brim {
|
||||||
# -0.5 because islands are not represented by their centerlines
|
# -0.5 because islands are not represented by their centerlines
|
||||||
# (first offset more, then step back - reverse order than the one used for
|
# (first offset more, then step back - reverse order than the one used for
|
||||||
# perimeters because here we're offsetting outwards)
|
# perimeters because here we're offsetting outwards)
|
||||||
push @loops, @{offset2(\@islands, ($i + 0.5) * $flow->scaled_spacing, -1.0 * $flow->scaled_spacing, undef, JT_SQUARE)};
|
push @loops, @{offset2(\@islands, ($i + 0.5) * $flow->scaled_spacing, -1.0 * $flow->scaled_spacing, 100000, JT_SQUARE)};
|
||||||
}
|
}
|
||||||
|
|
||||||
@{$self->brim} = map Slic3r::ExtrusionLoop->new(
|
@{$self->brim} = map Slic3r::ExtrusionLoop->new(
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
use Test::More tests => 10;
|
use Test::More tests => 11;
|
||||||
use strict;
|
use strict;
|
||||||
use warnings;
|
use warnings;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue