Files we receive from clients are under NDA which means we cannot use them as examples. However we found this file for which the NDA has expired. It is an extreme case. However if you are a mask or board shop you want to be able to handle extreme cases without going back to your customers and asking him to "fix" his data.
Too many redundant apertures
c:\wcad\split274x\split274x64.exe large_macro_cnt2.gbx -rewrite!out.gbr -log:out.log -fmt:best
The input file has 66,432 d-codes defined; almost all using custom aperture macros! Here is an example:
That's a massive number for any Gerber parser to process. After comparison and pruning the duplicate aperture macros, we ended up with 2,947 unique d-codes in the output file. That's still a lot but a tremendous reduction. This alone reduces the file from 55 MB to 28 MB!
The aperture macro tolerance was set to 1.00 um -- if two macros are dimensionally within 1 um of each other they are considered the same.
The source file was in units of inches with a format = 2.5. The program determined that 2.6 would be the best format to use in the output file as 8 total digits are available and there was no data past 99 inches.
Polygons with Large Vertex Count
The default vertex count for G36/G37 polygons is 4096. The program found 9 polygons wth 5637 vertices and 59 polygons with 5638 vertices. There were a total of 1901 G36/G37 polygons.
It required 8.5 seconds to pre-process the input file and write an output file. This was on a fast 8-core machine with solid state drives for input and output. The program detected 16 total cores (8 x 2 hyperthreaded) and does take advantage of multiple cores.