[Scilab-users] Reading Gerber files and exporting g-code for cnc

PabloF pablo_f_7 at hotmail.com
Fri Jul 31 01:30:28 CEST 2015


Hi:
I want to read a gerber file with scilab, process it and export a gcode file
for using with a custom cnc we build in our university, for manufacturing
PCB's with isolation method.. But i'm looking for advice.

By now, i've meade a script to read each line from a gerber file, and i use
select-case to parse them... i can handle basic appertures (circles and
rectangles) and do linnear interpolations by the momment..
The main idea is to draw a binary image with the information of the gerber
file and then do some image processing to get the edges of the image (with a
sobel's filter or something).

The gerber specifications states that for tracks, i need to stroke or paint
the arc or line with the selected apperture.. so i made a function that
"paints" the shape of the apperture with center in a given coordinate of a
matrix. For stroking a line for example, i should call this function for
each coordinate of the interpolated line... I've done this but the process
is too slow... Is there any simpler aproach?

Then, once i have the edges of the image, i don't know how to select the
coonvinient coordinates of the detected edges so that i can export a g-code
with them... for example, if i have to do a circle, i should give many
points of the circle and form lots of tiny lines as an approximation, but if
i have to do a line, i should only use 2 points.. I think this points can be
detected with a corner filter, and then i should reorder them... any ideas
of this? I want to do the circles with little lines so i get a simpler
g-code for our custom cnc

Any ideas would be welcome! thanks



--
View this message in context: http://mailinglists.scilab.org/Reading-Gerber-files-and-exporting-g-code-for-cnc-tp4032628.html
Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com.



More information about the users mailing list