Skip to content

Commit

Permalink
module: metadata.py
Browse files Browse the repository at this point in the history
Bugfix/Improvement regarding Simplify3D meta parsing

Current parsing param are not able to get filament_name and filament_type correctly.
printMaterial,(%S) for filament_name is not present in Gcode (anymore?).
makerBotModelMaterial,(%S) for type of filament is only changable for Export File Format= .makerbot.
Even worse: the last state of the Setting is present in Gcode even if the user didnt ever used something different than Standard G-Code Export. (By default = pla)
By using autoConfigurationMaterial,(%S), wich is by default one of PLA, PETG, ABS..., as filament_type we can avoid unnecessary Spoolman warnings and get a pleasurable printing history. -even with S3D ;)

Signed-off-by: Silas Döring [email protected]

module: metadata.py
Bugfix/Improvement regarding Simplify3D meta parsing

Current parsing param are not able to get filament_name and filament_type correctly.
printMaterial,(%S) for filament_name is not present in Gcode (anymore?).
makerBotModelMaterial,(%S) for type of filament is only changeable for Export File Format= .makerbot.
Even worse: the last state of the Setting is present in Gcode even if the user didnt ever used something different than Standard G-Code Export (By default = pla).
By using autoConfigurationMaterial,(%S), wich is by default one of PLA, PETG, ABS..., as filament_type we can avoid unnecessary Spoolman warnings and get a pleasurable printing history. -even with S3D ;)

Signed-off-by: Silas Döring [email protected]
  • Loading branch information
sdoe0 committed Oct 2, 2024
1 parent 71f9e67 commit c98cad4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions moonraker/components/file_manager/metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -594,11 +594,11 @@ def parse_filament_weight_total(self) -> Optional[float]:

def parse_filament_name(self) -> Optional[str]:
return regex_find_string(
r";\s+printMaterial,(%S)", self.header_data)
r";\s+(?:printMaterial|autoConfigureBrand),(%S)", self.header_data)

def parse_filament_type(self) -> Optional[str]:
return regex_find_string(
r";\s+makerBotModelMaterial,(%S)", self.footer_data)
r";\s+autoConfigureMaterial,(%S)", self.footer_data)

def parse_estimated_time(self) -> Optional[float]:
time_match = re.search(r';\s+Build (t|T)ime:.*', self.footer_data)
Expand Down

0 comments on commit c98cad4

Please sign in to comment.