mirror of
				https://github.com/SoftFever/OrcaSlicer.git
				synced 2025-10-31 12:41:20 -06:00 
			
		
		
		
	Code cleanup
This commit is contained in:
		
							parent
							
								
									e443fe49ad
								
							
						
					
					
						commit
						dc781535b2
					
				
					 3 changed files with 3 additions and 79 deletions
				
			
		|  | @ -108,13 +108,12 @@ | |||
| #define ENABLE_VOLUMETRIC_EXTRUSION_PROCESSING (1 && ENABLE_2_3_0_RC1) | ||||
| 
 | ||||
| 
 | ||||
| //@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
 | ||||
| //=======
 | ||||
| // 2.3.1 
 | ||||
| //=======
 | ||||
| #define ENABLE_2_3_1 1 | ||||
| 
 | ||||
| #define ENABLE_SPLITTED_VERTEX_BUFFER (1 && ENABLE_2_3_1) | ||||
| //@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
 | ||||
| 
 | ||||
| 
 | ||||
| #endif // _prusaslicer_technologies_h_
 | ||||
|  |  | |||
|  | @ -79,7 +79,6 @@ static float round_to_nearest(float value, unsigned int decimals) | |||
|     return res; | ||||
| } | ||||
| 
 | ||||
| //@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
 | ||||
| #if ENABLE_SPLITTED_VERTEX_BUFFER | ||||
| void GCodeViewer::VBuffer::reset() | ||||
| { | ||||
|  | @ -92,7 +91,6 @@ void GCodeViewer::VBuffer::reset() | |||
|     count = 0; | ||||
| } | ||||
| #else | ||||
| //@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
 | ||||
| void GCodeViewer::VBuffer::reset() | ||||
| { | ||||
|     // release gpu memory
 | ||||
|  | @ -103,14 +101,10 @@ void GCodeViewer::VBuffer::reset() | |||
| 
 | ||||
|     count = 0; | ||||
| } | ||||
| //@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
 | ||||
| #endif // ENABLE_SPLITTED_VERTEX_BUFFER
 | ||||
| //@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
 | ||||
| 
 | ||||
| void GCodeViewer::IBuffer::reset() | ||||
| { | ||||
|     // release gpu memory
 | ||||
| //@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
 | ||||
| #if ENABLE_SPLITTED_VERTEX_BUFFER | ||||
|     // release gpu memory
 | ||||
|     if (ibo > 0) { | ||||
|  | @ -118,20 +112,16 @@ void GCodeViewer::IBuffer::reset() | |||
|         ibo = 0; | ||||
|     } | ||||
| #else | ||||
| //@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
 | ||||
|     // release gpu memory
 | ||||
|     if (id > 0) { | ||||
|         glsafe(::glDeleteBuffers(1, &id)); | ||||
|         id = 0; | ||||
|     } | ||||
| //@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
 | ||||
| #endif // ENABLE_SPLITTED_VERTEX_BUFFER
 | ||||
| //@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
 | ||||
| 
 | ||||
| //@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
 | ||||
| #if ENABLE_SPLITTED_VERTEX_BUFFER | ||||
|     vbo = 0; | ||||
| #endif // ENABLE_SPLITTED_VERTEX_BUFFER
 | ||||
| //@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
 | ||||
|     count = 0; | ||||
| } | ||||
| 
 | ||||
