Little test for mixing objects and toolpaths

This commit is contained in:
Alessandro Ranellucci 2015-01-25 15:36:20 +01:00
parent c264969962
commit 9abcd5816c
2 changed files with 4 additions and 1 deletions

View File

@ -835,7 +835,7 @@ sub draw_volumes {
my @sorted_z = (); my @sorted_z = ();
my ($min_z, $max_z); my ($min_z, $max_z);
if ($volume->range) { if ($volume->range && $volume->offsets) {
@sorted_z = sort { $a <=> $b } keys %{$volume->offsets}; @sorted_z = sort { $a <=> $b } keys %{$volume->offsets};
($min_z, $max_z) = @{$volume->range}; ($min_z, $max_z) = @{$volume->range};

View File

@ -118,6 +118,9 @@ sub load_print {
if ($self->IsShown) { if ($self->IsShown) {
foreach my $object (@{$self->print->objects}) { foreach my $object (@{$self->print->objects}) {
$self->canvas->load_print_object_toolpaths($object); $self->canvas->load_print_object_toolpaths($object);
#my @volume_ids = $self->canvas->load_object($object->model_object);
#$self->canvas->volumes->[$_]->color->[3] = 0.2 for @volume_ids;
} }
$self->canvas->zoom_to_volumes; $self->canvas->zoom_to_volumes;
$self->_loaded(1); $self->_loaded(1);