Index: query/functions.html =================================================================== --- query/functions.html (nonexistent) +++ query/functions.html (revision 30428) @@ -0,0 +1,142 @@ + + + +

Query: advanced search, command line: function calls available

+ +

+Functions listed below can be called from a query expression. + +

llen(lst)

+

+Determine length of a list. +

+Arguments: +

+

+Return value: integer length of the list. + +

mklist(args...)

+

+Determine length of a list. +

+Arguments: +

+Variable number of objects. +

+Return value: a list built of the objects passed. + +

distance(x1, y1, x2, y2)

+

+Calculate the distance of two points. +

+Arguments: +

+

+Return value: floating point distance value in nanometers. + + +

violation(i1, v1, ..., iN, vN)

+

+Build a DRC violation report. +

+Arguments (a variable number of pairs of instruction and value): +

+

+Instruction is one of the following constants: +

+

+Return value: a list suitable for the drc_query to process. + +

netlist()

+

+Return the netlist. +

+Arguments: None. +

+Return value: an unordered list of all networks specified on the +edited netlist (which is the netlist the board is currently +using). Each item of the list is a net. + + +

netterms(net)

+

+Return terminals of a network. +

+Arguments: +

+

+Return value: an unordered list of objects (each terminal of the network +as described by the edited netlist). + + +

netobjs(net)

+

+Return terminals and all copper objects galvanically connected to a network. +

+Arguments: +

    +
  • net is a network of the netlist of the current board. +
+

+Return value: an unordered list of copper objects connected to the network. + + +

netsegs(net)

+

+Return a list of objects, one terminal object per disconnecte segment of +the network. +

+Arguments: +

    +
  • net is a network of the netlist of the current board. +
+

+Return value: an unordered list of terminal objects, one picked randomly +from each disconnected segment of the net. + + +

netbreak(obj, minimum_overlap)

+

+Start a search on a galvanically connected network segment starting from +an object (typically returned by netsegs()) and generate a DRC violation +if there are copper objects with overlap smaller than the minimum_overlap. +

+Arguments: +

    +
  • obj is the starting object of the search +
  • minimum_overlap is the coordinate value that represents the minimum required ovlerap between copper objects (e.g. 0.5mm) +
+

+Return value: a list that represents a DRC violation (or empty list). + +

netshort(obj, minimum_distance)

+

+Start a search on a galvanically connected network segment starting from +an object (typically returned by netsegs()) and generate a DRC violation +if there are disconnected copper objects with distance smaller than +the minimum_distance from the network. +

+Arguments: +

    +
  • obj is the starting object of the search +
  • minimum_distance is the coordinate value that represents the minimum required distance from any non-connected copper objects (e.g. 0.5mm) +
+

+Return value: a list that represents a DRC violation (or empty list).