Hi guys,

I've been trying to use various software KCam, mach 3 and so on with my machine and I get unreliable performance each time, either code won't import, line will be missing etc....

So I've decided to write a program of my own to be a one-click solution from importing a Gerber pcb file to driving a CNC machine controller.

So far I have prototyped the code in VB ex2008 to import the gerber file and display the tracks and pads on screen. I've been able to create the rough outlines of every track and pad.

My problem is how do I connect each of the individual outlines to it's neighbour without getting intersections where there shouldn't be?

What is the best way to solve the problem? did I calculate each intersection or did do I solve it graphically? Calc each intersection can have issues when a power plane is made of lines as an outline would be established for each line.
I think solving graphically would be the better way by first drawing the whole gerber layout and raster scanning in the x axis for edges of tracks/pads, and then scanning in the Y axis for edges again. Therefore build up a list of coord of edges and then organise those epoint into paths. Seems more intense.

Once I have the outline in a vector of X & Y co-ords, I can easily pipe the co-ordinates down a serial port to a seperate interpreter card bolted onto a standard stepper motor controller. The interpreter can handle the interpolation between the 2 coords.

Any advice would be welcome.

BR
Adam