mirror of
				https://github.com/SoftFever/OrcaSlicer.git
				synced 2025-10-31 04:31:15 -06:00 
			
		
		
		
	Fix for #6803 - Illegal character in filename when STL opened direct from CAD app
This commit is contained in:
		
							parent
							
								
									4ebcbca711
								
							
						
					
					
						commit
						ea4e9b35a3
					
				
					 1 changed files with 3 additions and 1 deletions
				
			
		|  | @ -2334,7 +2334,9 @@ std::vector<size_t> Plater::priv::load_files(const std::vector<fs::path>& input_ | |||
|             else { | ||||
|                 model = Slic3r::Model::read_from_file(path.string(), nullptr, nullptr, only_if(load_config, Model::LoadAttribute::CheckVersion)); | ||||
|                 for (auto obj : model.objects) | ||||
|                     if (obj->name.empty()) | ||||
|                     if (obj->name.empty() || | ||||
|                         obj->name.find_first_of("/") != std::string::npos) // When file is imported from Fusion360 the path containes "/" instead of "\\" (see https://github.com/prusa3d/PrusaSlicer/issues/6803)
 | ||||
|                                                                            // But read_from_file doesn't support that direction separator and as a result object name containes full path 
 | ||||
|                         obj->name = fs::path(obj->input_file).filename().string(); | ||||
|             } | ||||
|         } catch (const ConfigurationError &e) { | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 YuSanka
						YuSanka