mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-24 23:23:59 -06:00
New --first-layer-height-ratio option. #36
This commit is contained in:
parent
097b8d9acb
commit
75a71a23a5
6 changed files with 36 additions and 5 deletions
|
@ -75,13 +75,19 @@ has 'fills' => (
|
|||
# Z used for slicing
|
||||
sub slice_z {
|
||||
my $self = shift;
|
||||
return ($self->id * $Slic3r::layer_height + $Slic3r::layer_height/2) / $Slic3r::resolution;
|
||||
if ($self->id == 0) {
|
||||
return ($Slic3r::layer_height * $Slic3r::first_layer_height_ratio) / 2 / $Slic3r::resolution;
|
||||
}
|
||||
return (($Slic3r::layer_height * $Slic3r::first_layer_height_ratio)
|
||||
+ (($self->id-1) * $Slic3r::layer_height)
|
||||
+ ($Slic3r::layer_height/2)) / $Slic3r::resolution;
|
||||
}
|
||||
|
||||
# Z used for printing
|
||||
sub print_z {
|
||||
my $self = shift;
|
||||
return ($self->id + 1) * $Slic3r::layer_height / $Slic3r::resolution;
|
||||
return (($Slic3r::layer_height * $Slic3r::first_layer_height_ratio)
|
||||
+ ($self->id * $Slic3r::layer_height)) / $Slic3r::resolution;
|
||||
}
|
||||
|
||||
sub add_surface {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue