Welcome to mirror list, hosted at ThFree Co, Russian Federation.

19_model.t « t « xs - github.com/prusa3d/PrusaSlicer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 56b3631af3ed61f01b63ff30965bade92e369d7f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/usr/bin/perl

use strict;
use warnings;

use Slic3r::XS;
use Test::More tests => 4;

{
    my $model = Slic3r::Model->new;
    my $object = $model->_add_object;
    isa_ok $object, 'Slic3r::Model::Object::Ref';
    isa_ok $object->origin_translation, 'Slic3r::Pointf::Ref';
    $object->origin_translation->translate(10,0);
    is_deeply \@{$object->origin_translation}, [10,0], 'origin_translation is modified by ref';
    
    my $lhr = [ [ 5, 10, 0.1 ] ];
    $object->set_layer_height_ranges($lhr);
    is_deeply $object->layer_height_ranges, $lhr, 'layer_height_ranges roundtrip';
}

__END__