Don't hiccup on slic3r filament_diameter comments generated for multi extruder setups
This commit is contained in:
parent
c35b7a66b0
commit
c5be9908c5
1 changed files with 8 additions and 1 deletions
|
|
@ -73,7 +73,14 @@ class gcode(object):
|
|||
if ';' in line:
|
||||
comment = line[line.find(';')+1:].strip()
|
||||
if comment.startswith("filament_diameter"):
|
||||
self._filamentDiameter = float(comment.split("=", 1)[1].strip())
|
||||
filamentValue = comment.split("=", 1)[1].strip()
|
||||
try:
|
||||
self._filamentDiameter = float(filamentValue)
|
||||
except ValueError:
|
||||
try:
|
||||
self._filamentDiameter = float(filamentValue.split(",")[0].strip())
|
||||
except ValueError:
|
||||
self._filamentDiameter = 0.0
|
||||
elif comment.startswith("CURA_PROFILE_STRING"):
|
||||
curaOptions = self._parseCuraProfileString(comment)
|
||||
if "filament_diameter" in curaOptions:
|
||||
|
|
|
|||
Loading…
Reference in a new issue