mirror of
				https://github.com/SoftFever/OrcaSlicer.git
				synced 2025-10-30 20:21:12 -06:00 
			
		
		
		
	Added some comments and sequential version of png slice export.
This commit is contained in:
		
							parent
							
								
									835e89f8c1
								
							
						
					
					
						commit
						7fe9a56ef8
					
				
					 1 changed files with 8 additions and 3 deletions
				
			
		|  | @ -1301,8 +1301,10 @@ public: | |||
|     void saveLayer(unsigned lyr, const std::string& path); | ||||
| }; | ||||
| 
 | ||||
| template<> // Implementation for PNG raster output
 | ||||
| class FilePrinter<Print::FilePrinterFormat::PNG> { | ||||
| // Implementation for PNG raster output
 | ||||
| // Be aware that if a large number of layers are allocated, it can wery well
 | ||||
| // exhaust the available memory.
 | ||||
| template<> class FilePrinter<Print::FilePrinterFormat::PNG> { | ||||
| 
 | ||||
|     struct Layer { | ||||
|         Raster first; | ||||
|  | @ -1498,8 +1500,8 @@ void Print::print_to(std::string dirpath, | |||
|         } | ||||
| 
 | ||||
|         printer.finishLayer(layer_id);  // Finish the layer for later saving it.
 | ||||
|         // printer.saveLayer(layer_id, dir); We could save the layer immediately
 | ||||
| 
 | ||||
|         // printer.saveLayer(layer_id, dir); We could save the layer immediately
 | ||||
|     }; | ||||
| 
 | ||||
|     // Print all the layers in parallel
 | ||||
|  | @ -1507,6 +1509,9 @@ void Print::print_to(std::string dirpath, | |||
|                                                        layers.size(), | ||||
|                                                        process_layer); | ||||
| 
 | ||||
|     // Sequential version (for testing)
 | ||||
|     // for(unsigned l = 0; l < layers.size(); ++l) process_layer(l);
 | ||||
| 
 | ||||
|     // Save the print into the file system.
 | ||||
|     printer.save(dir); | ||||
| } | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 tamasmeszaros
						tamasmeszaros