Skip to content

Commit

Permalink
Merge pull request #54 from NilsRo/Development
Browse files Browse the repository at this point in the history
Added support for Simplify3D V5
  • Loading branch information
NilsRo authored Dec 18, 2022
2 parents 58d7916 + f5b6850 commit dd5acbd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
9 changes: 4 additions & 5 deletions octoprint_SlicerEstimator/metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,10 +131,9 @@ def process_line(self, line):
self._time_list.append([self._line_cnt, float(re_result[2])*60])
return(("@TIME_LEFT " + str(float(re_result[2])*60) + "\r\n").encode() + line)
elif self.slicer == SLICER_SIMPLIFY3D:
if decoded_line[:15] == "; Build time:":
re_result = self._regex.match(decoded_line)
if re_result:
self.printtime = int(re_result[1])*60*60+int(re_result[2])*60
re_result = self._regex.match(decoded_line)
if re_result:
self.printtime = int(re_result[1])*60*60+int(re_result[2])*60

if decoded_line[:1] == ";":
# check a comment line for metadata
Expand All @@ -160,7 +159,7 @@ def _detect_slicer(self):
return SLICER_SUPERSLICER
elif "Simplify3D" in line:
self._logger.info("Detected Simplify3D")
self._regex = re.compile("; Build time: ([0-9]+) hours? ([0-9]+) minutes?")
self._regex = re.compile("; Build [tT]ime: ([0-9]+) hours? ([0-9]+) minutes?")
return SLICER_SIMPLIFY3D
else:
self._logger.warning("Autoselection of slicer not successful!")
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
plugin_name = "OctoPrint-SlicerEstimator"

# The plugin's version. Can be overwritten within OctoPrint's internal data via __plugin_version__ in the plugin module
plugin_version = "1.5.8"
plugin_version = "1.5.9"

# The plugin's description. Can be overwritten within OctoPrint's internal data via __plugin_description__ in the plugin
# module
Expand Down

0 comments on commit dd5acbd

Please sign in to comment.