mirror of
				https://github.com/SoftFever/OrcaSlicer.git
				synced 2025-10-31 20:51:12 -06:00 
			
		
		
		
	Pimping up SpiralVase code, fix of 03b6048684
				
					
				
			This commit is contained in:
		
							parent
							
								
									03b6048684
								
							
						
					
					
						commit
						dc4b783e9e
					
				
					 3 changed files with 7 additions and 7 deletions
				
			
		|  | @ -1099,7 +1099,6 @@ void GCode::_do_export(Print& print, GCodeOutputStream &file, ThumbnailsGenerato | |||
|     m_volumetric_speed = DoExport::autospeed_volumetric_limit(print); | ||||
|     print.throw_if_canceled(); | ||||
| 
 | ||||
|     m_cooling_buffer = make_unique<CoolingBuffer>(*this); | ||||
|     if (print.config().spiral_vase.value) | ||||
|         m_spiral_vase = make_unique<SpiralVase>(print.config()); | ||||
| #ifdef HAS_PRESSURE_EQUALIZER | ||||
|  | @ -1212,6 +1211,7 @@ void GCode::_do_export(Print& print, GCodeOutputStream &file, ThumbnailsGenerato | |||
|     } | ||||
|     print.throw_if_canceled(); | ||||
| 
 | ||||
|     m_cooling_buffer = make_unique<CoolingBuffer>(*this); | ||||
|     m_cooling_buffer->set_current_extruder(initial_extruder_id); | ||||
| 
 | ||||
|     // Emit machine envelope limits for the Marlin firmware.
 | ||||
|  |  | |||
|  | @ -54,7 +54,7 @@ std::string SpiralVase::process_layer(const std::string &gcode) | |||
|     // For absolute extruder distances it will be switched off.
 | ||||
|     // Tapering the absolute extruder distances requires to process every extrusion value after the first transition
 | ||||
|     // layer.
 | ||||
|     bool  transition = m_transition_layer && m_config->use_relative_e_distances.value; | ||||
|     bool  transition = m_transition_layer && m_config.use_relative_e_distances.value; | ||||
|     float layer_height_factor = layer_height / total_layer_length; | ||||
|     float len = 0.f; | ||||
|     m_reader.parse_buffer(gcode, [&new_gcode, &z, total_layer_length, layer_height_factor, transition, &len] | ||||
|  |  | |||
|  | @ -8,10 +8,10 @@ namespace Slic3r { | |||
| 
 | ||||
| class SpiralVase { | ||||
| public: | ||||
|     SpiralVase(const PrintConfig &config) : m_config(&config) | ||||
|     SpiralVase(const PrintConfig &config) : m_config(config) | ||||
|     { | ||||
|         m_reader.z() = (float)m_config->z_offset; | ||||
|         m_reader.apply_config(*m_config); | ||||
|         m_reader.z() = (float)m_config.z_offset; | ||||
|         m_reader.apply_config(m_config); | ||||
|     }; | ||||
| 
 | ||||
|     void 		enable(bool en) { | ||||
|  | @ -22,7 +22,7 @@ public: | |||
|     std::string process_layer(const std::string &gcode); | ||||
|      | ||||
| private: | ||||
|     const PrintConfig  *m_config; | ||||
|     const PrintConfig  &m_config; | ||||
|     GCodeReader 		m_reader; | ||||
| 
 | ||||
|     bool 				m_enabled = false; | ||||
|  | @ -32,4 +32,4 @@ private: | |||
| 
 | ||||
| } | ||||
| 
 | ||||
| #endif | ||||
| #endif // slic3r_SpiralVase_hpp_
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Vojtech Bubnik
						Vojtech Bubnik