GCodeProcessor::MoveVertex -> added placeholder for time
This commit is contained in:
parent
a77461b467
commit
1cb0f044db
@ -591,6 +591,7 @@ void GCodeProcessor::store_move_vertex(EMoveType type)
|
||||
vertex.fan_speed = m_fan_speed;
|
||||
vertex.extruder_id = m_extruder_id;
|
||||
vertex.cp_color_id = m_cp_color.current;
|
||||
vertex.time = static_cast<float>(m_result.moves.size());
|
||||
m_result.moves.emplace_back(vertex);
|
||||
}
|
||||
|
||||
|
@ -82,6 +82,7 @@ namespace Slic3r {
|
||||
float height{ 0.0f }; // mm
|
||||
float mm3_per_mm{ 0.0f };
|
||||
float fan_speed{ 0.0f }; // percentage
|
||||
float time{ 0.0f }; // s
|
||||
|
||||
float volumetric_rate() const { return feedrate * mm3_per_mm; }
|
||||
|
||||
|
@ -346,6 +346,7 @@ void GCodeViewer::load_toolpaths(const GCodeProcessor::Result& gcode_result)
|
||||
{
|
||||
#if ENABLE_GCODE_VIEWER_STATISTICS
|
||||
auto start_time = std::chrono::high_resolution_clock::now();
|
||||
m_statistics.results_size = gcode_result.moves.size() * sizeof(GCodeProcessor::MoveVertex);
|
||||
#endif // ENABLE_GCODE_VIEWER_STATISTICS
|
||||
|
||||
// vertex data
|
||||
@ -1022,6 +1023,12 @@ void GCodeViewer::render_statistics() const
|
||||
|
||||
ImGui::Separator();
|
||||
|
||||
ImGui::PushStyleColor(ImGuiCol_Text, ORANGE);
|
||||
imgui.text(std::string("Results:"));
|
||||
ImGui::PopStyleColor();
|
||||
ImGui::SameLine(offset);
|
||||
imgui.text(std::to_string(m_statistics.results_size) + " bytes");
|
||||
|
||||
ImGui::PushStyleColor(ImGuiCol_Text, ORANGE);
|
||||
imgui.text(std::string("Vertices:"));
|
||||
ImGui::PopStyleColor();
|
||||
|
@ -139,6 +139,7 @@ class GCodeViewer
|
||||
long long refresh_time{ 0 };
|
||||
long long gl_points_calls_count{ 0 };
|
||||
long long gl_line_strip_calls_count{ 0 };
|
||||
long long results_size{ 0 };
|
||||
long long vertices_size{ 0 };
|
||||
long long indices_size{ 0 };
|
||||
|
||||
@ -159,6 +160,7 @@ class GCodeViewer
|
||||
}
|
||||
|
||||
void reset_sizes() {
|
||||
results_size = 0;
|
||||
vertices_size = 0;
|
||||
indices_size = 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user