extract_metadata: attempt to parse object height from PrusaSlicer comments
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
This commit is contained in:
parent
756492f349
commit
8440a10b9e
|
@ -136,6 +136,15 @@ class PrusaSlicer(BaseSlicer):
|
||||||
r"; layer_height = (\d+\.?\d*)", self.footer_data)
|
r"; layer_height = (\d+\.?\d*)", self.footer_data)
|
||||||
|
|
||||||
def parse_object_height(self):
|
def parse_object_height(self):
|
||||||
|
matches = re.findall(
|
||||||
|
r";BEFORE_LAYER_CHANGE\n(?:.*\n)?;(\d+\.?\d*)", self.footer_data)
|
||||||
|
if matches:
|
||||||
|
try:
|
||||||
|
matches = [float(m) for m in matches]
|
||||||
|
except Exception:
|
||||||
|
pass
|
||||||
|
else:
|
||||||
|
return max(matches)
|
||||||
return self._parse_max_float(r"G1\sZ\d+\.\d*\sF", self.footer_data)
|
return self._parse_max_float(r"G1\sZ\d+\.\d*\sF", self.footer_data)
|
||||||
|
|
||||||
def parse_filament_total(self):
|
def parse_filament_total(self):
|
||||||
|
|
Loading…
Reference in New Issue