diff --git a/lib/Slic3r/Print/GCode.pm b/lib/Slic3r/Print/GCode.pm index 45d529e4b..0d490d003 100644 --- a/lib/Slic3r/Print/GCode.pm +++ b/lib/Slic3r/Print/GCode.pm @@ -326,7 +326,7 @@ sub export { foreach my $extruder (@{$gcodegen->writer->extruders}) { my $used_filament = $extruder->used_filament; my $extruded_volume = $extruder->extruded_volume; - my $filament_weight = $extruded_volume * $extruder->filament_density; + my $filament_weight = $extruded_volume * $extruder->filament_density / 1000; my $filament_cost = $filament_weight * ($extruder->filament_cost / 1000); $self->print->set_filament_stats($extruder->id, $used_filament); diff --git a/xs/src/libslic3r/PrintConfig.cpp b/xs/src/libslic3r/PrintConfig.cpp index 336fff382..a478496ca 100644 --- a/xs/src/libslic3r/PrintConfig.cpp +++ b/xs/src/libslic3r/PrintConfig.cpp @@ -338,8 +338,8 @@ PrintConfigDef::PrintConfigDef() def = this->add("filament_density", coFloats); def->label = "Density"; - def->tooltip = "Enter your filament density here. This is only for statistical information. A decent way is to weigh a known length of filament and compute the ratio of the length to volume."; - def->sidetext = "g/mm^3"; + def->tooltip = "Enter your filament density here. This is only for statistical information. A decent way is to weigh a known length of filament and compute the ratio of the length to volume. Better is to calculate the volume directly through displacement."; + def->sidetext = "g/cm^3"; def->cli = "filament-density=f@"; def->min = 0; {