extract_metadata: add Cura filament weight parsing
Adds a simple implementation for parsing filament weight from Cura g-code with help of a custom start-g-code comment. Signed-off-by: Dominik Willner <th33xitus@gmail.com>
This commit is contained in:
parent
0d601073a6
commit
f203567381
|
@ -323,6 +323,10 @@ class Cura(PrusaSlicer):
|
||||||
filament *= 1000
|
filament *= 1000
|
||||||
return filament
|
return filament
|
||||||
|
|
||||||
|
def parse_filament_weight_total(self):
|
||||||
|
return _regex_find_first(
|
||||||
|
r";Filament\sweight\s=\s.(\d+\.\d+).", self.header_data)
|
||||||
|
|
||||||
def parse_estimated_time(self):
|
def parse_estimated_time(self):
|
||||||
return self._parse_max_float(r";TIME:.*", self.header_data)
|
return self._parse_max_float(r";TIME:.*", self.header_data)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue