mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-08-12 19:19:02 +08:00
Bugfix: random misalignment of the 3D Honeycomb pattern
This commit is contained in:
parent
d38503bf44
commit
67d7658c59
@ -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);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user