Scale bounding_box by sqrt(2) in honeycomb too to ensure it will cover the object even after rotation, like we already did for Rectilinear
This commit is contained in:
parent
b5b0c2cc89
commit
627debf284
@ -38,10 +38,12 @@ sub fill_surface {
|
|||||||
|
|
||||||
# adjust actual bounding box to the nearest multiple of our hex pattern
|
# adjust actual bounding box to the nearest multiple of our hex pattern
|
||||||
# and align it so that it matches across layers
|
# and align it so that it matches across layers
|
||||||
|
|
||||||
my $bounding_box = [ @{$self->bounding_box} ]; # clone
|
my $bounding_box = [ @{$self->bounding_box} ]; # clone
|
||||||
$bounding_box->[$_] = 0 for X1, Y1;
|
$bounding_box->[$_] = 0 for X1, Y1;
|
||||||
{
|
{
|
||||||
my $bb_polygon = Slic3r::Polygon->new_from_bounding_box($bounding_box);
|
my $bb_polygon = Slic3r::Polygon->new_from_bounding_box($bounding_box);
|
||||||
|
$bb_polygon->scale(sqrt 2);
|
||||||
$bb_polygon->rotate($rotate_vector->[0][0], $hex_center);
|
$bb_polygon->rotate($rotate_vector->[0][0], $hex_center);
|
||||||
$bounding_box = [ Slic3r::Geometry::bounding_box($bb_polygon) ];
|
$bounding_box = [ Slic3r::Geometry::bounding_box($bb_polygon) ];
|
||||||
# $bounding_box->[X1] and [Y1] represent the displacement between new bounding box offset and old one
|
# $bounding_box->[X1] and [Y1] represent the displacement between new bounding box offset and old one
|
||||||
|
Loading…
Reference in New Issue
Block a user