mirror of
				https://github.com/SoftFever/OrcaSlicer.git
				synced 2025-10-31 04:31:15 -06:00 
			
		
		
		
	Fix crash when switching infill pattern between cubic & adaptive cubic
Cheery picked from prusa3d/PrusaSlicer@2b0a7ccb2c
This commit is contained in:
		
							parent
							
								
									5d75a95dc3
								
							
						
					
					
						commit
						993e653c54
					
				
					 1 changed files with 1 additions and 9 deletions
				
			
		|  | @ -913,20 +913,12 @@ bool PrintObject::invalidate_state_by_config_options( | |||
|             || opt_key == "bottom_surface_pattern" | ||||
|             || opt_key == "internal_solid_infill_pattern" | ||||
|             || opt_key == "external_fill_link_max_length" | ||||
|             || opt_key == "sparse_infill_pattern" | ||||
|             || opt_key == "infill_anchor" | ||||
|             || opt_key == "infill_anchor_max" | ||||
|             || opt_key == "top_surface_line_width" | ||||
|             || opt_key == "initial_layer_line_width") { | ||||
|             steps.emplace_back(posInfill); | ||||
|         } else if (opt_key == "sparse_infill_pattern") { | ||||
|             steps.emplace_back(posInfill); | ||||
|             const auto *old_fill_pattern = old_config.option<ConfigOptionEnum<InfillPattern>>(opt_key); | ||||
|             const auto *new_fill_pattern = new_config.option<ConfigOptionEnum<InfillPattern>>(opt_key); | ||||
|             assert(old_fill_pattern && new_fill_pattern); | ||||
|             // We need to recalculate infill surfaces when infill_only_where_needed is enabled, and we are switching from
 | ||||
|             // the Lightning infill to another infill or vice versa.
 | ||||
|             if (PrintObject::infill_only_where_needed && (new_fill_pattern->value == ipLightning || old_fill_pattern->value == ipLightning)) | ||||
|             steps.emplace_back(posPrepareInfill); | ||||
|         } else if (opt_key == "sparse_infill_density") { | ||||
|             // One likely wants to reslice only when switching between zero infill to simulate boolean difference (subtracting volumes),
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Noisyfox
						Noisyfox