mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-07 06:57:28 -06:00
lil: optimize parsing gcode arg letter
CURA-7066
This commit is contained in:
parent
efafc37e49
commit
9bcae15d39
1 changed files with 4 additions and 4 deletions
|
@ -264,13 +264,13 @@ class FlavorParser:
|
||||||
try:
|
try:
|
||||||
if item[0] == "X":
|
if item[0] == "X":
|
||||||
x = float(item[1:])
|
x = float(item[1:])
|
||||||
if item[0] == "Y":
|
elif item[0] == "Y":
|
||||||
y = float(item[1:])
|
y = float(item[1:])
|
||||||
if item[0] == "Z":
|
elif item[0] == "Z":
|
||||||
z = float(item[1:])
|
z = float(item[1:])
|
||||||
if item[0] == "F":
|
elif item[0] == "F":
|
||||||
f = float(item[1:]) / 60
|
f = float(item[1:]) / 60
|
||||||
if item[0] == "E":
|
elif item[0] == "E":
|
||||||
e = float(item[1:])
|
e = float(item[1:])
|
||||||
except ValueError: # Improperly formatted g-code: Coordinates are not floats.
|
except ValueError: # Improperly formatted g-code: Coordinates are not floats.
|
||||||
continue # Skip the command then.
|
continue # Skip the command then.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue