Cache a Z table for layer range search

This commit is contained in:
Alessandro Ranellucci 2013-06-23 17:07:12 +02:00
parent 37105e8237
commit f3a9d41c70
6 changed files with 55 additions and 19 deletions

View file

@ -6,7 +6,7 @@ use warnings;
use Slic3r::XS;
use Test::More tests => 1;
is_deeply Slic3r::Object::XS::get_layer_range([ 10, 20, 30, 40, 50, 60, 70, 80, 90, 100 ], 39, 69),
[2, 6], 'get_layer_range';
my $table = Slic3r::Object::XS::ZTable->new([ 10, 20, 30, 40, 50, 60, 70, 80, 90, 100 ]);
is_deeply $table->get_range(39, 69), [2, 6], 'get_layer_range';
__END__