mirror of
				https://github.com/SoftFever/OrcaSlicer.git
				synced 2025-11-02 20:51:23 -07:00 
			
		
		
		
	Use smarter object function in partial arrangement with empty bed.
This commit is contained in:
		
							parent
							
								
									2813db8906
								
							
						
					
					
						commit
						869ae0247e
					
				
					 2 changed files with 20 additions and 8 deletions
				
			
		| 
						 | 
				
			
			@ -167,6 +167,8 @@ struct NfpPConfig {
 | 
			
		|||
                       const ItemGroup&              // remaining items
 | 
			
		||||
                       )> before_packing;
 | 
			
		||||
 | 
			
		||||
    std::function<void(const ItemGroup &, NfpPConfig &config)> on_preload;
 | 
			
		||||
 | 
			
		||||
    NfpPConfig(): rotations({0.0, Pi/2.0, Pi, 3*Pi/2}),
 | 
			
		||||
        alignment(Alignment::CENTER), starting_point(Alignment::CENTER) {}
 | 
			
		||||
};
 | 
			
		||||
| 
						 | 
				
			
			@ -577,6 +579,12 @@ public:
 | 
			
		|||
        Base::clearItems();
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    void preload(const ItemGroup& packeditems) {
 | 
			
		||||
        Base::preload(packeditems);
 | 
			
		||||
        if (config_.on_preload)
 | 
			
		||||
            config_.on_preload(packeditems, config_);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
private:
 | 
			
		||||
 | 
			
		||||
    using Shapes = TMultiShape<RawShape>;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue