pittuck:
but for two problems:
- gerber files wont contain a point for every drill hole. I just checked my current project, about 10/80 holes do not extrude from their line on one layer, so this will give wrong results unless i graphically analyse the files (something i have been working on, but is not going well).
In the PCB programs I’ve used, one creates a hole by creating a pad or via. Although a hole with a size of ‘zero’ won’t generate anything in the Gerber file, instructing users not to use a hole size of zero (use a size of eight if a copper-less hole is desired) shouldn’t seem too hard. Alternatively, one could report the number of holes without top and/or bottom pads and let users decide if it seemed reasonable for their application.
- run time, go to http://www.sparkfun.com/~mpittuck/size.php and upload and run a copper file. That does Step 3 (4) on one file. I tried it on a largeish design, took just under 30 seconds to process the file to give the following result:
Is the time CPU time, or is that just time to perform the physical upload [which may be substantially reduced if uploading a ZIP instead of a Gerber] If the former, what’s your server running on–an XT? I could write you a C program that would run on just about anything (including an IBM XT) and perform the three-file check in a second or two (well, maybe five or ten on an IBM XT) for boards of up to 32,000 holes; since a 10"x10" board with ten holes/inch in both directions would only be 10,000 I don’t think a 32,000-hole limit should be a problem.
18seconds for a ‘reasonable’ file. much more for larger layer files (the ones i tested was 335k giving about 30 seconds and 28k giving 7 seconds) So with large designs your going to need a minute, more? thein lies the problem, php will time out after 30 seconds.
What are you using to process the files? Trying to run something with Unix shell scripts would probably be too slow, but a decently-written C program should be pretty zippy.
Just so you realise, i am a semi-professional programmer, freelance. In monetry terms sparkfun will have paid me for about 6 hours work on my usual hourly salary, i am doing this as a favour / for experience.
Fair enough. I don’t know exactly what sort of platform the server’s being run on, but it shouldn’t be too hard for me to write a program that would take four arguments (drill, top, bottom, and “results” filenames) and produce a report of what seems kosher and not.
For the moment i will work with what i have already done, i might be able to add new features at a later date. The plan is now to get the PCB Wizard complete so that when sending the final email to sparkfun there is a copy / paste section of text to put in the email which will help sparkfun with the common problems of format identification and incorrect board sizes.
Well, if having a C program to do some validation would be useful, I might be able to help you out.