mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-12 09:17:52 -06:00
New seal_position option that replaces randomize_start, start_perimeters_at_concave_points and start_perimeters_at_non_overhang. The two latter options are now always on by default. A new "Aligned" seal position value has been added, that forces starting points to be aligned when not randomized. #1741 #925
This commit is contained in:
parent
c63bd8165d
commit
a3bd1b5302
17 changed files with 153 additions and 112 deletions
|
@ -40,15 +40,34 @@ sub subdivide {
|
|||
return Slic3r::Polygon->new(@new_points);
|
||||
}
|
||||
|
||||
# for cw polygons this will return convex points!
|
||||
# angle is checked on the internal side of the polygon
|
||||
sub concave_points {
|
||||
my $self = shift;
|
||||
my ($self, $angle) = @_;
|
||||
|
||||
$angle //= PI;
|
||||
|
||||
my @points = @$self;
|
||||
my @points_pp = @{$self->pp};
|
||||
return map $points[$_],
|
||||
grep Slic3r::Geometry::angle3points(@points_pp[$_, $_-1, $_+1]) < PI - epsilon,
|
||||
-1 .. ($#points-1);
|
||||
return [
|
||||
map $points[$_],
|
||||
grep Slic3r::Geometry::angle3points(@points_pp[$_, $_-1, $_+1]) < $angle,
|
||||
-1 .. ($#points-1)
|
||||
];
|
||||
}
|
||||
|
||||
# angle is checked on the internal side of the polygon
|
||||
sub convex_points {
|
||||
my ($self, $angle) = @_;
|
||||
|
||||
$angle //= PI;
|
||||
|
||||
my @points = @$self;
|
||||
my @points_pp = @{$self->pp};
|
||||
return [
|
||||
map $points[$_],
|
||||
grep Slic3r::Geometry::angle3points(@points_pp[$_, $_-1, $_+1]) > $angle,
|
||||
-1 .. ($#points-1)
|
||||
];
|
||||
}
|
||||
|
||||
1;
|
Loading…
Add table
Add a link
Reference in a new issue