Gcodetools and 'Path to Gcode' problems

Post about using Inkscape with cutters or plotters.
grey1beard
Posts: 17
Joined: Tue Jan 22, 2013 8:25 am
Location: Norfolk, UK

Gcodetools and 'Path to Gcode' problems

Postby grey1beard » Tue Jan 22, 2013 9:14 am

I've installed ver. 0.48 on a laptop running ubuntu 12.04 as a means to supply gcode to my cnc wood router running Linuxcnc.

My current project is to engrave a pcb, and having imported an illustration from a pdf file via a screen grab, I used inkscape first to redraw the layout with a 1mm 'pen'.
I then exported this as a bitmap in 2 colours, saved as a .png file, and re-imported it, scanned it and obtained an outline path with about 2500 nodes.
I've edited this, straightening up a lot of lines, removed a lot of nodes and finished with 2122 nodes on a 'single path'.

I have now run into a variety of hitches/problems, the first being that it took a long time to discover that I had to rename the directory the code would be sent to, namely /home/john, not just /home.
Then, as various other hitches occurred - 'path is in root', so you must add another layer, I decided to start with a simple rectangle. Having sorted out the above, I set it in motion, and was delighted to find a .ngc file appeared in my /home directory.

I then tried repeating the process with my large pcb pattern file, but it keeps throwing up 'internal error' windows and closing.
Before it does so, the window with the original pattern appears with what looks like the conversion to a series of arrowed lines around the path, so it is working to some degree.

After all that, I suppose my first question is, is there a limit to the number of nodes in a path that this extension to Inkscape can cope with ?

Regards

John

grey1beard
Posts: 17
Joined: Tue Jan 22, 2013 8:25 am
Location: Norfolk, UK

Re: Gcodetools and 'Path to Gcode' problems

Postby grey1beard » Wed Jan 23, 2013 4:00 am

As I can't find how to edit quickly, I'll just add the following observations I've made since posting the above.
I've tried reducing the complexity of the file by deleting a great portion of it, till It only has 512 nodes.
The result is still the same, and I've attached a screen shot of the final window.

I've also found that gcode file for the simple rectangle mentioned above, contains >6000 lines of code :shock:
I hav't looked at in detail, but something is obviously wrong !
I repeated the experiment with a set of rectangles nested in each other, and that produced a file of only ~300 lines, so sometimes it gets it right.
I'm carefully checking that I proceed the same way each time, but can't yet see what I may be doing differently.

