mirror of
https://git.mirrors.martin98.com/https://github.com/slic3r/Slic3r.git
synced 2025-08-14 17:56:01 +08:00
Compensate raft height for adaptive indicator plane
This commit is contained in:
parent
8e6cb40140
commit
bdd3afa2ba
@ -185,6 +185,12 @@ sub new {
|
||||
|
||||
$self->{splineControl}->on_z_indicator(sub {
|
||||
my ($z) = @_;
|
||||
|
||||
if($z) { # compensate raft height
|
||||
my $top_layer = $self->{object}->get_layer($self->{object}->layer_count-1);
|
||||
my $raft_height = max(0, $top_layer->print_z - unscale($self->{object}->size->z));
|
||||
$z += $raft_height;
|
||||
}
|
||||
$self->{preview3D}->canvas->SetCuttingPlane(Z, $z, []);
|
||||
$self->{preview3D}->canvas->Render;
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user