cncncnc

Published January 24, 2011
Advertisement
For some reason my hot shit project blog doesn't get the audience she deserves.

So
[size="7"]here it ising

(it's pretty abandoned at the moment, but the whole point of this """"journal"""" is to let you all know I'm the mostest awesomest guy).

Maybe I'll get back to it again, I made a little side-project to warm up a bit. It took 3 days, maybe I'll expand it to a pretty usable tool.

[size="3"]The SideProject

It is a graphical G code (.Dnc) editor I made to speed up my CNC related work. I looked for free programs on the net, but I couldn't find any that did the things I wanted in the way I wanted.

The main issue is that I use a program called "DeskCNC", which is a very cool tool, but it's CNC editing features are not so cool (CNC means um.... Computer[size="1"]something Numerical Control. It's an engineering stuff). The main thing it misses, that it can only work with non-intersecting closed polygons, it simply cannot generate the CNC program (G code) for non-closed polylines and intersecting stuff. But the problem is that I need very tricky trajectories (it is for a hot-wire foam-cutter machine). So I need to break the desired trajectory to pieces and complete them to a closed loop (with a CAD software). That means I have separate files that can be loaded by DeskCNC, and their G codes can be generated (separate files of course)

Until now, I had to open the .Dnc files with notepad and edit them manually: copying together, adding different feedrates etc etc which took awkwardly long time (some files were 1MB...).

So I wrote my own tool to do the things I want: manipulating the code graphically, copying, pasting, deleting, moving sequences, adding points, reducing the number of points (because the accuracy of the dnc file generated by DeskCNC is much better, than the actual machine (stepper motors), which produce some artefacts on the cut surface), adding feedrates/comments etc.

Well, three days of coding (approx 30-35 hours), and I have everything I wanted (except for one small bug I made a thread about on gamedev).

The program works with the G code, and manipulates that, so the commets/empty lines etc never get lost. The vertex data, that's parsed from the text is only there for display and selection. At his time, the text is always re-parsed every time the length of the stuff is affected (line deleted, added etc). This is quite slow, I will have to use a much smarter design and manipulate the vertex data and the text synchronously.

It has a nice feature: the sequences are coloured according to the feedrates.

I'm quite happy with it, but it has its limitations of course:
  • The program can only handle files that are smaller than 5MB.
  • It cannot handle multiple files, but I don't think that's really necessary, you just start the program more times, and you can copy/paste the stuff. Even from/to notepad
  • keyboard interface: no GUI
  • The parser is very simple: only the G01 mnemonic, only 2D (it's enough for the foam-cutter), only in a certain format (luckily the output of DeskCNC is very consistent)
  • No undo
Some screenshots:

01.JPG
02.JPG
03.JPG
04.JPG

That's the most worst formatted text I've ever written.
Next Entry more features
0 likes 1 comments

Comments

Aardvajk
Weirdly, I used to do marketing for someone who sold and installed CNC equipment. No reason to mention it except that I know what the acronym means. Sorry.
January 24, 2011 08:35 PM
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Profile
Author
Advertisement
Advertisement