mirror of
				https://github.com/SoftFever/OrcaSlicer.git
				synced 2025-10-31 04:31:15 -06:00 
			
		
		
		
	#6117 - Allow import of gcode files processed by ArcWelder
This commit is contained in:
		
							parent
							
								
									dfae147a15
								
							
						
					
					
						commit
						e44c1006d5
					
				
					 3 changed files with 4 additions and 4 deletions
				
			
		|  | @ -616,11 +616,11 @@ void ConfigBase::load(const boost::property_tree::ptree &tree) | |||
| } | ||||
| 
 | ||||
| // Load the config keys from the tail of a G-code file.
 | ||||
| void ConfigBase::load_from_gcode_file(const std::string &file) | ||||
| void ConfigBase::load_from_gcode_file(const std::string& file, bool check_header) | ||||
| { | ||||
|     // Read a 64k block from the end of the G-code.
 | ||||
| 	boost::nowide::ifstream ifs(file); | ||||
| 	{ | ||||
|     if (check_header) { | ||||
| 		const char slic3r_gcode_header[] = "; generated by Slic3r "; | ||||
|         const char prusaslicer_gcode_header[] = "; generated by PrusaSlicer "; | ||||
| 		std::string firstline; | ||||
|  |  | |||
|  | @ -1791,7 +1791,7 @@ public: | |||
|     void setenv_() const; | ||||
|     void load(const std::string &file); | ||||
|     void load_from_ini(const std::string &file); | ||||
|     void load_from_gcode_file(const std::string &file); | ||||
|     void load_from_gcode_file(const std::string& file, bool check_header = true); | ||||
|     // Returns number of key/value pairs extracted.
 | ||||
|     size_t load_from_gcode_string(const char* str); | ||||
|     void load(const boost::property_tree::ptree &tree); | ||||
|  |  | |||
|  | @ -970,7 +970,7 @@ void GCodeProcessor::process_file(const std::string& filename, bool apply_postpr | |||
|         if (m_producer == EProducer::PrusaSlicer || m_producer == EProducer::Slic3rPE || m_producer == EProducer::Slic3r) { | ||||
|             DynamicPrintConfig config; | ||||
|             config.apply(FullPrintConfig::defaults()); | ||||
|             config.load_from_gcode_file(filename); | ||||
|             config.load_from_gcode_file(filename, false); | ||||
|             apply_config(config); | ||||
|         } | ||||
|     } | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 enricoturri1966
						enricoturri1966