metadata: support multiple filament lengths for prusaslicer
Signed-off-by: Aleksey Frolov <bakatrouble@gmail.com>
This commit is contained in:
@@ -357,9 +357,14 @@ class PrusaSlicer(BaseSlicer):
|
||||
return regex_find_max_float(r"G1\sZ(%F)\sF", self.footer_data)
|
||||
|
||||
def parse_filament_total(self) -> Optional[float]:
|
||||
return regex_find_float(
|
||||
r"filament\sused\s\[mm\]\s=\s(%F)", self.footer_data
|
||||
)
|
||||
line = regex_find_string(r'filament\sused\s\[mm\]\s=\s(%S)\n', self.footer_data)
|
||||
if line:
|
||||
filament = regex_find_floats(
|
||||
r"(%F)", line
|
||||
)
|
||||
if filament:
|
||||
return sum(filament)
|
||||
return None
|
||||
|
||||
def parse_filament_weight_total(self) -> Optional[float]:
|
||||
return regex_find_float(
|
||||
|
Reference in New Issue
Block a user