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

Convert gcode to x,y,z coordinates #36

Open
ivandrodri opened this issue Mar 24, 2019 · 1 comment
Open

Convert gcode to x,y,z coordinates #36

ivandrodri opened this issue Mar 24, 2019 · 1 comment

Comments

@ivandrodri
Copy link

Hi,

I wanted to know how to convert gcode lines to x,y,z coordinates in order to implement them in a 3d simulation.

Given a g-code "line" I parse it with

g = GCode.parse_line(line)

but I don't know how to get the x,y,z coordinates from the g.params .

thanks for any help!

@Nikolay-Kha
Copy link
Owner

Hi.
g.params is a simple dict with capitalized string parameters. I.e. to get X from the line, just call g.get('X')

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants