mirror of
				https://github.com/SoftFever/OrcaSlicer.git
				synced 2025-11-02 20:51:23 -07:00 
			
		
		
		
	
		
			
				
	
	
		
			21 lines
		
	
	
	
		
			440 B
		
	
	
	
		
			Perl
		
	
	
	
	
	
			
		
		
	
	
			21 lines
		
	
	
	
		
			440 B
		
	
	
	
		
			Perl
		
	
	
	
	
	
#!/usr/bin/perl
 | 
						|
 | 
						|
use strict;
 | 
						|
use warnings;
 | 
						|
 | 
						|
use Slic3r::XS;
 | 
						|
use Test::More tests => 3;
 | 
						|
 | 
						|
my $square = [  # ccw
 | 
						|
    [100, 100],
 | 
						|
    [200, 100],
 | 
						|
    [200, 200],
 | 
						|
    [100, 200],
 | 
						|
];
 | 
						|
 | 
						|
my $polygon = Slic3r::Polygon->new(@$square);
 | 
						|
is ref($polygon->arrayref), 'ARRAY', 'polygon arrayref is unblessed';
 | 
						|
isa_ok $polygon->[0], 'Slic3r::Point::Ref', 'polygon point is blessed';
 | 
						|
ok ref($polygon->first_point) eq 'Slic3r::Point', 'first_point';
 | 
						|
 | 
						|
__END__
 |