Index: drc_query/index.html =================================================================== --- drc_query/index.html (revision 30222) +++ drc_query/index.html (revision 30223) @@ -32,6 +32,13 @@ ha:overwrite { ha:plugins { ha:drc_query { + li:definitions { + ha:min_drill { + type = coord + desc = {minimum drill diameter} + default = 0 + } + } li:rules { ha:hole_dia { type = single hole @@ -38,7 +45,7 @@ title = hole too small desc = padstack hole diameter is too small disable = 0 - query = {(@.hole > 0) && (@.hole < 0.2mm)} + query = {(@.hole > 0) && (@.hole < $min_drill)} } } } @@ -47,6 +54,30 @@ }

+There are two main subtrees below ha:drc_query: definitions and rules. +

Definitions

+

+Definitions create new config nodes under design/drc. These config nodes +can be used to configure parameters of the drc check. The order of +definitions does not matter but the name of each definition must be unique. +

+A definition is a named hash subtree with the following fields: + +
name mandatory meaning +
type yes data type of the configuration; one of: coord, boolean, integer, real, unit, color +
desc no human readable description +
default no low priority default value (format depends on type) for the case the configuration node is not set +
legacy no reserved for stock rules for compatibility with the old DRC, do not use in new rules +
+

+The definition in the above example creates config node design/drc/min_drill. +This new config node is accessible through the config system normally, through +the conf() action or the GUI (preferences dialog). From query(), it can +be referenced using the shorthand $min_dirll form. + + +

Rules

+

Text fields type, tilte and desc are optional user readable strings that will be presented in the DRC report. The type::title pair serves as an unique identifier for the rule. If optional disable is 'yes' or