mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-08-06 21:44:08 -06:00
Keep edge lines in rectilinear infill even when the sides are not perfectly straight
This commit is contained in:
parent
99963775ff
commit
80676f358a
3 changed files with 26 additions and 7 deletions
|
@ -84,6 +84,12 @@ sub wkt {
|
|||
join ',', map "($_)", map { join ',', map "$_->[0] $_->[1]", @$_ } @$self;
|
||||
}
|
||||
|
||||
sub dump_perl {
|
||||
my $self = shift;
|
||||
return sprintf "[%s]",
|
||||
join ',', map "[$_]", map { join ',', map "[$_->[0],$_->[1]]", @$_ } @$self;
|
||||
}
|
||||
|
||||
sub offset {
|
||||
my $self = shift;
|
||||
return Slic3r::Geometry::Clipper::offset($self, @_);
|
||||
|
|
|
@ -55,8 +55,11 @@ sub fill_surface {
|
|||
|
||||
# clip paths against a slightly offsetted expolygon, so that the first and last paths
|
||||
# are kept even if the expolygon has vertical sides
|
||||
# the minimum offset for preventing edge lines from being clipped is scaled_epsilon;
|
||||
# however we use a larger offset to support expolygons with slightly skewed sides and
|
||||
# not perfectly straight
|
||||
my @paths = @{ Boost::Geometry::Utils::multi_polygon_multi_linestring_intersection(
|
||||
[ $expolygon->offset_ex(scaled_epsilon) ],
|
||||
[ $expolygon->offset_ex($line_spacing*0.05) ],
|
||||
[ @vertical_lines ],
|
||||
) };
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue