Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: update parsing for smooth slicing #166

Merged
merged 2 commits into from
Nov 20, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions src/gcode.py
Original file line number Diff line number Diff line change
Expand Up @@ -282,14 +282,18 @@ def parseGCode(lines):
line = line + ";" if len(line) == 0 or ";" not in line else line
args, comment = line.split(";")[:2]
args = args.split(" ")
if comment.lower() == "rotation": # we have either rotation or incline
if line.endswith("rotation"): # we have either rotation or incline
args, comment = line.split(";")[1:3] # we remove first colon
args = args.split(" ")
printer.finishLayer()
# if any(a.lower().startswith('u') for a in args): # rotation
printer.rotations.append(
Rotation(printer.rotations[-1].x_rot, parseRotation(args[1:]))
)
printer.currPos.U = printer.rotations[-1].z_rot
elif comment.lower() == "incline":
elif line.endswith("incline"):
args, comment = line.split(";")[1:3] # we remove first colon
args = args.split(" ")
printer.finishLayer()
# if any(a.lower().startswith('v') for a in args): # incline
printer.rotations.append(
Expand Down
Loading