mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-10-31 20:51:12 -06:00
Incomplete work for using Boost.Polygon to compute medial axis
This commit is contained in:
parent
11f065ca5e
commit
bf91f3096a
1650 changed files with 307148 additions and 9 deletions
|
|
@ -46,7 +46,7 @@ sub bounding_box {
|
|||
# this method only works for expolygons having only a contour or
|
||||
# a contour and a hole, and not being thicker than the supplied
|
||||
# width. it returns a polyline or a polygon
|
||||
sub medial_axis {
|
||||
sub ___medial_axis {
|
||||
my ($self, $width) = @_;
|
||||
return $self->_medial_axis_voronoi($width);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -223,7 +223,7 @@ sub make_perimeters {
|
|||
|
||||
# process thin walls by collapsing slices to single passes
|
||||
if (@thin_walls) {
|
||||
my @p = map $_->medial_axis($pspacing), @thin_walls;
|
||||
my @p = map @{$_->medial_axis($pspacing)}, @thin_walls;
|
||||
my @paths = ();
|
||||
for my $p (@p) {
|
||||
next if $p->length <= $pspacing * 2;
|
||||
|
|
@ -284,7 +284,7 @@ sub _fill_gaps {
|
|||
$_->isa('Slic3r::Polygon')
|
||||
? Slic3r::ExtrusionLoop->new(polygon => $_, %path_args)->split_at_first_point # we should keep these as loops
|
||||
: Slic3r::ExtrusionPath->new(polyline => $_, %path_args),
|
||||
} map $_->medial_axis($flow->scaled_width), @this_width);
|
||||
} map @{$_->medial_axis($flow->scaled_width)}, @this_width);
|
||||
|
||||
Slic3r::debugf " %d gaps filled with extrusion width = %s\n", scalar @this_width, $width
|
||||
if @{ $self->thin_fills };
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue