mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-12 09:17:52 -06:00
Honeycomb infill. #300
This commit is contained in:
parent
0faebad4da
commit
cb182b8bc2
8 changed files with 126 additions and 20 deletions
|
@ -3,11 +3,14 @@ use Moo;
|
|||
|
||||
use XXX;
|
||||
|
||||
has 'print' => (is => 'rw');
|
||||
has 'layer' => (is => 'rw');
|
||||
has 'max_print_dimension' => (is => 'rw');
|
||||
|
||||
use constant PI => 4 * atan2(1, 1);
|
||||
|
||||
sub angles () { [0, PI/2] }
|
||||
|
||||
sub infill_direction {
|
||||
my $self = shift;
|
||||
my ($surface) = @_;
|
||||
|
@ -20,9 +23,9 @@ sub infill_direction {
|
|||
|
||||
if ($self->layer) {
|
||||
# alternate fill direction
|
||||
if (($self->layer->id / $surface->depth_layers) % 2) {
|
||||
$rotate[0] = Slic3r::Geometry::deg2rad($Slic3r::fill_angle) + PI/2;
|
||||
}
|
||||
my $layer_num = $self->layer->id / $surface->depth_layers;
|
||||
my $angle = $self->angles->[$layer_num % @{$self->angles}];
|
||||
$rotate[0] = Slic3r::Geometry::deg2rad($Slic3r::fill_angle) + $angle if $angle;
|
||||
}
|
||||
|
||||
# use bridge angle
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue