mirror of
				https://github.com/SoftFever/OrcaSlicer.git
				synced 2025-11-02 20:51:23 -07:00 
			
		
		
		
	Put a hard limit on manually configured extrusion widths (10 * the largest nozzle diameter configured) to prevent confusion when a bad value is entered. #1691
Conflicts: lib/Slic3r/Config.pm
This commit is contained in:
		
							parent
							
								
									529d1b19c3
								
							
						
					
					
						commit
						9515acf527
					
				
					 1 changed files with 10 additions and 1 deletions
				
			
		| 
						 | 
					@ -3,7 +3,7 @@ use strict;
 | 
				
			||||||
use warnings;
 | 
					use warnings;
 | 
				
			||||||
use utf8;
 | 
					use utf8;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
use List::Util qw(first);
 | 
					use List::Util qw(first max);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# cemetery of old config settings
 | 
					# cemetery of old config settings
 | 
				
			||||||
our @Ignore = qw(duplicate_x duplicate_y multiply_x multiply_y support_material_tool acceleration
 | 
					our @Ignore = qw(duplicate_x duplicate_y multiply_x multiply_y support_material_tool acceleration
 | 
				
			||||||
| 
						 | 
					@ -319,6 +319,15 @@ sub validate {
 | 
				
			||||||
            if defined first { $_ } @{ $self->retract_layer_change };
 | 
					            if defined first { $_ } @{ $self->retract_layer_change };
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    
 | 
					    
 | 
				
			||||||
 | 
					    # extrusion widths
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        my $max_nozzle_diameter = max(@{ $self->nozzle_diameter });
 | 
				
			||||||
 | 
					        die "Invalid extrusion width (too large)\n"
 | 
				
			||||||
 | 
					            if defined first { $_ > 10 * $max_nozzle_diameter }
 | 
				
			||||||
 | 
					                map $self->get("${_}_extrusion_width"),
 | 
				
			||||||
 | 
					                qw(perimeter infill solid_infill top_infill support_material first_layer);
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					    
 | 
				
			||||||
    # general validation, quick and dirty
 | 
					    # general validation, quick and dirty
 | 
				
			||||||
    foreach my $opt_key (@{$self->get_keys}) {
 | 
					    foreach my $opt_key (@{$self->get_keys}) {
 | 
				
			||||||
        my $opt = $Options->{$opt_key};
 | 
					        my $opt = $Options->{$opt_key};
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue