mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-17 02:22:17 +00:00
ENH: seperate wipe tower weight from model
jira:STUDIO-4353 Signed-off-by: xun.zhang <xun.zhang@bambulab.com> Change-Id: Ia8a030314ab995c57a0990d08a966382f6f0eecc
This commit is contained in:
@@ -1002,6 +1002,21 @@ namespace DoExport {
|
||||
total_cost += weight * extruder->filament_cost() * 0.001;
|
||||
}
|
||||
|
||||
for (auto volume : result.print_statistics.wipe_tower_volumes_per_extruder) {
|
||||
total_extruded_volume += volume.second;
|
||||
|
||||
size_t extruder_id = volume.first;
|
||||
auto extruder = std::find_if(extruders.begin(), extruders.end(), [extruder_id](const Extruder& extr) {return extr.id() == extruder_id; });
|
||||
if (extruder == extruders.end())
|
||||
continue;
|
||||
|
||||
double s = PI * sqr(0.5* extruder->filament_diameter());
|
||||
double weight = volume.second * extruder->filament_density() * 0.001;
|
||||
total_used_filament += volume.second/s;
|
||||
total_weight += weight;
|
||||
total_cost += weight * extruder->filament_cost() * 0.001;
|
||||
}
|
||||
|
||||
print_statistics.total_extruded_volume = total_extruded_volume;
|
||||
print_statistics.total_used_filament = total_used_filament;
|
||||
print_statistics.total_weight = total_weight;
|
||||
|
||||
Reference in New Issue
Block a user