diff --git a/lib/Slic3r/TriangleMesh.pm b/lib/Slic3r/TriangleMesh.pm index ea9e664e53..74efc39db3 100644 --- a/lib/Slic3r/TriangleMesh.pm +++ b/lib/Slic3r/TriangleMesh.pm @@ -585,8 +585,8 @@ sub horizontal_projection { push @f, Slic3r::Polygon->new([ map [ @{$self->vertices->[$_]}[X,Y] ], @$facet ]); } - $_->make_counter_clockwise for @f; my $scale_vector = Math::Clipper::integerize_coordinate_sets({ bits => 32 }, @f); + $_->make_counter_clockwise for @f; # do this after scaling, as winding order might change while doing that my $union = union_ex([ Slic3r::Geometry::Clipper::offset(\@f, 10000) ]); Math::Clipper::unscale_coordinate_sets($scale_vector, $_) for @$union; return $union;