mirror of
				https://github.com/SoftFever/OrcaSlicer.git
				synced 2025-10-31 04:31:15 -06:00 
			
		
		
		
	New bridge flow rate multiplier option. #85
This commit is contained in:
		
							parent
							
								
									3ac9dd513b
								
							
						
					
					
						commit
						28a89c70c9
					
				
					 6 changed files with 17 additions and 4 deletions
				
			
		|  | @ -115,6 +115,11 @@ our $Options = { | |||
|         cli     => 'extrusion-width-ratio=f', | ||||
|         type    => 'f', | ||||
|     }, | ||||
|     'bridge_flow_ratio' => { | ||||
|         label   => 'Bridge flow ratio', | ||||
|         cli     => 'bridge-flow-ratio=f', | ||||
|         type    => 'f', | ||||
|     }, | ||||
|     'first_layer_height_ratio' => { | ||||
|         label   => 'First layer height ratio', | ||||
|         cli     => 'first-layer-height-ratio=f', | ||||
|  |  | |||
|  | @ -88,14 +88,19 @@ sub make_fill { | |||
|         my $filler      = $Slic3r::fill_pattern; | ||||
|         my $density     = $Slic3r::fill_density; | ||||
|         my $flow_width  = $Slic3r::flow_width; | ||||
|         my $flow_ratio  = 1; | ||||
|         my $is_bridge = $layer->id > 0 && $surface->surface_type eq 'bottom'; | ||||
|         my $is_solid = $surface->surface_type =~ /^(top|bottom)$/; | ||||
|          | ||||
|         # force 100% density and rectilinear fill for external surfaces | ||||
|         if ($surface->surface_type ne 'internal') { | ||||
|             $density = 1; | ||||
|             $filler = $is_bridge ? 'rectilinear' : $Slic3r::solid_fill_pattern; | ||||
|             $flow_width = $Slic3r::nozzle_diameter if $is_bridge; | ||||
|             $filler = $Slic3r::solid_fill_pattern; | ||||
|             if ($is_bridge) { | ||||
|                 $filler = 'rectilinear'; | ||||
|                 $flow_width = sqrt($Slic3r::bridge_flow_ratio * ($Slic3r::nozzle_diameter**2)); | ||||
|                 $flow_ratio = $Slic3r::bridge_flow_ratio; | ||||
|             } | ||||
|         } else { | ||||
|             next SURFACE unless $density > 0; | ||||
|         } | ||||
|  | @ -114,7 +119,7 @@ sub make_fill { | |||
|                     [ @$_ ], | ||||
|                     role => ($is_bridge ? 'bridge' : $is_solid ? 'solid-fill' : 'fill'), | ||||
|                     depth_layers => $surface->depth_layers, | ||||
|                     flow_ratio   => $params->{flow_ratio}, | ||||
|                     flow_ratio   => $flow_ratio * ($params->{flow_ratio} || 1), | ||||
|                 ), @paths, | ||||
|             ], | ||||
|         ); | ||||
|  |  | |||
|  | @ -57,7 +57,7 @@ sub new { | |||
|         }, | ||||
|         extrusion => { | ||||
|             title => 'Extrusion', | ||||
|             options => [qw(extrusion_width_ratio)], | ||||
|             options => [qw(extrusion_width_ratio bridge_flow_ratio)], | ||||
|         }, | ||||
|     ); | ||||
|     $self->{panels} = \%panels; | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Alessandro Ranellucci
						Alessandro Ranellucci