I’m a little puzzled here, by exactly how you want this to operate ?
" Now we want to upgrade our service which can help us get the file parameters directly ( the size,the Min Track width,the min Spacing, Min Hole Size ,usually gerber format ) when our clients upload their files.
That is not a KiCad data parser problem, but a Gerber/Excellon problem.
It seems a simple and worthwhile report set, to add to GerbView ?
Min Track width and Min Hole size should pop out in a few lines of code, during the files-load.
Size seems to be known, as it Auto-Centres already, so just needs to report those.
That leaves Extract Min Spacing as a more difficult GerbView general problem, as well as how to manage file-type split.
The ideal Web-Vendor Automated-Website would do something like
- grab users (KiCad created, Gerber set ) Zip file, save to path/quote1746372
- run (imaginary) command gerbview.exe -dir path/quote1746372 -r Reportname.xml/xls/csv
- read generated report
- apply min.max checks and calculate quote, include report in quote to customer
- loop
GerbView does big chunks of that now, it seems to quite nicely swallow whole sets of Drill/gerber & autoscale.
I see it also correctly loads/renders KiCad slots, so can report those too.
Finer details like file sorting (eg split silk-screen-set from copper-set, cannot guarantee by name ) might be nice if get false errors from Silkscreen of tracewidth & certainly clearance pass ? )’
Maybe a silk in filename is enough ?
Looks like the only listed item of min Spacing, is special software, but that’s a tough ask from scattered Gerber data, and maybe a Clearance == MinWidth ‘rough rule’ is enough to assume from scanned data ?