Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/prusa3d/PrusaSlicer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlessandro Ranellucci <aar@cpan.org>2011-10-10 00:18:06 +0400
committerAlessandro Ranellucci <aar@cpan.org>2011-10-10 00:18:06 +0400
commit84abd41cf454bcc9bccaa0c3921263d519106d97 (patch)
tree76a4f389ba15fa0aab363157fe374dd5e262e22b /lib/Slic3r/Print.pm
parent459577f9a2ee4b6a751ba735cf23a023bcd68ce8 (diff)
Fixes for bridges
Diffstat (limited to 'lib/Slic3r/Print.pm')
-rw-r--r--lib/Slic3r/Print.pm9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/Slic3r/Print.pm b/lib/Slic3r/Print.pm
index 783b126b8..8cff162da 100644
--- a/lib/Slic3r/Print.pm
+++ b/lib/Slic3r/Print.pm
@@ -120,6 +120,15 @@ sub detect_surfaces_type {
# of current layer and lower one)
if ($lower_layer) {
@bottom = $surface_difference->($layer->surfaces, $lower_layer->surfaces, 'bottom');
+ for (@bottom) {
+ $_->contour->merge_continuous_lines;
+ $_->contour->remove_acute_vertices;
+
+ # okay, this is an Ugly Hack(tm) to avoid floating point math problems
+ # with diagonal bridges. will find a nicer solution, promised.
+ my $offset = offset([$_->contour->p], 100, 100, JT_MITER, 2);
+ @{$_->contour->points} = map Slic3r::Point->cast($_), @{ $offset->[0] };
+ }
#Slic3r::SVG::output(undef, "layer_" . $layer->id . "_diff.svg",
# green_polygons => [ map $_->p, @{$layer->surfaces} ],