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.
Filename
large_macro_cnt2.gbx
Size
54.282 MB
Issue
Too many redundant apertures
Filename
out.gbr
Size
28.270 MB
Issue
None
c:\wcad\split274x\split274x64.exe large_macro_cnt2.gbx -rewrite!out.gbr -log:out.log -fmt:best
where:
split274x64.exe | | executable |
large_macro_cnt2.gbx | | input file |
-rewrite!out.gbr | | output file |
-log:out.log | | log file |
-fmt:best | | use optimal format for output |
Aperture Reduction
The input file has 66,432 d-codes defined; almost all using custom aperture macros! Here is an example:
%ADD66095COM66095,0X180.00*%
%AMCOM66096*
4,1-$1,25,
-0.00975,0.00729,
-0.00788,0.00926,-0.00576,0.01071,-0.00338,0.01168,-0.00084,0.01213,0.00173,0.01203,
0.00422,0.01140,0.00652,0.01026,0.00853,0.00866,0.01016,0.00667,0.01134,0.00438,
0.01201,0.00190,0.01214,-0.00067,0.01173,-0.00320,0.01079,-0.00560,0.00937,-0.00774,
0.00753,-0.00954,0.00536,-0.01091,0.00294,-0.01179,0.00040,-0.01215,-0.00231,-0.01195,
-0.00429,-0.00550,-0.00443,-0.00509,-0.00458,-0.00468,-0.00474,-0.00428,-0.00975,0.00729,$2*
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.
Format
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.
Timing
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.