metadata: adds chamber temp support

Signed-off-by: Pedro Lamas <pedrolamas@gmail.com>
This commit is contained in:
Pedro Lamas 2022-08-08 09:34:44 +01:00 committed by Eric Callahan
parent a9345d19fa
commit 8bbd269084
1 changed files with 28 additions and 0 deletions

View File

@ -195,6 +195,9 @@ class BaseSlicer(object):
def parse_first_layer_bed_temp(self) -> Optional[float]:
return None
def parse_chamber_temp(self) -> Optional[float]:
return None
def parse_first_layer_extr_temp(self) -> Optional[float]:
return None
@ -292,6 +295,10 @@ class UnknownSlicer(BaseSlicer):
return _regex_find_first(
r"M190 S(\d+\.?\d*)", self.header_data)
def parse_chamber_temp(self) -> Optional[float]:
return _regex_find_first(
r"M191 S(\d+\.?\d*)", self.header_data)
def parse_thumbnails(self) -> Optional[List[Dict[str, Any]]]:
return None
@ -387,6 +394,10 @@ class PrusaSlicer(BaseSlicer):
return _regex_find_first(
r"; first_layer_bed_temperature = (\d+\.?\d*)", self.footer_data)
def parse_chamber_temp(self) -> Optional[float]:
return _regex_find_first(
r"; chamber_temperature = (\d+\.?\d*)", self.footer_data)
def parse_nozzle_diameter(self) -> Optional[float]:
return _regex_find_first(
r";\snozzle_diameter\s=\s(\d+\.\d*)", self.footer_data)
@ -491,6 +502,10 @@ class Cura(BaseSlicer):
return _regex_find_first(
r"M190 S(\d+\.?\d*)", self.header_data)
def parse_chamber_temp(self) -> Optional[float]:
return _regex_find_first(
r"M191 S(\d+\.?\d*)", self.header_data)
def parse_layer_count(self) -> Optional[int]:
return _regex_find_int(
r";LAYER_COUNT\:(\d+)", self.header_data)
@ -662,6 +677,10 @@ class KISSlicer(BaseSlicer):
return _regex_find_first(
r"; bed_C = (\d+\.?\d*)", self.header_data)
def parse_chamber_temp(self) -> Optional[float]:
return _regex_find_first(
r"; chamber_C = (\d+\.?\d*)", self.header_data)
class IdeaMaker(BaseSlicer):
def check_identity(self, data: str) -> Optional[Dict[str, str]]:
@ -741,6 +760,10 @@ class IdeaMaker(BaseSlicer):
return _regex_find_first(
r"M190 S(\d+\.?\d*)", self.header_data)
def parse_chamber_temp(self) -> Optional[float]:
return _regex_find_first(
r"M191 S(\d+\.?\d*)", self.header_data)
def parse_nozzle_diameter(self) -> Optional[float]:
return _regex_find_first(
r";Dimension:(?:\s\d+\.\d+){3}\s(\d+\.\d+)", self.header_data)
@ -779,6 +802,10 @@ class IceSL(BaseSlicer):
return _regex_find_first(
r";\sbed_temp_degree_c\s:\s+(\d+\.?\d*)", self.header_data)
def parse_chamber_temp(self) -> Optional[float]:
return _regex_find_first(
r";\schamber_temp_degree_c\s:\s+(\d+\.?\d*)", self.header_data)
def parse_filament_total(self) -> Optional[float]:
return _regex_find_first(
r";\sfilament_used_mm\s:\s+(\d+\.\d+)", self.header_data)
@ -885,6 +912,7 @@ SUPPORTED_DATA = [
'first_layer_height',
'first_layer_extr_temp',
'first_layer_bed_temp',
'chamber_temp',
'filament_name',
'filament_type',
'filament_total',