mirror of
				https://github.com/SoftFever/OrcaSlicer.git
				synced 2025-10-31 12:41:20 -06:00 
			
		
		
		
	More constants, less strings => ess memory usage
This commit is contained in:
		
							parent
							
								
									8fe5d11624
								
							
						
					
					
						commit
						aa9563f00b
					
				
					 10 changed files with 51 additions and 27 deletions
				
			
		|  | @ -3,6 +3,7 @@ use Moo; | |||
| 
 | ||||
| extends 'Slic3r::Fill::Base'; | ||||
| 
 | ||||
| use Slic3r::ExtrusionPath ':roles'; | ||||
| use Slic3r::Geometry qw(scale unscale X1 Y1 X2 Y2); | ||||
| 
 | ||||
| sub fill_surface { | ||||
|  | @ -50,7 +51,7 @@ sub fill_surface { | |||
|         ($bounding_box->[X1] + $bounding_box->[X2]) / 2, | ||||
|         ($bounding_box->[Y1] + $bounding_box->[Y2]) / 2, | ||||
|     ); | ||||
|     foreach my $loop (map Slic3r::ExtrusionLoop->new(polygon => $_, role => 'fill'), @loops) { | ||||
|     foreach my $loop (map Slic3r::ExtrusionLoop->new(polygon => $_, role => EXTR_ROLE_FILL), @loops) { | ||||
|         # extrude all loops ccw | ||||
|         $loop->polygon->make_counter_clockwise; | ||||
|          | ||||
|  |  | |||
|  | @ -57,7 +57,7 @@ sub fill_surface { | |||
|     # connect lines | ||||
|     { | ||||
|         my $collection = Slic3r::ExtrusionPath::Collection->new( | ||||
|             paths => [ map Slic3r::ExtrusionPath->new(polyline => Slic3r::Polyline->new(@$_), role => 'bogus'), @paths ], | ||||
|             paths => [ map Slic3r::ExtrusionPath->new(polyline => Slic3r::Polyline->new(@$_), role => -1), @paths ], | ||||
|         ); | ||||
|         @paths = (); | ||||
|          | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Alessandro Ranellucci
						Alessandro Ranellucci