mirror of
				https://github.com/SoftFever/OrcaSlicer.git
				synced 2025-11-02 20:51:23 -07:00 
			
		
		
		
	Use bridge flow for 3D honeycomb
This commit is contained in:
		
							parent
							
								
									5435d88924
								
							
						
					
					
						commit
						d5eb6b7be0
					
				
					 1 changed files with 10 additions and 2 deletions
				
			
		| 
						 | 
				
			
			@ -10,11 +10,19 @@ use Slic3r::Geometry::Clipper qw(intersection_pl);
 | 
			
		|||
sub fill_surface {
 | 
			
		||||
    my ($self, $surface, %params) = @_;
 | 
			
		||||
    
 | 
			
		||||
    # use bridge flow since most of this pattern hangs in air
 | 
			
		||||
    my $flow = Slic3r::Flow->new(
 | 
			
		||||
        width               => $params{flow}->width,
 | 
			
		||||
        height              => $params{flow}->height,
 | 
			
		||||
        nozzle_diameter     => $params{flow}->nozzle_diameter,
 | 
			
		||||
        bridge              => 1,
 | 
			
		||||
    );
 | 
			
		||||
    
 | 
			
		||||
    my $expolygon = $surface->expolygon;
 | 
			
		||||
    my $bb = $expolygon->bounding_box;
 | 
			
		||||
    my $size = $bb->size;
 | 
			
		||||
    
 | 
			
		||||
    my $distance = $params{flow}->scaled_spacing / $params{density};
 | 
			
		||||
    my $distance = $flow->scaled_spacing / $params{density};
 | 
			
		||||
    
 | 
			
		||||
    # generate pattern
 | 
			
		||||
    my @polylines = map Slic3r::Polyline->new(@$_),
 | 
			
		||||
| 
						 | 
				
			
			@ -53,7 +61,7 @@ sub fill_surface {
 | 
			
		|||
    }
 | 
			
		||||
    
 | 
			
		||||
    # TODO: return ExtrusionLoop objects to get better chained paths
 | 
			
		||||
    return { flow => $params{flow} }, @polylines;
 | 
			
		||||
    return { flow => $flow}, @polylines;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue