Index: trunk/src_plugins/drc_query/drc_query.conf =================================================================== --- trunk/src_plugins/drc_query/drc_query.conf (revision 30202) +++ trunk/src_plugins/drc_query/drc_query.conf (revision 30203) @@ -3,6 +3,20 @@ ha:plugins { ha:drc_query { disable=0 + + li:definitions { + ha:min_drill { + type = coord + legacy = design/min_drill + desc = {minimum drill diameter} + } + ha:hole_overlap_factor { + type = real + default = 0.0 + desc = {How much drilled holes may overlap [-1..+1]; 0 means touching holes are reported; positive numbers allow more overlap, negative numbers report non-overlapping but close holes} + } + } + li:rules { ha:hole_dia { @@ -9,7 +23,7 @@ type = single hole title = hole too small desc = padstack hole diameter is too small - query = {(@.hole > 0) && (@.hole < 0.2mm)} + query = {(@.hole > 0) && (@.hole < $min_drill)} } ha:hole_overlap { @@ -21,7 +35,7 @@ rule overlap let A @.type==PSTK let B A - assert (A.ID > B.ID) && (distance(A.x, A.y, B.x, B.y) < (A.hole + B.hole)/2) thus mklist(A, B) + assert (A.ID > B.ID) && (distance(A.x, A.y, B.x, B.y) < (A.hole + B.hole)/(2*(1+$hole_overlap_factor))) thus mklist(A, B) } } @@ -34,7 +48,7 @@ rule net brk let N netlist() let O netsegs(N) - assert netbreak(O, 9mil) + assert netbreak(O, $min_copper_overlap) } } @@ -47,7 +61,7 @@ rule net short let N netlist() let O netsegs(N) - assert netshort(O, 12mil) + assert netshort(O, $min_copper_clearance) } } Index: trunk/src_plugins/drc_query/drc_query_conf.h =================================================================== --- trunk/src_plugins/drc_query/drc_query_conf.h (revision 30202) +++ trunk/src_plugins/drc_query/drc_query_conf.h (revision 30203) @@ -6,7 +6,8 @@ typedef struct { const struct { const struct { - CFT_BOOLEAN disable; /* disable the whole engine */ + CFT_BOOLEAN disable; /* disable the whole engine */ + CFT_HLIST definitions; /* DRC constant definitions */ CFT_HLIST rules; /* inline rules */ } drc_query; } plugins;