1
0
mirror of https://github.com/FULU-Foundation/OrcaSlicer-bambulab.git synced 2026-08-02 11:35:51 +00:00

Bugfix: random misalignment of the 3D Honeycomb pattern

This commit is contained in:
Alessandro Ranellucci
2014-12-29 14:42:41 +01:00
parent d38503bf44
commit 67d7658c59
+5 -3
View File
@@ -19,12 +19,14 @@ sub fill_surface {
my $distance = scale($self->spacing) / $params{density}; my $distance = scale($self->spacing) / $params{density};
# align bounding box to a multiple of our honeycomb grid # align bounding box to a multiple of our honeycomb grid module
# (a module is 2*$distance since one $distance half-module is
# growing while the other $distance half-module is shrinking)
{ {
my $min = $bb->min_point; my $min = $bb->min_point;
$min->translate( $min->translate(
-($bb->x_min % $distance), -($bb->x_min % (2*$distance)),
-($bb->y_min % $distance), -($bb->y_min % (2*$distance)),
); );
$bb->merge_point($min); $bb->merge_point($min);
} }