Mail Archives: geda-user/2016/10/16/13:34:04
Hi all,
have you ever wanted to search for vias with hole too small or too large
in PCB? Or select all those tiny trace line segments that hide under smd
pads to delete them at once? Or find traces that differ from a given
thicnkess on your 50 Ohm impedance layer and change their thickness to
the right value in one go?
With pcb-rnd these are all possible now (available from svn, will be
included in the next release in early November).
The engine of the new feature is a query language where complex searches
can be specified using an expression. For example "traces shorter than 4
mm on any copper layer on the top side of the board" can be written as:
(@.length < 3 mm) && (@.layer.type == COPPER) && (@.layer.position == TOP)
An action is provided to evaluate expressions or select or unselect
objects matching the expression. This feature is accessible from all HIDs.
Query language tutorial:
http://repo.hu/projects/pcb-rnd/query/tutor_cli.html
To ease building expressions without learning the query language, the gtk
HID offers an Advanced search wizard dialog box where the user can build
an expression by selecting operators and operands from dynamic lists, as
demonstrated in the following videos:
https://archive.org/details/pcb_rnd_search_short_line
https://archive.org/details/pcb_rnd_search_thick_bottom
An example using the CLI action is also captured:
https://archive.org/details/search_top_U_elements
For modularity, the query language is implemented as an optional feature
plugin (enabled and static linked by default).
That's the present; but it has a future too. As of now, the query language
is a powerful search tool, but it is really just the first step of a
bigger plan: improving the DRC.
The query language is designed to be capable enough to serve as the
programmed DRC later. The DRC script would be a set of named queries
(consisting of multiple expressions). The DRC script would be generated by
the netlister. This would let the user specify complex requirements,
for example:
- star grounding
- "make sure this connector is near the board edge"
- "this digital IC should not be closer than 20 mm to this sensitive
analog circuit" (e.g. dist(U1, U2) > 20 mm)
- matched length pairs (e.g. abs(net1.length - net2.length) < 10 mm)
These requirements would be coming from attributes on the schematics. Then
the netlister would collect all these DRC-requirement attributes and
generate the DRC script (using templates) that would be imported
just like the netlist.
This means we could handle a lot of special cases via scripting - without
the schematics editor or the netlister or pcb-rnd's DRC having to have
custom heruistics hardwired for each case. Such DRC script templates could
be shared and collected in libraries like symbols or footprints.
Happy querying!
Best regards,
Igor2
- Raw text -