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

SVG offset #7

Closed
jeevank opened this issue May 23, 2020 · 6 comments
Closed

SVG offset #7

jeevank opened this issue May 23, 2020 · 6 comments

Comments

@jeevank
Copy link

jeevank commented May 23, 2020

Is there a way to get all of the gcode offset by a certain amount on both X and Y axis?

Without the offset the gcode starts the printer at the very edge of the print bed. Thanks!

@sameer
Copy link
Owner

sameer commented May 23, 2020

Hi @jeevank, good idea. I hadn't thought about this before, I can add CLI arguments for manipulating the SVG placement. How does this sound?

--origin <x,y> place the upper left corner of the SVG

That way you can always place it within bounds.

@jeevank
Copy link
Author

jeevank commented May 24, 2020

There are 2 free Inkscape plugins that allow generating Gcode -- "J Tech Phototonics laser" and Inkscape's built-in "Gcodetools". Both use the bottom-left corner as the 0,0 X,Y offset so it may be good to align with that.

But I'm personally happy with either choice. Thanks for the quick response @sameer

To provide some context, I'm currently using a method similar to the one here to use a 3d printer as a plotter:
https://medium.com/@urish/how-to-turn-your-3d-printer-into-a-plotter-in-one-hour-d6fe14559f1a . The method works well but your app is way faster, especially for SVG's with any decent level of complexity.

I've already used your app on Ubuntu Linux and it converted an Inkscape SVG that was taking upwards of 5 minutes to convert to gcode to just a couple of seconds with your app 👍

@sameer
Copy link
Owner

sameer commented May 24, 2020 via email

@sameer
Copy link
Owner

sameer commented May 24, 2020

Hello Jeevan,

Please try the latest commit when you have some time. Here's the demo from the README with the origin argument:

cargo run --release -- examples/Vanderbilt_Commodores_logo.svg --origin 45,46 --off 'M4' --on 'M5' -o out.gcode

@jeevank
Copy link
Author

jeevank commented May 28, 2020

This worked perfectly! Thanks for adding this @sameer 🥇

@sameer
Copy link
Owner

sameer commented May 28, 2020

Great! In that case, I will close this issue.

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

3 participants
@jeevank @sameer and others