mirror of
				https://github.com/SoftFever/OrcaSlicer.git
				synced 2025-10-31 04:31:15 -06:00 
			
		
		
		
	Cache Slic3r::Fill object
This commit is contained in:
		
							parent
							
								
									312bb285a0
								
							
						
					
					
						commit
						e088d9b3f7
					
				
					 3 changed files with 11 additions and 8 deletions
				
			
		|  | @ -20,6 +20,7 @@ has 'regions'                => (is => 'rw', default => sub {[]}); | |||
| has 'support_material_flow'  => (is => 'rw'); | ||||
| has 'first_layer_support_material_flow' => (is => 'rw'); | ||||
| has 'has_support_material'   => (is => 'lazy'); | ||||
| has 'fill_maker'             => (is => 'lazy'); | ||||
| 
 | ||||
| # ordered collection of extrusion paths to build skirt loops | ||||
| has 'skirt' => ( | ||||
|  | @ -70,6 +71,11 @@ sub _build_has_support_material { | |||
|         || $self->config->support_material_enforce_layers > 0; | ||||
| } | ||||
| 
 | ||||
| sub _build_fill_maker { | ||||
|     my $self = shift; | ||||
|     return Slic3r::Fill->new(print => $self); | ||||
| } | ||||
| 
 | ||||
| sub add_model { | ||||
|     my $self = shift; | ||||
|     my ($model) = @_; | ||||
|  | @ -389,7 +395,7 @@ sub export_gcode { | |||
|     # this will generate extrusion paths for each layer | ||||
|     $status_cb->(80, "Infilling layers"); | ||||
|     { | ||||
|         my $fill_maker = Slic3r::Fill->new('print' => $self); | ||||
|         my $fill_maker = $self->fill_maker; | ||||
|         Slic3r::parallelize( | ||||
|             items => sub { | ||||
|                 my @items = ();  # [obj_idx, layer_id] | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Alessandro Ranellucci
						Alessandro Ranellucci