mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-07-20 09:22:13 +00:00
Line Type preview: Display distances and amount values (#13681)
* feat(viewer): Display travel distance and move count in G-code summary This commit introduces a new feature that enhances the G-code viewer by displaying the total travel distance and the total number of travel moves in the 'Line Type' summary. This provides users with more detailed statistics about their prints, helping them to better understand the printer's behavior and identify opportunities to optimize travel moves for faster print times. This commit also fixes a critical bug in the G-code processor where the travel distance was being calculated incorrectly. The distance variable was not being updated for non-extruding travel moves, leading to inaccurate statistics. The calculation has been corrected to ensure it is performed for all relevant move types, resulting in accurate travel distance reporting. * Subfix segments kilo mega giga tera peta exa * Add missing values * Grams to Kilos and tons * add distance * Fix tool view * Record and display seam distances Track seam-related distances in print statistics and show them in the GCode viewer. Added total_seam_gap_distance and total_seam_scarf_distance to PrintEstimatedStatistics (with initialization). In GCode::extrude_loop the code now computes seam gap and scarf distances and accumulates them for external perimeters. GCodeViewer uses the summed seam distance when the Seams option is selected in the legend. * Fix travel / wipe distances * Update GCode.cpp * Filament changes estimated time --------- Co-authored-by: Steve Scargall <37674041+sscargal@users.noreply.github.com>
This commit is contained in:
@@ -78,6 +78,13 @@ class Print;
|
||||
std::array<Mode, static_cast<size_t>(ETimeMode::Count)> modes;
|
||||
unsigned int total_filament_changes;
|
||||
unsigned int total_extruder_changes;
|
||||
float total_filament_load_time;
|
||||
float total_filament_unload_time;
|
||||
float total_tool_change_time;
|
||||
float total_travel_distance;
|
||||
unsigned int total_travel_moves;
|
||||
float total_seam_gap_distance;
|
||||
float total_seam_scarf_distance;
|
||||
|
||||
PrintEstimatedStatistics() { reset(); }
|
||||
|
||||
@@ -95,6 +102,13 @@ class Print;
|
||||
used_filaments_per_role.clear();
|
||||
total_filament_changes = 0;
|
||||
total_extruder_changes = 0;
|
||||
total_filament_load_time = 0.0f;
|
||||
total_filament_unload_time = 0.0f;
|
||||
total_tool_change_time = 0.0f;
|
||||
total_travel_distance = 0.0f;
|
||||
total_travel_moves = 0;
|
||||
total_seam_gap_distance = 0.0f;
|
||||
total_seam_scarf_distance = 0.0f;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user