Compensate raft height for adaptive indicator plane

This commit is contained in:
Florens Wasserfall 2017-04-19 13:35:09 +02:00
parent 8e6cb40140
commit bdd3afa2ba

View File

@ -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;
});