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

bCNC compatible Gcode generator and related test integrated #72

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

apshu
Copy link

@apshu apshu commented Jul 27, 2019

Hello,

I was improving the hobby machine GCODE output. The new writer plugin improves stitching speed and includes color information. The free bCNC CAM software supports python commands and other extras that help hobby machines. The .ngc formatted file is tested with bCNC.

Please accept the new writer plugin.

https://github.com/vlachoudis/bCNC

Kind regards,
Attila

@lexelby
Copy link
Member

lexelby commented Jul 28, 2019

Awesome, thank you!!

There's a lot in common between this and the existing gcode writer. I wonder if it might make sense to merge them together rather than have two different ones?

Are you using GRBL or another firmware?

@apshu
Copy link
Author

apshu commented Jul 29, 2019

Yes, I am using GRBL 1.1.

It is possible to merge the plugin, if you see benefits in this. would you like to merge them and have a setting deciding if legacy GCODE of bCNC backed code should be generated?

Is there a way to transfer settings from Ink/Stitch to the exporter plugin? I have seen the settings are very well defined for all import and export plugin definitions, just couldn't find how to see and change these settings from the Ink/Stitch IDE.

@lexelby
Copy link
Member

lexelby commented Aug 1, 2019

Yes, I do think merging them is a good idea. There's already a checkbox to enable GRBL's laser mode, so adding another to enable bCNC comments would be great. If I could just get bCNC running on my system, I might be able to test this with my laser cutter. I use it to cut out fabric shapes to use for embroidered patches.

Is there a way to transfer settings from Ink/Stitch to the exporter plugin? I have seen the settings are very well defined for all import and export plugin definitions, just couldn't find how to see and change these settings from the Ink/Stitch IDE.

Yup! Here's how it works. The settings for the gcode output format are defined here. These are in Inkscape's standard INX format.

This is actually a Jinja2 template, so you'll see some extra stuff like this: {{ _("laser mode") }}. That enables the string for internationalization, so we want to use that for any user-facing string.

The name attribute corresponds directly to an entry in the settings dict passed to the writer function. That magic happens here if you're curious. Kind of a bit of a hack but it gets the job done.

When we originally wrote the gcode output format, the person who requested it said to use the .txt file extension, but I think you're right that .ngc or .nc makes much more sense. That was before I had a grbl-based machine of my own, so I didn't know any better. Might as well change it while we're in there.

@apshu
Copy link
Author

apshu commented Aug 26, 2019

I was thinking about the merging of the two GCode writers.

The TXT has options for laser and "clean GCODE"
The NGC has option for bCNC colors / drill commands.

Both formats has some identical, but many unique options. If we merge these together, the number of options will grow beyond usability for unexperienced users.

Keeping the two modules separated decreases operating complexity.

Please see a little feature teaser :)

sample2
sample1

@lexelby
Copy link
Member

lexelby commented Oct 18, 2021

Oh, thanks for the reminder! I totally forgot about this. I'll check over what you've done since I last commented.

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

Successfully merging this pull request may close these issues.

2 participants