Page 1 of 2

0.8.3 stuck in infinite loop

Posted: Fri Jul 18, 2014 3:51 am
by kvnrydberg
Like most people, I use Autoleveller for etching PCBs. Unlike most people (prolly), I draw my circuits with Adobe Illustrator. For the traces I use a blob brush stroke and draw them freehand from pad to pad. I like to do it this way because I can layout a very large circuit fluidly. (It's also a damn good puzzle.) But I do end up with a lot of little rough edges on my traces. When I'm done with the drawing and have checked for errors (though I always miss at least one F-up), I export it to a .dxf file and produce the Gcode with CamBam. As you can imagine, one of the problems with this is there are an enormous amount of little arcs in the Gcode. It takes CamBam nearly 20 minutes to process some of my .dxf files.

Now to the point, I have used AL 8.2 to good effect on these Gcode files. Both on Gcode files with G2 and G3 commands, and those that have been converted to straight lines. The only problem I have had is when the arc is very large, a circle for example. Then the AL output gets a little wanky.

But with version 8.3 I've had some other problems with Gcode files that contain G2,G3 commands. The first G-code file I tried was processed from a fairly densely populated 5"x7" PCB. Quite a large number of traces and thus many little arcs. The result was a success. The second G-code file I tried was the top layer of the same PCB, not nearly as many traces but still in the same area. When I pressed the "create leveled G-code" button, the designated file appeared in the appropriate directory, and I could load it with Mach3, but it wasn't complete. Also, it appeared that AL had hung up, as it wouldn't respond to further prodding. Upon further inspection though, AL was still working on the same leveled G-code file. Curious, I let it go for upwards of 5 minutes while I watched the output file get bigger and bigger. After 115 megs worth of data, I figured it was probably in a loop. Which it was.

Next I tried the same file with AL 8.2. It worked. So I looked at the original G-code file, the AL 8.2 output, and the AL 8.2 output side-by-side. Besides for the leveling calculations, the original and 8.2 were exactly the same. Now, the original and 8.3 were exactly the same up to a point. At this point, 8.3 began to output an endless repetition of two lines, one after the other. Neither of these two lines were in the original. I looked at where exactly this was on my drawing, and lo and behold, it was precisely where one of those jagged little edges were on my brush stroke. It may be coincidental, as there are hundreds of such tiny little zigs and zags that didn't cause an error.

I did try this several times with 8.3 , all with the same result. So I wonder if you can have a look at my files and maybe you can see something the matter. I truncated the 8.2 and 8.3 files. Only the 8.2 file has the probe codes, which are the same as in the 8.3 file. And you can see at the end of 8.3 where it begins to differ and repeat itself.

TL;DR The AL 8.3 output from a G-Code file that contains G2 and G3 commands and many little zigs and zags began to repeat the same two G3 clusters without end. I have attached the offending files.

Re: 0.8.3 stuck in infinite loop

Posted: Fri Jul 18, 2014 8:11 am
by Zig
DXF files are notorious for producing lines whihc ought to joined but in reality are disjointed.

I do not know if Your original DXF data suffers from this afliction. One of the problems is that arcs and circles end up with mismatched attributes ( radius versus end points ).

Re: 0.8.3 stuck in infinite loop

Posted: Fri Jul 18, 2014 8:39 am
by daedelus
I shall have a look for sure and report back shortly :) thanks.

Re: 0.8.3 stuck in infinite loop

Posted: Fri Jul 18, 2014 5:23 pm
by kvnrydberg
Hey Zig. I wasn't aware of this. The .dxf format may be the problem, but I don't think so. I have looked at the particular .dxf file at very high magnification and seen no discontinuities. And CamBam posts a warning when a MOP is done on a disjointed path. Also, wouldn't Mach3 protest when the radius doesn't match the end points? On the other hand, CamBam has a "join" feature which joins paths that are as close as a specified tolerance, so I will try this and see if it helps.

Re: 0.8.3 stuck in infinite loop

Posted: Fri Jul 18, 2014 7:58 pm
by kvnrydberg
Update: It didn't help.

Re: 0.8.3 stuck in infinite loop

Posted: Fri Jul 18, 2014 10:03 pm
by Zig
Yes MACH ought to report this.

I use LinuxCNC and it does report issues of this kind if outside specified tollerance.


EDIT: can You post the DXF file?

Re: 0.8.3 stuck in infinite loop

Posted: Fri Jul 18, 2014 11:21 pm
by kvnrydberg
No. I tried. The size of the file far exceeds the 256k upload limit for this forum.

Re: 0.8.3 stuck in infinite loop

Posted: Sun Jul 20, 2014 11:09 am
by daedelus
Just to keep you informed, I am working on this and making some progress but its tricky to locate the initial cause of the infinite loop.

I am wondering if its easy for you to convert the file to millimeters and not inches and run it through autoleveller? I am currently thinking the problem is to do with the units used.

Re: 0.8.3 stuck in infinite loop

Posted: Mon Jul 21, 2014 7:43 am
by kvnrydberg
Well, you're right about that. I converted my .dxf file to millimeters, then had cambam produce the g-code in millimeters, and AL worked its magic. What gives?

Re: 0.8.3 stuck in infinite loop

Posted: Mon Jul 21, 2014 8:45 am
by daedelus
Thanks for that, that helps me a lot in narrowing down the problem.

Im still not quite sure why there should be an issue with inches but my new tests should flush out the problem :)