( My preview of this post doesn't show the attached file, so I'll try again, if it hasn't worked)
Can someone tell me what attachment types are accepted, as it has refused jpeg !!! and if there are size constraints.

John
It's like doing jigsaws in the dark !

User avatar
brynn
Posts: 10309
Joined: Wed Sep 26, 2007 4:34 pm
Location: western USA
Contact:

Re: Gcodetools and 'Path to Gcode' problems

Postby brynn » Wed Jan 23, 2013 4:34 am

Hi John,
JPGs are allowed in attachments. It's just that attachments aren't allowed in this subforum. I don't know why it says that the format isn't accepted, but the problem is that attachments just aren't allowed here. I'll ask if attachments could be allowed here, but don't hold your breath :D

grey1beard
Posts: 17
Joined: Tue Jan 22, 2013 8:25 am
Location: Norfolk, UK

Re: Gcodetools and 'Path to Gcode' problems

Postby grey1beard » Wed Jan 23, 2013 4:37 am

It seems that I can't add a screenshot, so I can only continue to explain in words !
Regards
John
It's like doing jigsaws in the dark !

User avatar
brynn
Posts: 10309
Joined: Wed Sep 26, 2007 4:34 pm
Location: western USA
Contact:

Re: Gcodetools and 'Path to Gcode' problems

Postby brynn » Wed Jan 23, 2013 4:44 am

For now, why don't you start a topic in the Help with Inkscape subforum. Just be sure to have a link from this topic to that one, and that topic to this one. :D

grey1beard
Posts: 17
Joined: Tue Jan 22, 2013 8:25 am
Location: Norfolk, UK

Re: Gcodetools and 'Path to Gcode' problems

Postby grey1beard » Wed Jan 23, 2013 4:58 am

...or tie myself in a knot :D
It's like doing jigsaws in the dark !

User avatar
brynn
Posts: 10309
Joined: Wed Sep 26, 2007 4:34 pm
Location: western USA
Contact:

Re: Gcodetools and 'Path to Gcode' problems

Postby brynn » Wed Jan 23, 2013 5:32 am

Sorry. I made the request viewtopic.php?f=18&t=13405

grey1beard
Posts: 17
Joined: Tue Jan 22, 2013 8:25 am
Location: Norfolk, UK

Re: Gcodetools and 'Path to Gcode' problems

Postby grey1beard » Wed Jan 23, 2013 8:28 am

Hi brynn.
I've been reading the 'Help with Inkscape' forum and found a thread in 2010 discussing limits of various sorts, and a posting from you mentioning the problems with spirograph outputs.
For me, a key was the mention of the large numbers of objects, and I realised that my file has only one object with a vast number of nodes on it.
So I'm wondering if I break the one object into several objects, each with a lot fewer nodes, I can get it to work better ?
Hmm, I'll post afterwards.
Thanks for the post, re having attachments, and getting the 'upload file' button/wording possibly ammended, where relevant.

Regards,
John
It's like doing jigsaws in the dark !

grey1beard
Posts: 17
Joined: Tue Jan 22, 2013 8:25 am
Location: Norfolk, UK

Re: Gcodetools and 'Path to Gcode' problems

Postby grey1beard » Wed Jan 23, 2013 9:18 am

Good news and bad news.

I broke my path into 200 objects and decided to delete some of them to give the programme a fighting chance.
However, I rather got carried away and left only one object with 172 nodes on it !
I ran this throught the gcode tools, but it crashed again :cry:

However, having noticed a new .svg file with a date/time stamp as part of the file name, I opened it, and there was the final screen I'd seen as it crashed.
I also noticed an .ngc file, so I opened that in a text editor. Lo and behold, there was the gcode, complete.

So back to my original file of some 2000+ nodes, and set to work.
Sure enough it crashed, but in the wreckage was the precious .ngc file of some 6000+ lines of code. :D :D :D

it will be nice to eventualy find a way to stop it crashing/freezing, but in the meantime my pcb project can move on.

Looking at the code, I can see that the vast majority of the time is spent cutting small arcs to generate the 'pads' that components are soldered to.
These are always designed as circles, but I can no reason not to make them rectangles, and thus speeding up the whole cutting process.
Of course, that means I've got to re-draw the pcb..............

Goodnight all,
John
It's like doing jigsaws in the dark !

User avatar
brynn
Posts: 10309
Joined: Wed Sep 26, 2007 4:34 pm
Location: western USA
Contact:

Re: Gcodetools and 'Path to Gcode' problems

Postby brynn » Wed Jan 23, 2013 11:41 pm

Oh no, it's not the number of nodes per object, but the number of nodes per file, regardless of how many objects.

I don't know about your particular setup, but somewhere I think I read something about additional nodes making the cutting easier. But wherever I read that, it probably applies to those home craft cutter machines.

The crashing may not relate to Inkscape in this case. Since you're using that extension, it might be something having to do with that. 2000 nodes would cause some performance issues for me on my machine. But I only have 4 gb RAM. Larger memory would handle it better. I suppose there would be some way to identify the source of the crash, but I'm not so technically inclined as to know how to find out. But I'm glad you found the backup files! I'm rather shocked that Inkscape backed up the products of the extension....but good that it does!

Since we can't see the file, I don't have any idea whether you actually need that many nodes. You could try doing Path menu > Simplify, which will reduce the number of nodes significantly. But it will also slightly distort the path. And I have no idea whether you have room for any slight distortion, or whether you need strict precision. But if you try it, just do it once. Because the 2nd time will distort it severely!

Not that I have much experience in this scenario, but I wouldn't be too quick to delete the arcs and draw rectangles.....unless you know the theory behind requiring arcs, and you know that it's irrelevant in your case. Too often I've made quick decisions like that, and regretted it in the end (not always using Inkscape, but in general). (what comes to mind is helping a friend of mine fix their car door, which had acquired a big dent at the front of the door, so that the door couldn't open very far; and I was in my 20s at this time; I thought heck, we just need to bend it in further; but the more we bent it the worse it got; and in the end, the solution was just the opposite -- it had to be pulled out!) (because both pieces share the same arc, and the door can only open if they share the same arc) Anyway, just a thought :D

grey1beard
Posts: 17
Joined: Tue Jan 22, 2013 8:25 am
Location: Norfolk, UK

Re: Gcodetools and 'Path to Gcode' problems

Postby grey1beard » Thu Jan 24, 2013 12:54 am

More nodes would certainly lead to more accuracy, but in this case the extra nodes are coming from the 'circular ends of the 'wires' where the component requires more copper to ensure a good solder joint.
Each line between two nodes generates a new line of code, so the fewer the better.
The actual shape doesn't matter. That being said, each small arc ( they're not drawn accurately enough to be of constant radius) creates a separate line of code, thus one end might take eight lines of code !

Not only that, but the cpu is converting each circular arc code into a series of small straight lines before instructing the router to move. The net result is an incredibly slow cutting rate.
Changing the whole pattern to just straight lines should make an enormous difference.
Running the code through the software, Axis, gives me an estimated cutting time, so it will be interesting to see what the comparison is.

Needless to say, this is nothing to do with making my daughter's piece of kit, but will be a useful exercise, none the less.
If it proves to be the case, I'll post my ideas with the results in the appropriate forum.
It's like doing jigsaws in the dark !


Return to “Inkscape & Cutters/Plotters”