|  | @ -153,7 +143,6 @@ bool GCodeViewer::Path::matches(const GCodeProcessor::MoveVertex& move) const | |||
|     case EMoveType::Unretract: | ||||
|     case EMoveType::Extrude: { | ||||
|         // use rounding to reduce the number of generated paths
 | ||||
| //@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
 | ||||
| #if ENABLE_SPLITTED_VERTEX_BUFFER | ||||
| #if ENABLE_TOOLPATHS_WIDTH_HEIGHT_FROM_GCODE | ||||
|         return type == move.type && extruder_id == move.extruder_id && cp_color_id == move.cp_color_id && role == move.extrusion_role && | ||||
|  | @ -167,7 +156,6 @@ bool GCodeViewer::Path::matches(const GCodeProcessor::MoveVertex& move) const | |||
|             cp_color_id == move.cp_color_id; | ||||
| #endif // ENABLE_TOOLPATHS_WIDTH_HEIGHT_FROM_GCODE
 | ||||
| #else | ||||
| //@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
 | ||||
| #if ENABLE_TOOLPATHS_WIDTH_HEIGHT_FROM_GCODE | ||||
|         return type == move.type && extruder_id == move.extruder_id && cp_color_id == move.cp_color_id && role == move.extrusion_role && | ||||
|             move.position[2] <= first.position[2] && feedrate == move.feedrate && fan_speed == move.fan_speed && | ||||
|  | @ -179,9 +167,7 @@ bool GCodeViewer::Path::matches(const GCodeProcessor::MoveVertex& move) const | |||
|             volumetric_rate == round_to_nearest(move.volumetric_rate(), 2) && extruder_id == move.extruder_id && | ||||
|             cp_color_id == move.cp_color_id; | ||||
| #endif // ENABLE_TOOLPATHS_WIDTH_HEIGHT_FROM_GCODE
 | ||||
| //@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
 | ||||
| #endif // ENABLE_SPLITTED_VERTEX_BUFFER
 | ||||
| //@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
 | ||||
|     } | ||||
|     case EMoveType::Travel: { | ||||
|         return type == move.type && feedrate == move.feedrate && extruder_id == move.extruder_id && cp_color_id == move.cp_color_id; | ||||
|  | @ -208,7 +194,6 @@ void GCodeViewer::TBuffer::add_path(const GCodeProcessor::MoveVertex& move, unsi | |||
| { | ||||
|     Path::Endpoint endpoint = { b_id, i_id, s_id, move.position }; | ||||
|     // use rounding to reduce the number of generated paths
 | ||||
| //@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
 | ||||
| #if ENABLE_SPLITTED_VERTEX_BUFFER | ||||
| #if ENABLE_TOOLPATHS_WIDTH_HEIGHT_FROM_GCODE | ||||
|     paths.push_back({ move.type, move.extrusion_role, move.delta_extruder, | ||||
|  | @ -220,7 +205,6 @@ void GCodeViewer::TBuffer::add_path(const GCodeProcessor::MoveVertex& move, unsi | |||
|         round_to_nearest(move.volumetric_rate(), 2), move.extruder_id, move.cp_color_id, { { endpoint, endpoint } } }); | ||||
| #endif // ENABLE_TOOLPATHS_WIDTH_HEIGHT_FROM_GCODE
 | ||||
| #else | ||||
| //@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
 | ||||
| #if ENABLE_TOOLPATHS_WIDTH_HEIGHT_FROM_GCODE | ||||
|     paths.push_back({ move.type, move.extrusion_role, endpoint, endpoint, move.delta_extruder, | ||||
|         round_to_nearest(move.height, 2), round_to_nearest(move.width, 2), move.feedrate, move.fan_speed, | ||||
|  | @ -230,9 +214,7 @@ void GCodeViewer::TBuffer::add_path(const GCodeProcessor::MoveVertex& move, unsi | |||
|         round_to_nearest(move.height, 2), round_to_nearest(move.width, 2), move.feedrate, move.fan_speed, | ||||
|         round_to_nearest(move.volumetric_rate(), 2), move.extruder_id, move.cp_color_id }); | ||||
| #endif // ENABLE_TOOLPATHS_WIDTH_HEIGHT_FROM_GCODE
 | ||||
| //@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
 | ||||
| #endif // ENABLE_SPLITTED_VERTEX_BUFFER
 | ||||
| //@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
 | ||||
| } | ||||
| 
 | ||||
| GCodeViewer::Color GCodeViewer::Extrusions::Range::get_color_at(float value) const | ||||
|  | @ -657,15 +639,11 @@ void GCodeViewer::update_sequential_view_current(unsigned int first, unsigned in | |||
|         for (const TBuffer& buffer : m_buffers) { | ||||
|             if (buffer.visible) { | ||||
|                 for (const Path& path : buffer.paths) { | ||||
| //@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
 | ||||
| #if ENABLE_SPLITTED_VERTEX_BUFFER | ||||
|                     if (path.sub_paths.front().first.s_id <= id && id <= path.sub_paths.back().last.s_id) | ||||
| #else | ||||
| //@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
 | ||||
|                     if (path.first.s_id <= id && id <= path.last.s_id) | ||||
| //@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
 | ||||
| #endif // ENABLE_SPLITTED_VERTEX_BUFFER
 | ||||
| //@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
 | ||||
|                     return true; | ||||
|                 } | ||||
|             } | ||||
|  | @ -769,9 +747,7 @@ void GCodeViewer::set_layers_z_range(const std::array<unsigned int, 2>& layers_z | |||
| 
 | ||||
| void GCodeViewer::export_toolpaths_to_obj(const char* filename) const | ||||
| { | ||||
| //@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
 | ||||
| #if !ENABLE_SPLITTED_VERTEX_BUFFER | ||||
| //@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
 | ||||
| 
 | ||||
|     if (filename == nullptr) | ||||
|         return; | ||||
|  | @ -1068,12 +1044,9 @@ void GCodeViewer::export_toolpaths_to_obj(const char* filename) const | |||
| 
 | ||||
|     fclose(fp); | ||||
| 
 | ||||
| //@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
 | ||||
| #endif // !ENABLE_SPLITTED_VERTEX_BUFFER
 | ||||
| //@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
 | ||||
| } | ||||
| 
 | ||||
| //@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
 | ||||
| #if ENABLE_SPLITTED_VERTEX_BUFFER | ||||
| void GCodeViewer::load_toolpaths(const GCodeProcessor::Result& gcode_result) | ||||
| { | ||||
|  | @ -1777,7 +1750,6 @@ void GCodeViewer::load_toolpaths(const GCodeProcessor::Result& gcode_result) | |||
|         progress_dialog->Destroy(); | ||||
| } | ||||
| #else | ||||
| //@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
 | ||||
| void GCodeViewer::load_toolpaths(const GCodeProcessor::Result& gcode_result) | ||||
| { | ||||
| #if ENABLE_GCODE_VIEWER_STATISTICS | ||||
|  | @ -2437,9 +2409,7 @@ void GCodeViewer::load_toolpaths(const GCodeProcessor::Result& gcode_result) | |||
|     if (progress_dialog != nullptr) | ||||
|         progress_dialog->Destroy(); | ||||
| } | ||||
| //@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
 | ||||
| #endif // ENABLE_SPLITTED_VERTEX_BUFFER
 | ||||
| //@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
 | ||||
| 
 | ||||
| void GCodeViewer::load_shells(const Print& print, bool initialized) | ||||
| { | ||||
|  | @ -2499,7 +2469,6 @@ void GCodeViewer::load_shells(const Print& print, bool initialized) | |||
|     } | ||||
| } | ||||
| 
 | ||||
| //@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
 | ||||
| #if ENABLE_SPLITTED_VERTEX_BUFFER | ||||
| void GCodeViewer::refresh_render_paths(bool keep_sequential_current_first, bool keep_sequential_current_last) const | ||||
| { | ||||
|  | @ -2766,7 +2735,6 @@ void GCodeViewer::refresh_render_paths(bool keep_sequential_current_first, bool | |||
| #endif // ENABLE_GCODE_VIEWER_STATISTICS
 | ||||
| } | ||||
| #else | ||||
| //@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
 | ||||
| void GCodeViewer::refresh_render_paths(bool keep_sequential_current_first, bool keep_sequential_current_last) const | ||||
| { | ||||
| #if ENABLE_GCODE_VIEWER_STATISTICS | ||||
|  | @ -3014,11 +2982,8 @@ void GCodeViewer::refresh_render_paths(bool keep_sequential_current_first, bool | |||
|     m_statistics.refresh_paths_time = std::chrono::duration_cast<std::chrono::milliseconds>(std::chrono::high_resolution_clock::now() - start_time).count(); | ||||
| #endif // ENABLE_GCODE_VIEWER_STATISTICS
 | ||||
| } | ||||
| //@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
 | ||||
| #endif // ENABLE_SPLITTED_VERTEX_BUFFER
 | ||||
| //@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
 | ||||
| 
 | ||||
| //@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
 | ||||
| #if ENABLE_SPLITTED_VERTEX_BUFFER | ||||
| void GCodeViewer::render_toolpaths() const | ||||
| { | ||||
|  | @ -3166,7 +3131,6 @@ void GCodeViewer::render_toolpaths() const | |||
|     } | ||||
| } | ||||
| #else | ||||
| //@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
 | ||||
| void GCodeViewer::render_toolpaths() const | ||||
| { | ||||
| #if ENABLE_FIXED_SCREEN_SIZE_POINT_MARKERS | ||||
|  | @ -3313,9 +3277,7 @@ void GCodeViewer::render_toolpaths() const | |||
|         } | ||||
|     } | ||||
| } | ||||
| //@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
 | ||||
| #endif // ENABLE_SPLITTED_VERTEX_BUFFER
 | ||||
| //@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
 | ||||
| 
 | ||||
| void GCodeViewer::render_shells() const | ||||
| { | ||||
|  | @ -4140,19 +4102,15 @@ void GCodeViewer::log_memory_used(const std::string& label, int64_t additional) | |||
|         } | ||||
|         int64_t layers_size = SLIC3R_STDVEC_MEMSIZE(m_layers.get_zs(), double); | ||||
|         layers_size += SLIC3R_STDVEC_MEMSIZE(m_layers.get_endpoints(), Layers::Endpoints); | ||||
| //@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
 | ||||
| #if ENABLE_SPLITTED_VERTEX_BUFFER | ||||
|         BOOST_LOG_TRIVIAL(trace) << label | ||||
|             << "(" << format_memsize_MB(additional + paths_size + render_paths_size + layers_size) << ");" | ||||
|             << log_memory_info(); | ||||
| #else | ||||
| //@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
 | ||||
|         BOOST_LOG_TRIVIAL(trace) << label | ||||
|             << format_memsize_MB(additional + paths_size + render_paths_size + layers_size) | ||||
|             << log_memory_info(); | ||||
| //@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
 | ||||
| #endif // ENABLE_SPLITTED_VERTEX_BUFFER
 | ||||
| //@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
 | ||||
|     } | ||||
| } | ||||
| 
 | ||||
|  |  | |||
|  | @ -21,11 +21,9 @@ class GCodeViewer | |||
| { | ||||
|     using Color = std::array<float, 3>; | ||||
|     using VertexBuffer = std::vector<float>; | ||||
| //@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
 | ||||
| #if ENABLE_SPLITTED_VERTEX_BUFFER | ||||
|     using MultiVertexBuffer = std::vector<VertexBuffer>; | ||||
| #endif // ENABLE_SPLITTED_VERTEX_BUFFER
 | ||||
| //@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
 | ||||
|     using IndexBuffer = std::vector<unsigned int>; | ||||
|     using MultiIndexBuffer = std::vector<IndexBuffer>; | ||||
| 
 | ||||
|  | @ -59,17 +57,13 @@ class GCodeViewer | |||
|         }; | ||||
| 
 | ||||
|         EFormat format{ EFormat::Position }; | ||||
| //@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
 | ||||
| #if ENABLE_SPLITTED_VERTEX_BUFFER | ||||
|         // vbos id
 | ||||
|         std::vector<unsigned int> ids; | ||||
| #else | ||||
| //@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
 | ||||
|         // vbo id
 | ||||
|         unsigned int id{ 0 }; | ||||
| //@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
 | ||||
| #endif // ENABLE_SPLITTED_VERTEX_BUFFER
 | ||||
| //@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
 | ||||
|         // count of vertices, updated after data are sent to gpu
 | ||||
|         size_t count{ 0 }; | ||||
| 
 | ||||
|  | @ -118,19 +112,15 @@ class GCodeViewer | |||
|     // ibo buffer containing indices data (for lines/triangles) used to render a specific toolpath type
 | ||||
|     struct IBuffer | ||||
|     { | ||||
| //@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
 | ||||
| #if ENABLE_SPLITTED_VERTEX_BUFFER | ||||
|         // id of the associated vertex buffer
 | ||||
|         unsigned int vbo{ 0 }; | ||||
|         // ibo id
 | ||||
|         unsigned int ibo{ 0 }; | ||||
| #else | ||||
| //@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
 | ||||
|         // ibo id
 | ||||
|         unsigned int id{ 0 }; | ||||
| //@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
 | ||||
| #endif // ENABLE_SPLITTED_VERTEX_BUFFER
 | ||||
| //@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
 | ||||
|         // count of indices, updated after data are sent to gpu
 | ||||
|         size_t count{ 0 }; | ||||
| 
 | ||||
|  | @ -151,7 +141,6 @@ class GCodeViewer | |||
|             Vec3f position{ Vec3f::Zero() }; | ||||
|         }; | ||||
| 
 | ||||
| //@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
 | ||||
| #if ENABLE_SPLITTED_VERTEX_BUFFER | ||||
|         struct Sub_Path | ||||
|         { | ||||
|  | @ -163,18 +152,13 @@ class GCodeViewer | |||
|             } | ||||
|         }; | ||||
| #endif // ENABLE_SPLITTED_VERTEX_BUFFER
 | ||||
| //@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
 | ||||
| 
 | ||||
|         EMoveType type{ EMoveType::Noop }; | ||||
|         ExtrusionRole role{ erNone }; | ||||
| //@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
 | ||||
| #if !ENABLE_SPLITTED_VERTEX_BUFFER | ||||
| //@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
 | ||||
|         Endpoint first; | ||||
|         Endpoint last; | ||||
| //@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
 | ||||
| #endif // !ENABLE_SPLITTED_VERTEX_BUFFER
 | ||||
| //@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
 | ||||
|         float delta_extruder{ 0.0f }; | ||||
|         float height{ 0.0f }; | ||||
|         float width{ 0.0f }; | ||||
|  | @ -183,14 +167,11 @@ class GCodeViewer | |||
|         float volumetric_rate{ 0.0f }; | ||||
|         unsigned char extruder_id{ 0 }; | ||||
|         unsigned char cp_color_id{ 0 }; | ||||
| //@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
 | ||||
| #if ENABLE_SPLITTED_VERTEX_BUFFER | ||||
|         std::vector<Sub_Path> sub_paths; | ||||
| #endif // ENABLE_SPLITTED_VERTEX_BUFFER
 | ||||
| //@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
 | ||||
| 
 | ||||
|         bool matches(const GCodeProcessor::MoveVertex& move) const; | ||||
| //@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
 | ||||
| #if ENABLE_SPLITTED_VERTEX_BUFFER | ||||
|         size_t vertices_count() const { | ||||
|             return sub_paths.empty() ? 0 : sub_paths.back().last.s_id - sub_paths.front().first.s_id + 1; | ||||
|  | @ -214,12 +195,9 @@ class GCodeViewer | |||
|             sub_paths.push_back({ endpoint , endpoint }); | ||||
|         } | ||||
| #else | ||||
| //@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
 | ||||
|         size_t vertices_count() const { return last.s_id - first.s_id + 1; } | ||||
|         bool contains(size_t id) const { return first.s_id <= id && id <= last.s_id; } | ||||
| //@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
 | ||||
| #endif // ENABLE_SPLITTED_VERTEX_BUFFER
 | ||||
| //@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
 | ||||
|     }; | ||||
| 
 | ||||
|     // Used to batch the indices needed to render the paths
 | ||||
|  | @ -284,7 +262,6 @@ class GCodeViewer | |||
|         // s_id index of first vertex contained in this->vertices
 | ||||
|         void add_path(const GCodeProcessor::MoveVertex& move, unsigned int b_id, size_t i_id, size_t s_id); | ||||
| 
 | ||||
| //@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
 | ||||
| #if ENABLE_SPLITTED_VERTEX_BUFFER | ||||
|         unsigned int max_vertices_per_segment() const { | ||||
|             switch (render_primitive_type) | ||||
|  | @ -299,7 +276,6 @@ class GCodeViewer | |||
|         size_t max_vertices_per_segment_size_floats() const { return vertices.vertex_size_floats() * static_cast<size_t>(max_vertices_per_segment()); } | ||||
|         size_t max_vertices_per_segment_size_bytes() const { return max_vertices_per_segment_size_floats() * sizeof(float); } | ||||
| #endif // ENABLE_SPLITTED_VERTEX_BUFFER
 | ||||
| //@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
 | ||||
|         unsigned int indices_per_segment() const { | ||||
|             switch (render_primitive_type) | ||||
|             { | ||||
|  | @ -309,11 +285,9 @@ class GCodeViewer | |||
|             default:                             { return 0; } | ||||
|             } | ||||
|         } | ||||
| //@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
 | ||||
| #if ENABLE_SPLITTED_VERTEX_BUFFER | ||||
|         size_t indices_per_segment_size_bytes() const { return static_cast<size_t>(indices_per_segment() * sizeof(unsigned int)); } | ||||
| #endif // ENABLE_SPLITTED_VERTEX_BUFFER
 | ||||
| //@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
 | ||||
|         unsigned int start_segment_vertex_offset() const { return 0; } | ||||
|         unsigned int end_segment_vertex_offset() const { | ||||
|             switch (render_primitive_type) | ||||
|  | @ -325,17 +299,13 @@ class GCodeViewer | |||
|             } | ||||
|         } | ||||
| 
 | ||||
| //@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
 | ||||
| #if ENABLE_SPLITTED_VERTEX_BUFFER | ||||
|         bool has_data() const { | ||||
|             return !vertices.ids.empty() && vertices.ids.front() != 0 && !indices.empty() && indices.front().ibo != 0; | ||||
|         } | ||||
| #else | ||||
| //@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
 | ||||
|         bool has_data() const { return vertices.id != 0 && !indices.empty() && indices.front().id != 0; } | ||||
| //@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
 | ||||
| #endif // ENABLE_SPLITTED_VERTEX_BUFFER
 | ||||
| //@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
 | ||||
|     }; | ||||
| 
 | ||||
