extract_metadata: parse filament_total and filament_total_weight for Slic3r

Signed-off-by:  Dominik Willner <th33xitus@gmail.com>
This commit is contained in:
th33xitus 2021-04-13 14:36:10 +02:00 committed by Eric Callahan
parent f203567381
commit 4d69a1f1c6
1 changed files with 11 additions and 0 deletions

View File

@ -282,6 +282,17 @@ class Slic3r(Slic3rPE):
}
return None
def parse_filament_total(self):
filament = _regex_find_first(
r";\sfilament\_length\_m\s=\s(\d+\.\d*)", self.footer_data)
if filament is not None:
filament *= 1000
return filament
def parse_filament_weight_total(self):
return _regex_find_first(
r";\sfilament\smass\_g\s=\s(\d+\.\d*)", self.footer_data)
def parse_estimated_time(self):
return None