mirror of
				https://github.com/SoftFever/OrcaSlicer.git
				synced 2025-10-30 20:21:12 -06:00 
			
		
		
		
	Time estimation improvement
This commit is contained in:
		
							parent
							
								
									3f23bd5224
								
							
						
					
					
						commit
						2df069323c
					
				
					 4 changed files with 147 additions and 87 deletions
				
			
		|  | @ -16,8 +16,12 @@ namespace Slic3r { | |||
| 
 | ||||
| enum ePrintStatistics | ||||
| { | ||||
|     psObjectsUsedMaterial = 0, | ||||
|     psSupportUsedMaterial | ||||
|     psUsedMaterial = 0, | ||||
|     psNumFade, | ||||
|     psNumSlow, | ||||
|     psNumFast, | ||||
| 
 | ||||
|     psCnt | ||||
| }; | ||||
| 
 | ||||
| enum class FilePrinterFormat { | ||||
|  | @ -124,40 +128,45 @@ template<> class FilePrinter<FilePrinterFormat::SLA_PNGZIP> | |||
|     double m_layer_height = .0; | ||||
|     Raster::Origin m_o = Raster::Origin::TOP_LEFT; | ||||
| 
 | ||||
|     double m_objects_used_material = 0.0; | ||||
|     double m_support_used_material = 0.0; | ||||
|     double m_used_material = 0.0; | ||||
|     int    m_cnt_fade_layers = 0; | ||||
|     int    m_cnt_slow_layers = 0; | ||||
|     int    m_cnt_fast_layers = 0; | ||||
| 
 | ||||
|     std::string createIniContent(const std::string& projectname) { | ||||
|         double layer_height = m_layer_height; | ||||
| //         double layer_height = m_layer_height;
 | ||||
| 
 | ||||
|         using std::string; | ||||
|         using std::to_string; | ||||
| 
 | ||||
|         auto expt_str = to_string(m_exp_time_s); | ||||
|         auto expt_first_str = to_string(m_exp_time_first_s); | ||||
|         auto stepnum_str = to_string(static_cast<unsigned>(800*layer_height)); | ||||
|         auto layerh_str = to_string(layer_height); | ||||
| //         auto stepnum_str = to_string(static_cast<unsigned>(800*layer_height));
 | ||||
|         auto layerh_str = to_string(m_layer_height); | ||||
| 
 | ||||
|         const std::string objects_used_material = to_string(m_objects_used_material); | ||||
|         const std::string support_used_material = to_string(m_support_used_material); | ||||
|         const std::string cnt_fade_layers = to_string(m_cnt_fade_layers); | ||||
|         const std::string cnt_slow_layers = to_string(m_cnt_slow_layers); | ||||
|         const std::string cnt_fast_layers = to_string(m_cnt_fast_layers); | ||||
|         const std::string used_material   = to_string(m_used_material); | ||||
| 
 | ||||
|         return string( | ||||
|         "action = print\n" | ||||
|         "jobDir = ") + projectname + "\n" + | ||||
|         "expTime = " + expt_str + "\n" | ||||
|         "expTimeFirst = " + expt_first_str + "\n" | ||||
|         "stepNum = " + stepnum_str + "\n" | ||||
|         "wifiOn = 1\n" | ||||
|         "tiltSlow = 60\n" | ||||
|         "tiltFast = 15\n" | ||||
|         "numFade = 10\n" | ||||
|         "startdelay = 0\n" | ||||
| //         "stepNum = " + stepnum_str + "\n"
 | ||||
| //         "wifiOn = 1\n"
 | ||||
| //         "tiltSlow = 60\n"
 | ||||
| //         "tiltFast = 15\n"
 | ||||
|         "numFade = " + cnt_fade_layers + "\n" | ||||
| //         "startdelay = 0\n"
 | ||||
|         "layerHeight = " + layerh_str + "\n" | ||||
|         "noteInfo = " | ||||
|         "expTime="+expt_str+"+resinType=generic+layerHeight=" | ||||
|                   +layerh_str+"+printer=DWARF3\n" | ||||
|         "objUsedMaterial=" + objects_used_material + "\n" | ||||
|         "supUsedMaterial=" + support_used_material + "\n"; | ||||
|         "expTime = "+expt_str+" + resinType = generic+layerHeight = " | ||||
|                   +layerh_str+" + printer = DWARF3\n" | ||||
|         "usedMaterial = " + used_material + "\n" | ||||
|         "numSlow = " + cnt_slow_layers + "\n" | ||||
|         "numFast = " + cnt_fast_layers + "\n"; | ||||
|     } | ||||
| 
 | ||||
| public: | ||||
|  | @ -294,8 +303,13 @@ public: | |||
| 
 | ||||
|     void set_statistics(const std::vector<double> statistics) | ||||
|     { | ||||
|         m_objects_used_material = statistics[psObjectsUsedMaterial]; | ||||
|         m_support_used_material = statistics[psSupportUsedMaterial]; | ||||
|         if (statistics.size() != psCnt) | ||||
|             return; | ||||
| 
 | ||||
|         m_used_material   = statistics[psUsedMaterial]; | ||||
|         m_cnt_fade_layers = int(statistics[psNumFade]); | ||||
|         m_cnt_slow_layers = int(statistics[psNumSlow]); | ||||
|         m_cnt_fast_layers = int(statistics[psNumFast]); | ||||
|     } | ||||
| }; | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 YuSanka
						YuSanka