metadata : fix extract to work with Ideamaker

Correction of the regex (Replacing the = with one: and adding the filament index for the regex to work).

Signed-off-by: Emmanuel WALDNER emmanuel.waldner@gmail.com
This commit is contained in:
WALDNER Emmanuel 2023-11-07 22:12:58 +01:00 committed by GitHub
parent d9c16380a4
commit 975011d190
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 4 deletions

View File

@ -777,12 +777,16 @@ class IdeaMaker(BaseSlicer):
return None
def parse_filament_type(self) -> Optional[str]:
return _regex_find_string(
r";Filament\stype\s=\s(.*)", self.header_data)
return (
_regex_find_string(r";Filament\sType\s.\d:\s(.*)", self.header_data) or
_regex_find_string(r";Filament\stype\s=\s(.*)", self.header_data)
)
def parse_filament_name(self) -> Optional[str]:
return _regex_find_string(
r";Filament\sname\s=\s(.*)", self.header_data)
return (
_regex_find_string(r";Filament\sName\s.\d:\s(.*)", self.header_data) or
_regex_find_string(r";Filament\sname\s=\s(.*)", self.header_data)
)
def parse_filament_weight_total(self) -> Optional[float]:
pi = 3.141592653589793