mirror of
				https://github.com/SoftFever/OrcaSlicer.git
				synced 2025-11-02 20:51:23 -07:00 
			
		
		
		
	Removed chained_path_items()
This commit is contained in:
		
							parent
							
								
									0045f84ed2
								
							
						
					
					
						commit
						30297ee4dc
					
				
					 3 changed files with 9 additions and 23 deletions
				
			
		| 
						 | 
				
			
			@ -10,15 +10,15 @@ our @EXPORT_OK = qw(offset offset_ex
 | 
			
		|||
    intersection intersection_pl diff_pl union CLIPPER_OFFSET_SCALE);
 | 
			
		||||
 | 
			
		||||
use Slic3r::Geometry qw(scale);
 | 
			
		||||
use Slic3r::Geometry qw(chained_path);
 | 
			
		||||
 | 
			
		||||
sub traverse_pt {
 | 
			
		||||
    my ($polynodes) = @_;
 | 
			
		||||
    
 | 
			
		||||
    # use a nearest neighbor search to order these children
 | 
			
		||||
    # TODO: supply second argument to chained_path_items() too?
 | 
			
		||||
    my @nodes = @{Slic3r::Geometry::chained_path_items(
 | 
			
		||||
        [ map [ ($_->{outer} ? $_->{outer}[0] : $_->{hole}[0]), $_ ], @$polynodes ],
 | 
			
		||||
    )};
 | 
			
		||||
    # TODO: supply second argument to chained_path() too?
 | 
			
		||||
    my @ordering_points = map { ($_->{outer} // $_->{hole})->first_point } @$polynodes;
 | 
			
		||||
    my @nodes = @$polynodes[ @{chained_path(\@ordering_points)} ];
 | 
			
		||||
    
 | 
			
		||||
    my @polygons = ();
 | 
			
		||||
    foreach my $polynode (@$polynodes) {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue