mirror of
				https://github.com/SoftFever/OrcaSlicer.git
				synced 2025-10-30 20:21:12 -06:00 
			
		
		
		
	New option to configure the threshold for enforcing solid infill. #224
This commit is contained in:
		
							parent
							
								
									ba58e0733f
								
							
						
					
					
						commit
						92518d28fc
					
				
					 5 changed files with 16 additions and 2 deletions
				
			
		|  | @ -170,6 +170,9 @@ The author of the Silk icon set is Mark James. | ||||||
|         --layer-gcode       Load layer-change G-code from the supplied file (default: nothing). |         --layer-gcode       Load layer-change G-code from the supplied file (default: nothing). | ||||||
|         --extra-perimeters  Add more perimeters when needed (default: yes) |         --extra-perimeters  Add more perimeters when needed (default: yes) | ||||||
|         --randomize-start   Randomize starting point across layers (default: yes) |         --randomize-start   Randomize starting point across layers (default: yes) | ||||||
|  |         --solid-infill-below-area | ||||||
|  |                             Force solid infill when a region has a smaller area than this threshold | ||||||
|  |                             (mm^2, default: 70) | ||||||
|        |        | ||||||
|        Support material options: |        Support material options: | ||||||
|         --support-material  Generate support material for overhangs |         --support-material  Generate support material for overhangs | ||||||
|  |  | ||||||
|  | @ -449,6 +449,14 @@ our $Options = { | ||||||
|         max     => 359, |         max     => 359, | ||||||
|         default => 45, |         default => 45, | ||||||
|     }, |     }, | ||||||
|  |     'solid_infill_below_area' => { | ||||||
|  |         label   => 'Solid infill threshold area', | ||||||
|  |         tooltip => 'Force solid infill for regions having a smaller area than the specified threshold.', | ||||||
|  |         sidetext => 'mm²', | ||||||
|  |         cli     => 'solid-infill-below-area=f', | ||||||
|  |         type    => 'f', | ||||||
|  |         default => 70, | ||||||
|  |     }, | ||||||
|     'extra_perimeters' => { |     'extra_perimeters' => { | ||||||
|         label   => 'Generate extra perimeters when needed', |         label   => 'Generate extra perimeters when needed', | ||||||
|         cli     => 'extra-perimeters!', |         cli     => 'extra-perimeters!', | ||||||
|  |  | ||||||
|  | @ -401,7 +401,7 @@ sub build { | ||||||
|         }, |         }, | ||||||
|         { |         { | ||||||
|             title => 'Advanced', |             title => 'Advanced', | ||||||
|             options => [qw(infill_every_layers fill_angle)], |             options => [qw(infill_every_layers fill_angle solid_infill_below_area)], | ||||||
|         }, |         }, | ||||||
|     ]); |     ]); | ||||||
|      |      | ||||||
|  |  | ||||||
|  | @ -365,7 +365,7 @@ sub prepare_fill_surfaces { | ||||||
|          |          | ||||||
|     # turn too small internal regions into solid regions |     # turn too small internal regions into solid regions | ||||||
|     { |     { | ||||||
|         my $min_area = ((7 * $self->infill_flow->spacing / &Slic3r::SCALING_FACTOR)**2) * PI; |         my $min_area = scale scale $Slic3r::Config->solid_infill_below_area; # scaling an area requires two calls! | ||||||
|         my @small = grep $_->surface_type == S_TYPE_INTERNAL && $_->expolygon->contour->area <= $min_area, @surfaces; |         my @small = grep $_->surface_type == S_TYPE_INTERNAL && $_->expolygon->contour->area <= $min_area, @surfaces; | ||||||
|         $_->surface_type(S_TYPE_INTERNALSOLID) for @small; |         $_->surface_type(S_TYPE_INTERNALSOLID) for @small; | ||||||
|         Slic3r::debugf "identified %d small surfaces at layer %d\n", scalar(@small), $self->id if @small > 0; |         Slic3r::debugf "identified %d small surfaces at layer %d\n", scalar(@small), $self->id if @small > 0; | ||||||
|  |  | ||||||
|  | @ -213,6 +213,9 @@ $j | ||||||
|     --layer-gcode       Load layer-change G-code from the supplied file (default: nothing). |     --layer-gcode       Load layer-change G-code from the supplied file (default: nothing). | ||||||
|     --extra-perimeters  Add more perimeters when needed (default: yes) |     --extra-perimeters  Add more perimeters when needed (default: yes) | ||||||
|     --randomize-start   Randomize starting point across layers (default: yes) |     --randomize-start   Randomize starting point across layers (default: yes) | ||||||
|  |     --solid-infill-below-area | ||||||
|  |                         Force solid infill when a region has a smaller area than this threshold | ||||||
|  |                         (mm^2, default: $config->{solid_infill_below_area}) | ||||||
|    |    | ||||||
|    Support material options: |    Support material options: | ||||||
|     --support-material  Generate support material for overhangs |     --support-material  Generate support material for overhangs | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Alessandro Ranellucci
						Alessandro Ranellucci