Gcodetools - Inkscape's CAM extension

More
17 Sep 2012 08:57 #24325 by Nick
Yes it's possible except Engraving.
Because engraving is done by separate function. You can always join generated Gcode, for example you can use:
cat gcode1.ngc gcode2.ngc > result ngc

To change the sequence just change the order of paths in the imaginary Z axis of inkscape so the paths that are above others will be cut first. (And you also will need to turn off autosorting paths to reduce rapid distance)

Please Log in or Create an account to join the conversation.

More
18 Sep 2012 00:48 #24343 by 777funk
Nick wrote:

Yes it's possible except Engraving.
Because engraving is done by separate function. You can always join generated Gcode, for example you can use:
cat gcode1.ngc gcode2.ngc > result ngc

To change the sequence just change the order of paths in the imaginary Z axis of inkscape so the paths that are above others will be cut first. (And you also will need to turn off autosorting paths to reduce rapid distance)


Question on your gcode.lang file for GEdit. I got this and like it. Thank you!

When I load a *.NC file it doesn't automatically pull up the gcode language, I have to manually go from Plain Text to the gcode language option. Is there a way to make this work automatically? I noticed that .C files automatically pull up the proper language in GEdit.

Please Log in or Create an account to join the conversation.

More
18 Sep 2012 07:27 #24350 by Nick
It should work on .ngc and .nc files... See the code below.
What is your file's exact extension .NC or .nc? In Linux letters's case does matter.
	<metadata>
		<property name="mimetypes"></property>
		<property name="globs">*.nc;*.ngc</property>
		<property name="block-comment-start">(</property>
		<property name="block-comment-end">)</property>
	</metadata>

Please Log in or Create an account to join the conversation.

More
18 Sep 2012 12:24 - 18 Sep 2012 12:58 #24359 by 777funk
Thanks Nick. It's actually working now. Not sure why it wasn't working last night. I was trying to add another extension to be included and did this:
<language id="gcode1" _name="Gcode1" version="2.0" _section="Others">
	<metadata>
		<property name="mimetypes"></property>
		<property name="globs">*.nc;*.ngc;*.ncd;*NCD</property>
		<property name="block-comment-start">(</property>
		<property name="block-comment-end">)</property>
	</metadata>

I added my file type as shown in the code block above "*.ncd" however it doesn't work to change the language automatically. If I save as .nc first then change to .ncd however it will stay as GCode for the language. Then if I change the same file to .C it shows C as the language. So it is reading, but for some reason it won't change from plain text to Gcode by just the name .ncd unless I save first as .nc.

btw My name is Nick as well and same spelling for the full first name. In the US, not many are Nicolas. Most have an 'H'. I always get my name mis-spelled here. Maybe I should move to Russia :)
After all that's the way it sounds right? It's Ni(k)olas in the pronunciation; not Ni (ch) olas... right!
Last edit: 18 Sep 2012 12:58 by 777funk.

Please Log in or Create an account to join the conversation.

More
18 Sep 2012 13:47 #24366 by Nick
Attach your .nc file, I'll take a look on it...

PS Russian official spelling of my full name in English will be Nikolay, so short name could be Nik, but I prefer Nick ;)

Please Log in or Create an account to join the conversation.

More
18 Sep 2012 14:00 - 18 Sep 2012 14:07 #24368 by 777funk
I just opened a new document in GEdit and saved it as Untitled Document 1.nc and that works great. But if I save to filename .NCD it won't default to Gcode as the language unless I save .nc first then Save As .NCD.

by the way, the reason I searched for a GCode lang file for GEdit was because I ended up ruining a good blank by having a comment parentheses backwards to ) at the beggining instead of ( and it actually cut where it was supposed to be a comment. Ouch!! So, thanks for your work!

Aside does your .lang file work in JEdit? I like the JDiff compare feature. Alternatively do you know of a good built in compare plugin for GEdit? I like to compare files side by side in the text editor. Notepad ++ did that really well in Windows.
Last edit: 18 Sep 2012 14:07 by 777funk.

Please Log in or Create an account to join the conversation.

More
18 Sep 2012 14:20 #24369 by Nick
I've got almost the same behavior:

Create new file + save (as) 1.nc = Gcode

Create new file + save (as) 1.ngc = Text
Create new file + save (as) 1.ngc + close file + open 1.ngc = Gcode

So it appears that it looks only at the first option in the .lang file to determine language when saving the file.... But when you Open file it looks through all possibilities...

Please Log in or Create an account to join the conversation.

More
18 Sep 2012 14:42 - 18 Sep 2012 15:07 #24371 by 777funk
I think you just figured it out. That seems to be the case.

EDIT: I'm not sure about that now. I have a bunch of very simple .nc files and just opened one and it defaults to plain text.
So open doesn't always work either.

EDIT2: I just put ONLY *.NCD in the file types and now it works. For some reason it's not liking the mulltiple file types.
Last edit: 18 Sep 2012 15:07 by 777funk.

Please Log in or Create an account to join the conversation.

More
18 Sep 2012 14:56 - 18 Sep 2012 15:01 #24372 by 777funk
Here's what I'm using. It opens as plain text as the lang.

ok not letting me upload it as .nc. Weird for a CNC forum. I suppose I could change it to a .txt but all there is to it is basically a G90 and some G00 and G01 commands.
Attachments:
Last edit: 18 Sep 2012 15:01 by 777funk.

Please Log in or Create an account to join the conversation.

More
18 Sep 2012 15:04 #24374 by Nick
Just pack the file with tar.gz or zip, and forum will accept it.

Please Log in or Create an account to join the conversation.

Moderators: Skullworks
Time to create page: 0.220 seconds
Powered by Kunena Forum