mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-17 10:32:20 +00:00
Bugfix: is_printable() wasn't discarding narrow ring-shaped top/bottom surfaces because it was only considering the contour. This caused extra shell material even in hollow prints. #1049
This commit is contained in:
@@ -62,6 +62,17 @@ sub is_valid {
|
||||
&& (!first { $_->is_counter_clockwise } $self->holes);
|
||||
}
|
||||
|
||||
# returns false if the expolygon is too tight to be printed
|
||||
sub is_printable {
|
||||
my $self = shift;
|
||||
my ($width) = @_;
|
||||
|
||||
# try to get an inwards offset
|
||||
# for a distance equal to half of the extrusion width;
|
||||
# if no offset is possible, then expolygon is not printable.
|
||||
return Slic3r::Geometry::Clipper::offset($self, -$width / 2) ? 1 : 0;
|
||||
}
|
||||
|
||||
sub boost_polygon {
|
||||
my $self = shift;
|
||||
return Boost::Geometry::Utils::polygon(@$self);
|
||||
|
||||
Reference in New Issue
Block a user