Only draw the slices in toolpath preview for the current selected layer
This commit is contained in:
parent
617fbaa9bd
commit
4c3fa999f5
1 changed files with 27 additions and 26 deletions
|
@ -242,8 +242,10 @@ sub Render {
|
||||||
foreach my $layer (@{$self->layers}) {
|
foreach my $layer (@{$self->layers}) {
|
||||||
my $object = $layer->object;
|
my $object = $layer->object;
|
||||||
|
|
||||||
|
# only draw the slice for the current layer
|
||||||
|
next unless abs($layer->print_z - $self->z) < epsilon;
|
||||||
|
|
||||||
# draw slice contour
|
# draw slice contour
|
||||||
{
|
|
||||||
glLineWidth(1);
|
glLineWidth(1);
|
||||||
foreach my $copy (@{ $object->_shifted_copies }) {
|
foreach my $copy (@{ $object->_shifted_copies }) {
|
||||||
glPushMatrix();
|
glPushMatrix();
|
||||||
|
@ -275,7 +277,6 @@ sub Render {
|
||||||
glPopMatrix();
|
glPopMatrix();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
my $skirt_drawn = 0;
|
my $skirt_drawn = 0;
|
||||||
my $brim_drawn = 0;
|
my $brim_drawn = 0;
|
||||||
|
|
Loading…
Add table
Reference in a new issue