|     // helper to render shells
 | ||||
|  | @ -410,13 +380,12 @@ class GCodeViewer | |||
|         { | ||||
|             size_t first{ 0 }; | ||||
|             size_t last{ 0 }; | ||||
| //@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
 | ||||
| 
 | ||||
| #if ENABLE_SPLITTED_VERTEX_BUFFER | ||||
|             bool operator == (const Endpoints& other) const { | ||||
|                 return first == other.first && last == other.last; | ||||
|             } | ||||
| #endif // ENABLE_SPLITTED_VERTEX_BUFFER
 | ||||
| //@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
 | ||||
|         }; | ||||
| 
 | ||||
|     private: | ||||
|  | @ -442,7 +411,6 @@ class GCodeViewer | |||
|         double get_z_at(unsigned int id) const { return (id < m_zs.size()) ? m_zs[id] : 0.0; } | ||||
|         Endpoints get_endpoints_at(unsigned int id) const { return (id < m_endpoints.size()) ? m_endpoints[id] : Endpoints(); } | ||||
| 
 | ||||
| //@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
 | ||||
| #if ENABLE_SPLITTED_VERTEX_BUFFER | ||||
|         bool operator != (const Layers& other) const { | ||||
|             if (m_zs != other.m_zs) | ||||
|  | @ -453,7 +421,6 @@ class GCodeViewer | |||
|             return false; | ||||
|         } | ||||
| #endif // ENABLE_SPLITTED_VERTEX_BUFFER
 | ||||
| //@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
 | ||||
|     }; | ||||
| 
 | ||||
| #if ENABLE_GCODE_VIEWER_STATISTICS | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 enricoturri1966
						enricoturri1966