Index: trunk/doc/developer/lihata_board/render/html.awk =================================================================== --- trunk/doc/developer/lihata_board/render/html.awk (revision 16842) +++ trunk/doc/developer/lihata_board/render/html.awk (nonexistent) @@ -1,154 +0,0 @@ -function tbl_hdr(node, level) -{ - print " type:name value ver description" -} - -function get_name(node, ty, level) -{ - if (node "/name" in DATA) - nm = DATA[node "/name"] - else - nm = qstrip(NAME[node]) - if (ty != "") - nm = ty ":" nm - while(level > 0) { - nm = " " nm - level-- - } - return nm -} - -function get_valtype(node, vt) -{ - vt = DATA[node "/valtype"] - if (vt != "") - vt = "" vt "" - else - vt = " " - return vt -} - -function tbl_entry(node, level ,nm,vt,dsc,ty,vr) -{ - if (!(node in NAME)) { - print "Error: path not found: " node > "/dev/stderr" - return - } - ty = DATA[node "/type"] - nm = get_name(node, ty, level) - vt = get_valtype(node) - vr = DATA[node "/ver"] - if (vr == "") vr = " " - dsc = qstrip(DATA[node "/desc"]) - print " " nm " " vt " " vr " " dsc -} - -function tbl_entry_link(node, dst, level ,nm,vt,dsc,ty,vr) -{ - if (!(node in NAME)) { - print "Error: path not found: " node > "/dev/stderr" - return - } - if (!(dst in NAME)) { - print "Error: path not found: " dst > "/dev/stderr" - return - } - - ty = DATA[dst "/type"] - nm = get_name(node, ty, level) - vt = get_valtype(dst) - vr = DATA[dst "/ver"] - if (vr == "") vr = " " - dsc = qstrip(DATA[dst "/desc"]) - print " " nm " " vt " " vr " " dsc " -> " -} - -function gen_sub(root, level, v, n, N, node, dst_children) -{ - if (!(root in NAME)) { - print "Error: path not found: " root > "/dev/stderr" - return - } - v = children(N, root "/children") - for(n = 1; n <= v; n++) { - node = N[n] - if (TYPE[node] == "symlink") { - # normal node symlink: generate a link -# print "SY:" node " " DATA[node] "^^^" sy_is_recursive(node) > "/dev/stderr" - if (NAME[node] ~ "@dup") { - tbl_entry(DATA[node], level) - gen_sub(DATA[node], level+1) - } - else - tbl_entry_link(node, DATA[node], level) - } - else if ((node "/children") in NAME) { - tbl_entry(node, level) - if (TYPE[node "/children"] == "symlink") { - dst_children = DATA[node "/children"] - sub("/children$", "", dst_children) - gen_sub(dst_children, level+1) - } - else { - gen_sub(node, level+1) - } - } - else if (TYPE[node] == "hash") - tbl_entry(node, level) - else - print "Unhandled child (unknown type): " node > "/dev/stderr" - } -} - -function gen_main(path, v, n, N) -{ - print "

" DATA[path "/type"] ":" NAME[path] "

" -# print "

" -# print qstrip(DATA[path "/desc"]) - print "

" - print "" - tbl_hdr() - tbl_entry(path, 0) - gen_sub(path, 1) - print "
" -} - -function gen_roots(rpath, v, n, N) -{ - v = children(N, rpath) - for(n = 1; n <= v; n++) { - if (N[n] "/hide" in NAME) - continue - gen_main(N[n]) - } -} - -function gen_types(path, v, n, N, node) -{ - print "" - print "" - print "
type description" - - v = children(N, path) - for(n = 1; n <= v; n++) { - node = N[n] - print "
" NAME[node] - print " " qstripnl(DATA[node]) - } - print "
" -} - - -END { - print "

File format root nodes

" - print "

Each table below describes the full tree of one of the pcb-rnd file formats, from the root." - gen_roots("/lht_tree_doc/roots") - - print "

Common subtrees

" - print "

Each table below describes a subtree that usually does not specify a whole tree (thus they are usually not a valid file on their own). These subtrees are described in a separate table because they are used from multiple other trees." - gen_roots("/lht_tree_doc/comm") - - print "

Types

" - print "

" - gen_types("/lht_tree_doc/types") -} Index: trunk/doc/developer/lihata_board/render/lht.awk =================================================================== --- trunk/doc/developer/lihata_board/render/lht.awk (revision 16842) +++ trunk/doc/developer/lihata_board/render/lht.awk (nonexistent) @@ -1,62 +0,0 @@ -BEGIN { - q="\"" -} - -function parent(path) -{ - sub("/[^/]*$", "", path) - return path -} - -function children(DST, path) -{ - return split(CHILDREN[path], DST, "[|]") -} - -function sy_is_recursive(path, dp) -{ - dp = DATA[path] - gsub("/[0-9]::", "/", path) - if (path ~ dp) - rturn 1 - return 0 -} - -function sy_href(path) -{ - return "#" path -} - -(($1 == "open") || ($1 == "data")) { - path=$3 - gsub("[0-9]+::", "", path) - TYPE[path] = $2 - p = parent(path) - if (CHILDREN[p] == "") - CHILDREN[p] = path - else - CHILDREN[p] = CHILDREN[p] "|" path - data=$4 - gsub("\\\\057", "/", data) - DATA[path] = data - - name=$3 - sub("^.*/", "", name) - sub(".*::", "", name) - NAME[path] = name -} - -function qstrip(s) -{ - gsub("[\\\\]+164", " ", s) - gsub("[\\\\]n", " ", s) - return s -} - -function qstripnl(s) -{ - gsub("[\\\\]+164", " ", s) - gsub("[\\\\]n", "\n", s) - return s -} - Index: trunk/doc/developer/lihata_board/render/render.sh =================================================================== --- trunk/doc/developer/lihata_board/render/render.sh (revision 16842) +++ trunk/doc/developer/lihata_board/render/render.sh (nonexistent) @@ -1,16 +0,0 @@ -#!/bin/sh - -echo ' - - -' - -for n in ../*.lht -do - lhtflat < $n -done | tee Flat | awk -F "[\t]" -f lht.awk -f html.awk - -echo ' - - -' Property changes on: trunk/doc/developer/lihata_board/render/render.sh ___________________________________________________________________ Deleted: svn:executable ## -1 +0,0 ## -* \ No newline at end of property Index: trunk/doc/developer/lihata_board/render/gen_flags.sh =================================================================== --- trunk/doc/developer/lihata_board/render/gen_flags.sh (revision 16842) +++ trunk/doc/developer/lihata_board/render/gen_flags.sh (nonexistent) @@ -1,38 +0,0 @@ -../../../../src/pcb-rnd --dump-oflags | awk ' -BEGIN { - print "ha:lht_tree_doc { ha:comm {" -} - -function close_last() -{ - if (is_open) { - print " }" - print " }" - } - is_open = 0; -} - -/^[^\t]/ { - close_last() - print " ha:flags_" $1 " {" - print " hide=1" - print " desc={flag bits of a " $1 "}" - print " type=ha" - print " li:children {" - is_open=1 -} - -/^[\t]/ { - bit=$1 - name=$2 - help=$0 - sub("^[\t ]*" $1 "[\t ]*" $2 "[\t ]*", "", help) - print " ha:" name " { valtype=flag; desc={" help "}}" -} - -END { - close_last() - print "} }" -} - -' Property changes on: trunk/doc/developer/lihata_board/render/gen_flags.sh ___________________________________________________________________ Deleted: svn:executable ## -1 +0,0 ## -* \ No newline at end of property Index: trunk/doc/developer/lihata_board/root_font.lht =================================================================== --- trunk/doc/developer/lihata_board/root_font.lht (revision 16842) +++ trunk/doc/developer/lihata_board/root_font.lht (nonexistent) @@ -1,69 +0,0 @@ -ha:lht_tree_doc { ha:roots { - - ha:pcb-rnd-font-v1 { - type=li - desc={font description} - li:children { - ha:FONT-ID { - type=ha - li:name_patterns={p={geda_pcb}; p={[0-9]+}} - desc { the full description of a font; the node name is the integer font id or "geda_pcb" for font 0 (for historical reasons); the name is used only to make each node unique, the ID is also a field below } - li:children { - ha:cell_height { valtype=coord; desc={height of the tallest glyph}} - ha:cell_width { valtype=coord; desc={width of the widest glyph}} - ha:id { valtype=integer; desc={unique font ID within the fontkit; fonts are referenced by ID}} - ha:name { valtype=string; desc={user specified, user readable font name}} - ha:symbols { - type=ha - desc { a collections of glyphs availbale in the font } - li:children { - ha:CHARACTER { - type=ha - li:name_patterns={p={.}} - desc { Description of a glyph (symbol). Node name is a signel ASCII character or is of format &xx where xx is a hex digit of the ASCII code of the character. Characters that must use the hex version are: codes below 33 or over 126, &, #, {, \}, /, :, ;, =, \\, :} - li:children { - ha:height { valtype=coord; desc={height of the glyph}} - ha:width { valtype=coord; desc={width of the glyph}} - ha:delta { valtype=coord; desc={extra space always inserted after the current symbol, before the next character}} - ha:objects { - type=li - desc={objects that make up the symbol; IDs are per symbol local IDs counted from 0} - li:children { - ha:line.ID { - type=ha - desc={round cap line, simplified} - li:children { - ha:x1 = { valtype=coord; desc={line first endpoint, horizontal offset }} - ha:y1 = { valtype=coord; desc={line first endpoint, vertical offset }} - ha:x2 = { valtype=coord; desc={line second endpoint, horizontal offset }} - ha:y2 = { valtype=coord; desc={line second endpoint, vertical offset }} - ha:thickness = { valtype=coord; desc={width of the line }} - } - } - ha:simplearc.ID { - type=ha - desc={round cap arc, simplified } - li:children { - ha:x = { valtype=coord; desc={center, X coord}} - ha:y = { valtype=coord; desc={center, Y coord}} - ha:r = { valtype=coord; desc={radius (of the centerline of the arc) }} - ha:thickness = { valtype=coord; desc={width of the pen the arc is drawn with }} - ha:astart = { valtype=angle; desc={ start angle}} - ha:adelta = { valtype=angle; desc={ delta angle}} - } - } - ha:simplepoly.ID { - type=li - desc={round cap arc, simplified; contains a flat list of coords; each coord pair is an x;y corner of the outline of the polygon (odd indices are x coords, even indices are y coords) } - } - } - } - } - } - } - } - } - } - } - } -}} \ No newline at end of file Index: trunk/doc/developer/lihata_board/root_board.lht =================================================================== --- trunk/doc/developer/lihata_board/root_board.lht (revision 16842) +++ trunk/doc/developer/lihata_board/root_board.lht (nonexistent) @@ -1,181 +0,0 @@ -ha:lht_tree_doc { ha:roots { - - ha:pcb-rnd-board-v* { - type=ha - desc { - The full, self-contained description of a printed circuit board. - This is the root of a board .lht file. The * after the v in the name - is an integer which is the format version. - } - li:children { - ha:meta { - type=ha - desc { Any meta-data that won't directly turn into physical material (e.g. copper). } - li:children { - ha:board_name { valtype=string; desc={User assigned name of the board}} - ha:grid { - type=ha - desc { User interface last grid settings } - li:children { - ha:offs_x { valtype=coord; desc={grid origin: X offset from 0;0}} - ha:offs_y { valtype=coord; desc={grid origin: Y offset from 0;0}} - ha:spacing { valtype=coord; desc={distance between two grid points both in X and Y directions }} - } - } - ha:size { - type=ha - desc { object size related settings } - li:children { - ha:x { valtype=coord; desc={drawing area size X (width)}} - ha:y { valtype=coord; desc={drawing area size Y (height)}} - ha:isle_area_nm2 { valtype=double; desc={remove polygon islands smaller than this value, specified in mm2}} - ha:thermal_scale { valtype=double; desc={scale all thermals on the board by this factor}} - } - } - ha:drc { - type=ha - desc { design rule checker settings for the old DRC } - li:children { - ha:bloat { valtype=coord; desc={Minimum copper spacing}} - ha:shrink { valtype=coord; desc={Minimum overlap between validly touching copper objects}} - ha:min_width { valtype=coord; desc={Minimum copper width}} - ha:min_silk { valtype=coord; desc={Minimum silk width}} - ha:min_drill { valtype=coord; desc={Minimum drill diameter}} - ha:min_ring { valtype=coord; desc={Minimum annular ring width}} - } - } - ha:cursor { - type=ha - desc { obsolete cursor/view state } - li:children { - ha:x { valtype=coord; obs=1; desc={last positin, X (horizontal)}} - ha:y { valtype=coord; obs=1; desc={last positin, Y (horizontal)}} - ha:zoom { valtype=double; obs=1; desc={last view zoom factor}} - } - } - } - } - ha:layer_stack { - type=ha - desc { physical layer stack information: geometry and properties of physical layers } - li:children { - ha:groups { - type=li - desc { ordered list of physical layers from top to bottom } - li:children { - ha:INTEGER { - li:name_patterns={p={[0-9]+}} - type=ha - desc { a layer group (a physical layer of the board); the ID of the layer group is the integer in the name of the node } - li:children { - ha:name { valtype=string; desc={user assigned name of the layer group, e.g. "top copper"}} - ha:type { - type=ha - desc { a flag-list of layer type flag bits } - sy:children = {/lht_tree_doc/comm/layer_mask/children} - } - ha:layers { - type=li - desc { ordered list of logical layer IDs hosted by this layer group } - } - } - } - } - } - } - } - ha:font { - type=ha - desc { font kit: all fonts used on the board (if no font specified, default font will be used) } - li:children { - sy:FONT-ID {/lht_tree_doc/roots/pcb-rnd-font-v1/children/FONT-ID} - } - } - ha:styles { - type=ha - desc { routing styles hash: collection of all available routing syles } - ha:ROUTE-STYLE-NAME { - type=ha - desc { routing style: a collection of pen settings } - li:children { - ha:thickness { valtype=coord; desc={default trace thickness (affects lines and arcs)}} - ha:clearance { valtype=coord; desc={default clearance (affects lines, arcs and polygons)}} - ha:diameter { valtype=coord; ver={<=5} desc={old round via outer diameter; removed in favor of padstack prototype based vias, see via_proto}} - ha:hole { valtype=coord; ver={<=5} desc={old round via hole diameter; removed in favor of padstack prototype based vias, see via_proto}} - ha:via_proto { valtype=integer; ver={>5} desc={padstack prototype ID used for placing new vias}} - sy:attr@dup {/lht_tree_doc/comm/attributes} - } - } - } - ha:netlists { - type=ha - desc { all availale netlists } - li:children { - ha:netlist { - type=li - desc { the input netlist (as seen in the last netlist import, a.k.a. forward annotation) } - li:children { - ha:NETNAME { - type=ha - desc { a network } - li:children { - ha:conn { - type=li - desc { list of terminals connceted to the network } - li:children { - ha:diameter { valtype=string; desc={refdes-terminal}} - } - } - sy:attr@dup = {/lht_tree_doc/comm/attributes_v5p} - } - } - } - } - ha:netlist_patch { - type=li - desc { a list of intentional deviations from the input netlist, a.k.a. material for back annotation } - li:children { - ha:net_info { - type=li - desc { describe the current state of a net, as seen on the input } - li:children { - ha:net { valtype=string; desc={net name; first item on the list, only once}} - ha:term { valtype=string; desc={terminal name; zero or more items starting from the second item}} - } - } - ha:add_conn { - type=ha - desc { the 'as built' network requires a new conncetion to be created during the back annotation } - li:children { - ha:net { valtype=string; desc={net name the terminal should be added to}} - ha:term { valtype=string; desc={terminal name}} - } - } - ha:del_conn { - type=ha - desc { the 'as built' network requires an existing conncetion to be removed during the back annotation } - li:children { - ha:net { valtype=string; desc={net name the terminal should be removed from}} - ha:term { valtype=string; desc={terminal name}} - } - } - ha:change_attrib { - type=ha - desc { the 'as built' network requires an attribute to be set or changed } - li:children { - ha:net { valtype=string; desc={net name whose attribute needs to be changed }} - ha:key { valtype=string; desc={key (name) of the attribute}} - ha:val { valtype=string; desc={new value of the attribute}} - } - } - } - } - } - } - sy:conf = {/lht_tree_doc/roots/pcb-rnd-conf-v1} - sy:data = {/lht_tree_doc/comm/data} - sy:attributes@dup = {/lht_tree_doc/comm/attributes} - } - } - -}} Index: trunk/doc/developer/lihata_board/tree.html =================================================================== --- trunk/doc/developer/lihata_board/tree.html (revision 16842) +++ trunk/doc/developer/lihata_board/tree.html (nonexistent) @@ -1,554 +0,0 @@ - - - - -

File format root nodes

-

Each table below describes the full tree of one of the pcb-rnd file formats, from the root. -

ha:pcb-rnd-board-v*

-

- -
type:name value ver description -
ha:pcb-rnd-board-v*     The full, self-contained description of a printed circuit board. This is the root of a board .lht file. The * after the v in the name is an integer which is the format version. -
 ha:meta     Any meta-data that won't directly turn into physical material (e.g. copper). -
  board_name string   User assigned name of the board -
  ha:grid     User interface last grid settings -
   offs_x coord   grid origin: X offset from 0;0 -
   offs_y coord   grid origin: Y offset from 0;0 -
   spacing coord   distance between two grid points both in X and Y directions -
  ha:size     object size related settings -
   x coord   drawing area size X (width) -
   y coord   drawing area size Y (height) -
   isle_area_nm2 double   remove polygon islands smaller than this value, specified in mm2 -
   thermal_scale double   scale all thermals on the board by this factor -
  ha:drc     design rule checker settings for the old DRC -
   bloat coord   Minimum copper spacing -
   shrink coord   Minimum overlap between validly touching copper objects -
   min_width coord   Minimum copper width -
   min_silk coord   Minimum silk width -
   min_drill coord   Minimum drill diameter -
   min_ring coord   Minimum annular ring width -
  ha:cursor     obsolete cursor/view state -
   x coord   last positin, X (horizontal) -
   y coord   last positin, Y (horizontal) -
   zoom double   last view zoom factor -
 ha:layer_stack     physical layer stack information: geometry and properties of physical layers -
  li:groups     ordered list of physical layers from top to bottom -
   ha:INTEGER     a layer group (a physical layer of the board); the ID of the layer group is the integer in the name of the node -
    name string   user assigned name of the layer group, e.g. "top copper" -
    ha:type     a flag-list of layer type flag bits -
     top flag   location: top side -
     bottom flag   location: bottom side -
     intern flag   location: internal -
     logical flag   location: logical (not in the actual stackup) -
     copper flag   material: copper -
     silk flag   material: silk -
     mask flag   material: mask -
     paste flag   material: paste -
     outline flag   "material": router path (board outline, slots, cutouts) -
     substrate flag   material: substrate or insulator -
    li:layers     ordered list of logical layer IDs hosted by this layer group -
 ha:font     font kit: all fonts used on the board (if no font specified, default font will be used) -
  ha:FONT-ID     the full description of a font; the node name is the integer font id or "geda_pcb" for font 0 (for historical reasons); the name is used only to make each node unique, the ID is also a field below -> -
 ha:styles     routing styles hash: collection of all available routing syles -
 ha:netlists     all availale netlists -
  li:netlist     the input netlist (as seen in the last netlist import, a.k.a. forward annotation) -
   ha:NETNAME     a network -
    li:conn     list of terminals connceted to the network -
     diameter string   refdes-terminal -
    ha:attributes   >=5 a hash of attribute key=value pairs -
     attrib-key string   attribute value -
  li:netlist_patch     a list of intentional deviations from the input netlist, a.k.a. material for back annotation -
   li:net_info     describe the current state of a net, as seen on the input -
    net string   net name; first item on the list, only once -
    term string   terminal name; zero or more items starting from the second item -
   ha:add_conn     the 'as built' network requires a new conncetion to be created during the back annotation -
    net string   net name the terminal should be added to -
    term string   terminal name -
   ha:del_conn     the 'as built' network requires an existing conncetion to be removed during the back annotation -
    net string   net name the terminal should be removed from -
    term string   terminal name -
   ha:change_attrib     the 'as built' network requires an attribute to be set or changed -
    net string   net name whose attribute needs to be changed -
    key string   key (name) of the attribute -
    val string   new value of the attribute -
 li:conf     complete pcb-rnd configuration tree -> -
 ha:data     Layers and global objects of the board -> -
 ha:attributes     a hash of attribute key=value pairs -
  attrib-key string   attribute value -
-

li:pcb-rnd-conf-v1

-

- -
type:name value ver description -
li:pcb-rnd-conf-v1     complete pcb-rnd configuration tree -
 ha:overwrite     overwrite values while merging; children: a full or partial config tree -
 ha:prepend     prepend values while merging; children: a full or partial config tree -
 ha:append     append values while merging; children: a full or partial config tree -
-

li:pcb-rnd-font-v1

-

- -
type:name value ver description -
li:pcb-rnd-font-v1     font description -
 ha:FONT-ID     the full description of a font; the node name is the integer font id or "geda_pcb" for font 0 (for historical reasons); the name is used only to make each node unique, the ID is also a field below -
  cell_height coord   height of the tallest glyph -
  cell_width coord   width of the widest glyph -
  id integer   unique font ID within the fontkit; fonts are referenced by ID -
  name string   user specified, user readable font name -
  ha:symbols     a collections of glyphs availbale in the font -
   ha:CHARACTER     Description of a glyph (symbol). Node name is a signel ASCII character or is of format &xx where xx is a hex digit of the ASCII code of the character. Characters that must use the hex version are: codes below 33 or over 126, &, #, {, }, /, :, ;, =, \, : -
    height coord   height of the glyph -
    width coord   width of the glyph -
    delta coord   extra space always inserted after the current symbol, before the next character -
    li:objects     objects that make up the symbol; IDs are per symbol local IDs counted from 0 -
     ha:line.ID     round cap line, simplified -
      x1 coord   line first endpoint, horizontal offset -
      y1 coord   line first endpoint, vertical offset -
      x2 coord   line second endpoint, horizontal offset -
      y2 coord   line second endpoint, vertical offset -
      thickness coord   width of the line -
     ha:simplearc.ID     round cap arc, simplified -
      x coord   center, X coord -
      y coord   center, Y coord -
      r coord   radius (of the centerline of the arc) -
      thickness coord   width of the pen the arc is drawn with -
      astart angle   start angle -
      adelta angle   delta angle -
     li:simplepoly.ID     round cap arc, simplified; contains a flat list of coords; each coord pair is an x;y corner of the outline of the polygon (odd indices are x coords, even indices are y coords) -
-

li:pcb-rnd-subcircuit-v*

-

- -
type:name value ver description -
li:pcb-rnd-subcircuit-v*     footprint file containing a single subcircuit -
 ha:subc.ID   >=3 an instance (full copy) of a subcircuit -
  uid minuid   UID assigned by the user to track subc history -
  ha:attributes     a hash of attribute key=value pairs -
   attrib-key string   attribute value -
  ha:flags_subcircuit     flag bits of a subcircuit -
   found flag   If set, this object has been found by FindConnection() -
   selected flag   Set when the object is selected. -
   auto flag   For lines and vias, indicates that these were created by the autorouter. -
   drc flag   Set for objects that fail DRC: flag like FOUND flag for DRC checking. -
   lock flag   Set for locked objects. -
   nonetlist flag   subcircuit is not on the netlist and should not interfere with the netlist -
   termname flag   when set the names of pins are shown. -
   floater flag   subc part can be moved after subc placing -
  ha:data     Layers and global objects of the board -> -
-

Common subtrees

-

Each table below describes a subtree that usually does not specify a whole tree (thus they are usually not a valid file on their own). These subtrees are described in a separate table because they are used from multiple other trees. -

ha:data

-

- -
type:name value ver description -
ha:data     Layers and global objects of the board -
 li:objects     List of global (non-layer/multi-layer) objects -
  ha:padstack_ref.ID   >=4 a padstack reference (instance) placed on the board (e.g. used as a via) -
   proto integer   padstack prototype ID to use, from the parent data's proto list -
   x coord   place padstack with origin at this horizontal coordinate -
   y coord   place padstack with origin at this vertical coordinate -
   clearance coord   global clearance; if non-zero, overrides local (per shape) clearance -
   rot angle   rotation angle in degrees -
   xmirror integer   0 or 1; if 1, mirror all shapes over the x (horizontal) axis (so that y coords are flipped) -
   smirror integer   0 or 1; if 1, mirror the layer stackup: bottom becomes top, top becomes bottom (a.k.a. "place on the other side") -
   ha:attributes     a hash of attribute key=value pairs -
    attrib-key string   attribute value -
   ha:flags_padstack     flag bits of a padstack -
    found flag   If set, this object has been found by FindConnection() -
    hole flag   For pins and vias, this flag means that the pin or via is a hole without a copper annulus. -
    clearline flag   For lines and arcs, the line/arc will clear polygons instead of connecting to them. -
    selected flag   Set when the object is selected. -
    auto flag   For lines and vias, indicates that these were created by the autorouter. -
    warn flag   For pins, vias, and pads, set to indicate a warning. -
    usetherm flag   Obsolete, indicates that pins/vias should be drawn with thermal fingers. -
    drc flag   Set for objects that fail DRC: flag like FOUND flag for DRC checking. -
    lock flag   Set for locked objects. -
    nonetlist flag   subcircuit is not on the netlist and should not interfere with the netlist -
    termname flag   when set the names of pins are shown. -
    floater flag   subc part can be moved after subc placing -
   li:thermal     list of thermal shapes, per layer -
    li:LAYERID     integer layer ID the thermal affects; each word is a boolean flag that is either present on the list or is missing; only one shape may be present -
     on none   thermal is present on this layer; if not present, all other thermal flags are ignored on this layer -
     diag none   thermal graphics is not axis aligned but diagonal (rotated by 45 degrees) -
     round none   shape: rounded edge fingers -
     sharp none   shape: sharp edge fingers -
     solid none   shape: no thermal relief, solid connection without clearance -
     noshape none   shape: special: omit copper shape of the padstack on this layer -
  ha:via.ID   <=4 an old via object (loaded as padstack in the new model) -
   x coord   place padstack with origin at this horizontal coordinate -
   y coord   place padstack with origin at this vertical coordinate -
   thickness coord   copper shape dimension (diameter) -
   clearance coord   copper clearance around the copper shape -
   mask coord   mask cutout shape dimension (diameter) -
   hole coord   drill/hole diameter -
   name string   optional name attribute -
   number string   for a pin (or to-be-pin) this is the terminal ID -
   ha:attributes     a hash of attribute key=value pairs -
    attrib-key string   attribute value -
   ha:flags_pinvia     flag bits of a pin or via -
    found flag   If set, this object has been found by FindConnection() -
    hole flag   For pins and vias, this flag means that the pin or via is a hole without a copper annulus. -
    clearline flag   For lines and arcs, the line/arc will clear polygons instead of connecting to them. -
    selected flag   Set when the object is selected. -
    auto flag   For lines and vias, indicates that these were created by the autorouter. -
    warn flag   For pins, vias, and pads, set to indicate a warning. -
    usetherm flag   Obsolete, indicates that pins/vias should be drawn with thermal fingers. -
    drc flag   Set for objects that fail DRC: flag like FOUND flag for DRC checking. -
    lock flag   Set for locked objects. -
    nonetlist flag   subcircuit is not on the netlist and should not interfere with the netlist -
    termname flag   when set the names of pins are shown. -
    floater flag   subc part can be moved after subc placing -
    pin flag   object is a pin (in an element) -
    via flag   object is a via -
 li:layers     ordered list of layers; v1 required the order to be top-bottom physically; v1 also required silk layers to be at the end (same resrtictions as in the old .pcb format; only real (non-bound) layers have attributes) -
  ha:NAME     a logical layer -
   lid integer >=2 layer ID -
   visible integer   only in real (non-boud) layers: 1 if the layer is visible, 0 if not (UI setting) -
   group integer   only in real (non-boud) layers: "parent" layer group ID -
   color string >=5 layer color on UI, in #rrggbb format -
   stack_offs integer   only in bound layers: match offset e.g. for internal copper layers -
   ha:type     only for bound layers: try to bind to this type of layer on the host board -
    top flag   location: top side -
    bottom flag   location: bottom side -
    intern flag   location: internal -
    logical flag   location: logical (not in the actual stackup) -
    copper flag   material: copper -
    silk flag   material: silk -
    mask flag   material: mask -
    paste flag   material: paste -
    outline flag   "material": router path (board outline, slots, cutouts) -
    substrate flag   material: substrate or insulator -
   combining   >=2 layer combination (compositing) flags -
    sub flag   draw in negative -
    auto flag   padstacks draw their paste, mask and silk objects on the first layer (of matching type) that features the auto flag -
   ha:attributes     a hash of attribute key=value pairs -
    attrib-key string   attribute value -
   li:objects     list of drawing primitives put on this layer -
    ha:line.ID     round cap line -
     x1 coord   line first endpoint, horizontal offset -
     y1 coord   line first endpoint, vertical offset -
     x2 coord   line second endpoint, horizontal offset -
     y2 coord   line second endpoint, vertical offset -
     thickness coord   width of the line -
     clearance coord   copper clearance around the object -
     ha:attributes     a hash of attribute key=value pairs -
      attrib-key string   attribute value -
     ha:flags_line     flag bits of a line -
      found flag   If set, this object has been found by FindConnection() -
      clearline flag   For lines and arcs, the line/arc will clear polygons instead of connecting to them. -
      selected flag   Set when the object is selected. -
      auto flag   For lines and vias, indicates that these were created by the autorouter. -
      rubberend flag   For lines, used internally for rubber band moves: indicates one end already rubber banding. -
      usetherm flag   Obsolete, indicates that pins/vias should be drawn with thermal fingers. -
      drc flag   Set for objects that fail DRC: flag like FOUND flag for DRC checking. -
      lock flag   Set for locked objects. -
      nonetlist flag   subcircuit is not on the netlist and should not interfere with the netlist -
      termname flag   when set the names of pins are shown. -
      floater flag   subc part can be moved after subc placing -
     li:thermal     list of thermal flags for heavy terminals, on the single layer the object is on -
      on none   draw any thermal only if this string is present; else normal clearance is applied -
      diag none   if present, the thermal is diagonal (45 degree rotated) -
      round none   if present, thermal shape is rounded -
      sharp none   if present, thermal shape is sharp -
      solid none   if present, there is no thermal but a solid connection ("join") -
    ha:arc.ID     round cap elliptic arc (only width==height is fully supported at the moment) -
     x coord   center, X coord -
     y coord   center, Y coord -
     width coord   radius (of the centerline of the arc) in X direction -
     height coord   radius (of the centerline of the arc) in Y direction -
     thickness coord   width of the pen the arc is drawn with -
     clearance coord   copper clearance around the object -
     astart angle   start angle -
     adelta angle   delta angle -
     ha:attributes     a hash of attribute key=value pairs -
      attrib-key string   attribute value -
     ha:flags_arc     flag bits of a arc -
      found flag   If set, this object has been found by FindConnection() -
      clearline flag   For lines and arcs, the line/arc will clear polygons instead of connecting to them. -
      selected flag   Set when the object is selected. -
      auto flag   For lines and vias, indicates that these were created by the autorouter. -
      rubberend flag   For lines, used internally for rubber band moves: indicates one end already rubber banding. -
      usetherm flag   Obsolete, indicates that pins/vias should be drawn with thermal fingers. -
      drc flag   Set for objects that fail DRC: flag like FOUND flag for DRC checking. -
      lock flag   Set for locked objects. -
      nonetlist flag   subcircuit is not on the netlist and should not interfere with the netlist -
      termname flag   when set the names of pins are shown. -
      floater flag   subc part can be moved after subc placing -
     li:thermal     list of thermal flags for heavy terminals, on the single layer the object is on -
      on none   draw any thermal only if this string is present; else normal clearance is applied -
      diag none   if present, the thermal is diagonal (45 degree rotated) -
      round none   if present, thermal shape is rounded -
      sharp none   if present, thermal shape is sharp -
      solid none   if present, there is no thermal but a solid connection ("join") -
    ha:polygon.ID     polygon, as drawn (unclipped) -
     clearance coord >=3 copper clearance around the object -
     ha:attributes     a hash of attribute key=value pairs -
      attrib-key string   attribute value -
     ha:flags_polygon     flag bits of a polygon -
      found flag   If set, this object has been found by FindConnection() -
      clearpoly flag   For polygons, this flag means that pins and vias will normally clear these polygons (thus, thermals are required for electrical connection). When clear, polygons will solidly connect to pins and vias. -
      fullpoly flag   For polygons, the full polygon is drawn (i.e. all parts instead of only the biggest one). -
      selected flag   Set when the object is selected. -
      auto flag   For lines and vias, indicates that these were created by the autorouter. -
      drc flag   Set for objects that fail DRC: flag like FOUND flag for DRC checking. -
      lock flag   Set for locked objects. -
      nonetlist flag   subcircuit is not on the netlist and should not interfere with the netlist -
      termname flag   when set the names of pins are shown. -
      clearpolypoly flag   For polygons, apply clearance to nearby polygons -
      floater flag   subc part can be moved after subc placing -
     li:thermal     list of thermal flags for heavy terminals, on the single layer the object is on -
      on none   draw any thermal only if this string is present; else normal clearance is applied -
      diag none   if present, the thermal is diagonal (45 degree rotated) -
      round none   if present, thermal shape is rounded -
      sharp none   if present, thermal shape is sharp -
      solid none   if present, there is no thermal but a solid connection ("join") -
     li:geometry     first item is the outer contour, subsequent, optional items are holes -
      contour coordtbl   2 column table of x;y coords for the outer contour -
      hole coordtbl   2 column table of x;y coords for a hole -
    ha:text.ID     single line text object -
     x coord   placement: X coord -
     y coord   placement: Y coord -
     role string   when part of an old element, determines which of the three hardwired text object role is used (footprint, refdes or value) -
     string string   text string (payload) -
     fid integer   font ID -
     scale integer   text size scale in % -
     direction integer   rotation in 90 degree steps (0 is horizontal) -
     ha:attributes     a hash of attribute key=value pairs -
      attrib-key string   attribute value -
     ha:flags_text     flag bits of a text -
      found flag   If set, this object has been found by FindConnection() -
      clearline flag   For lines and arcs, the line/arc will clear polygons instead of connecting to them. -
      selected flag   Set when the object is selected. -
      onsolder flag   For text, indicates that it is on the solder side. -
      auto flag   For lines and vias, indicates that these were created by the autorouter. -
      drc flag   Set for objects that fail DRC: flag like FOUND flag for DRC checking. -
      lock flag   Set for locked objects. -
      nonetlist flag   subcircuit is not on the netlist and should not interfere with the netlist -
      termname flag   when set the names of pins are shown. -
      dyntext flag   For text: dynamic string (substitute %patterns%) -
      floater flag   subc part can be moved after subc placing -
 li:padstack_prototypes   >=4 -
  unused none   placeholder for markign uunsed slot to keep slot indices for early lihata v4 -
  ha:ps_proto_v4.PID     padstack prototype specification, as introduced in lihata board v4 -
   hdia coord   hole diameter; 0 means no hole -
   htop integer   hole start: copper layer index from the top (positive) or bottom (negative) copper layer (0 means top copper layer) -
   hbottom integer   hole start: copper layer index from the bottom (positive) or top (negative) copper layer (0 means bottom copper layer) -
   plated integer   0=unplated hole; 1=plated hole -
   name string >=5 optional user assigned prototype name -
   li:shape     shape per layer type definition -
    ha:ps_shape_v4     shape on a specific layer type (specified by layer_mask and combining), as specifie in lihata board v4; shape is either ps_poly, ps_line or ps_circ (only one of these will present per layer type); shape coords are relative to padstack origin -
     ha:layer_mask     layer type and location -
      top flag   location: top side -
      bottom flag   location: bottom side -
      intern flag   location: internal -
      logical flag   location: logical (not in the actual stackup) -
      copper flag   material: copper -
      silk flag   material: silk -
      mask flag   material: mask -
      paste flag   material: paste -
      outline flag   "material": router path (board outline, slots, cutouts) -
      substrate flag   material: substrate or insulator -
     combining     layer compositing match -
      sub flag   draw in negative -
      auto flag   padstacks draw their paste, mask and silk objects on the first layer (of matching type) that features the auto flag -
     clearance coord   local, per-layer-type clearance; applied if global padstack clearance is 0 -
     li:ps_poly     arbitrary convex polygon shape; contains a list of x;y coordinates -
     ha:ps_line     straight line shape, round or square cap -
      x1 coord   line first endpoint, horizontal offset -
      y1 coord   line first endpoint, vertical offset -
      x2 coord   line second endpoint, horizontal offset -
      y2 coord   line second endpoint, vertical offset -
      thickness coord   width of the line -
      square integer   0=round cap; 1=square cap -
     ha:ps_circ     filled circle shape -
      x coord   center, horizontal offset -
      y coord   center, vertical offset -
      dia coord   circle diameter -
 ha:subc.ID   >=3 an instance (full copy) of a subcircuit -
  uid minuid   UID assigned by the user to track subc history -
  ha:attributes     a hash of attribute key=value pairs -
   attrib-key string   attribute value -
  ha:flags_subcircuit     flag bits of a subcircuit -
   found flag   If set, this object has been found by FindConnection() -
   selected flag   Set when the object is selected. -
   auto flag   For lines and vias, indicates that these were created by the autorouter. -
   drc flag   Set for objects that fail DRC: flag like FOUND flag for DRC checking. -
   lock flag   Set for locked objects. -
   nonetlist flag   subcircuit is not on the netlist and should not interfere with the netlist -
   termname flag   when set the names of pins are shown. -
   floater flag   subc part can be moved after subc placing -
  ha:data     Layers and global objects of the board -> -
 ha:element.ID   <3 an instance (full copy) of an obsolete element footprint -
  x coord   element origin (diamond), horizontal offset -
  y coord   element origin (diamond), vertical offset -
  ha:attributes     a hash of attribute key=value pairs -
   attrib-key string   attribute value -
  ha:flags_element     flag bits of an element -
   found flag   If set, this object has been found by FindConnection() -
   selected flag   Set when the object is selected. -
   auto flag   For lines and vias, indicates that these were created by the autorouter. -
   drc flag   Set for objects that fail DRC: flag like FOUND flag for DRC checking. -
   lock flag   Set for locked objects. -
   nonetlist flag   subcircuit is not on the netlist and should not interfere with the netlist -
   termname flag   when set the names of pins are shown. -
   floater flag   subc part can be moved after subc placing -
   onsolder flag   element is placed on the solder side -
  li:objects     list of special objects that make up the element; lines and arcs are always on a silk layer -
   ha:line.ID     round cap line -> -
   ha:arc.ID     round cap elliptic arc (only width==height is fully supported at the moment) -> -
   ha:text.ID     single line text object -> -
   ha:pad.ID     SMD pad emulated using a line object; becomes a rectangle (but watch out for the cap-extended length!) when the square flag is set -
    x1 coord   line first endpoint, horizontal offset -
    y1 coord   line first endpoint, vertical offset -
    x2 coord   line second endpoint, horizontal offset -
    y2 coord   line second endpoint, vertical offset -
    thickness coord   width of the line -
    clearance coord   clearance around the line -
    mask coord   size of the mask cutout, as interpreted by gEDA/PCB -
    name string   symbolic name of the pad -
    number string   "pin number" for the netlist -
    ha:attributes     a hash of attribute key=value pairs -
     attrib-key string   attribute value -
    ha:flags_pad     flag bits of a pad -
     found flag   If set, this object has been found by FindConnection() -
     hole flag   For pins and vias, this flag means that the pin or via is a hole without a copper annulus. -
     clearline flag   For lines and arcs, the line/arc will clear polygons instead of connecting to them. -
     selected flag   Set when the object is selected. -
     auto flag   For lines and vias, indicates that these were created by the autorouter. -
     warn flag   For pins, vias, and pads, set to indicate a warning. -
     usetherm flag   Obsolete, indicates that pins/vias should be drawn with thermal fingers. -
     drc flag   Set for objects that fail DRC: flag like FOUND flag for DRC checking. -
     lock flag   Set for locked objects. -
     nonetlist flag   subcircuit is not on the netlist and should not interfere with the netlist -
     termname flag   when set the names of pins are shown. -
     floater flag   subc part can be moved after subc placing -
     pin flag   object is a pin (in an element) -
     via flag   object is a via -
   ha:pin.ID     thru-hole pin; emulated as an old-style via -
    x coord   place padstack with origin at this horizontal coordinate -
    y coord   place padstack with origin at this vertical coordinate -
    thickness coord   copper shape dimension (diameter) -
    clearance coord   copper clearance around the copper shape -
    mask coord   mask cutout shape dimension (diameter) -
    hole coord   drill/hole diameter -
    name string   optional name attribute -
    number string   for a pin (or to-be-pin) this is the terminal ID -
    ha:attributes     a hash of attribute key=value pairs -
     attrib-key string   attribute value -
    ha:flags_pinvia     flag bits of a pin or via -
     found flag   If set, this object has been found by FindConnection() -
     hole flag   For pins and vias, this flag means that the pin or via is a hole without a copper annulus. -
     clearline flag   For lines and arcs, the line/arc will clear polygons instead of connecting to them. -
     selected flag   Set when the object is selected. -
     auto flag   For lines and vias, indicates that these were created by the autorouter. -
     warn flag   For pins, vias, and pads, set to indicate a warning. -
     usetherm flag   Obsolete, indicates that pins/vias should be drawn with thermal fingers. -
     drc flag   Set for objects that fail DRC: flag like FOUND flag for DRC checking. -
     lock flag   Set for locked objects. -
     nonetlist flag   subcircuit is not on the netlist and should not interfere with the netlist -
     termname flag   when set the names of pins are shown. -
     floater flag   subc part can be moved after subc placing -
     pin flag   object is a pin (in an element) -
     via flag   object is a via -
 ha:rat.ID     global rat line -
  x1 coord   line first endpoint, horizontal offset -
  y1 coord   line first endpoint, vertical offset -
  x2 coord   line second endpoint, horizontal offset -
  y2 coord   line second endpoint, vertical offset -
  lgrp1 integer   first endpoint's layer group ID -
  lgrp2 integer   second endpoint's layer group ID -
  ha:attributes     a hash of attribute key=value pairs -
   attrib-key string   attribute value -
  ha:flags_line     flag bits of a line -
   found flag   If set, this object has been found by FindConnection() -
   clearline flag   For lines and arcs, the line/arc will clear polygons instead of connecting to them. -
   selected flag   Set when the object is selected. -
   auto flag   For lines and vias, indicates that these were created by the autorouter. -
   rubberend flag   For lines, used internally for rubber band moves: indicates one end already rubber banding. -
   usetherm flag   Obsolete, indicates that pins/vias should be drawn with thermal fingers. -
   drc flag   Set for objects that fail DRC: flag like FOUND flag for DRC checking. -
   lock flag   Set for locked objects. -
   nonetlist flag   subcircuit is not on the netlist and should not interfere with the netlist -
   termname flag   when set the names of pins are shown. -
   floater flag   subc part can be moved after subc placing -
-

Types

-

- - - - - - - - - - -
type description -
angle - - A decimal number without unit, representing an angle in degree. Can - be positive or negative. - -
coord - - A decimal number with a unit suffix. If the unit suffix is missing, - the coordinate is loaded in the internal units (which is nanometer as of 2018, - but could change in the future, thus files shall not depend on it). Depending - on the context, coordinates may have a sign (positive or negative). -

- Examples: -

-x=10mil;
-y=1.5mm;
-dia=12cm;
-
- -
coordtbl - - A two-column table of coords. First column are X, second column are Y - coordinates. -

- Examples: -

-ta:contour {
- 1mm;   2.1mm;
- 5mm;   5.2mm;
- 3.7mm; 12mil;
-}
-ta:foo = { 1mm; 2.1mm;  5mm;   5.2mm;  3.7mm; 12mil; }
-
- -
double - - Unitless numeric value in decimal format. Depending on context it is - sometimes signed. - -
flag - - If the flag is set, the value is "1", if the flag is not set, the - whole key=value pair is omitted. - -
integer - - Unitless integer value in decimal format. Depending on context it is - sometimes signed. - -
minuid - - An unique ID as generated by libminuid (24 ASCII characters). - -
none - - No value. - -
string - - Free form text data - -
- - - - Index: trunk/doc/developer/lihata_board/root_subc.lht =================================================================== --- trunk/doc/developer/lihata_board/root_subc.lht (revision 16842) +++ trunk/doc/developer/lihata_board/root_subc.lht (nonexistent) @@ -1,20 +0,0 @@ -ha:lht_tree_doc { ha:roots { - - ha:pcb-rnd-subcircuit-v* { - type=li - desc={footprint file containing a single subcircuit} - li:children { - ha:subc.ID { - type=ha - desc={an instance (full copy) of a subcircuit} - ver = {>=3} - li:children { - ha:uid = { valtype=minuid; desc={UID assigned by the user to track subc history }} - sy:attr@dup = {/lht_tree_doc/comm/attributes} - sy:flags@dup = {/lht_tree_doc/comm/flags_subcircuit} - sy:data = {/lht_tree_doc/comm/data} - } - } - } - } -}} \ No newline at end of file Index: trunk/doc/developer/lihata_board/comm_lyt.lht =================================================================== --- trunk/doc/developer/lihata_board/comm_lyt.lht (revision 16842) +++ trunk/doc/developer/lihata_board/comm_lyt.lht (nonexistent) @@ -1,39 +0,0 @@ -ha:lht_tree_doc { ha:comm { - - ha:layer_mask { - hide=1 - type=ha - desc={layer type and location} - li:children { - ha:top { valtype=flag; desc={location: top side}} - ha:bottom { valtype=flag; desc={location: bottom side}} - ha:intern { valtype=flag; desc={location: internal}} - ha:logical { valtype=flag; desc={location: logical (not in the actual stackup)}} - ha:copper { valtype=flag; desc={material: copper}} - ha:silk { valtype=flag; desc={material: silk}} - ha:mask { valtype=flag; desc={material: mask}} - ha:paste { valtype=flag; desc={material: paste}} - ha:outline { valtype=flag; desc={"material": router path (board outline, slots, cutouts) }} - ha:substrate { valtype=flag; desc={material: substrate or insulator}} - -# ha:rat { valtype=flag; desc={(virtual: rat lines)}} -# ha:invis { valtype=flag; desc={(virtual: invisible)}} -# ha:assy { valtype=flag; desc={(virtual: assembly drawing)}} -# ha:fab { valtype=flag; desc={(virtual: fab drawing)}} -# ha:plateddrill { valtype=flag; desc={(drills: plated)}} -# ha:unplateddrill { valtype=flag; desc={(drills: unplated)}} -# ha:cross-section { valtype=flag; desc={(virtual: cross section drawing)}} -# ha:misc { valtype=flag; desc={(virtual: virtual misc layer)}} -# ha:virtual { valtype=flag; desc={(if set, the layer is not a physical layer but a drawing or documentation)}} - } - } - - ha:combining { - hide=1 - li:children { - ha:sub { valtype=flag; desc={draw in negative}} - ha:auto { valtype=flag; desc={padstacks draw their paste, mask and silk objects on the first layer (of matching type) that features the auto flag}} - } - } - -}} Index: trunk/doc/developer/lihata_board/comm_attribs.lht =================================================================== --- trunk/doc/developer/lihata_board/comm_attribs.lht (revision 16842) +++ trunk/doc/developer/lihata_board/comm_attribs.lht (nonexistent) @@ -1,22 +0,0 @@ -ha:lht_tree_doc { ha:comm { - - ha:attributes { - type=ha - hide=1 - desc { a hash of attribute key=value pairs } - li:children { - ha:attrib-key { valtype=string; desc={attribute value}} - } - } - ha:attributes_v5p { - name=attributes - hide=1 - type=ha - desc { a hash of attribute key=value pairs } - ver={>=5} - li:children { - ha:attrib-key { valtype=string; desc={attribute value}} - } - } - -}} Index: trunk/doc/developer/lihata_board/comm_data.lht =================================================================== --- trunk/doc/developer/lihata_board/comm_data.lht (revision 16842) +++ trunk/doc/developer/lihata_board/comm_data.lht (nonexistent) @@ -1,284 +0,0 @@ -ha:lht_tree_doc { ha:comm { - - ha:data { - type=ha - desc { Layers and global objects of the board } - li:children { - ha:objects { - type=li - desc { List of global (non-layer/multi-layer) objects } - li:children { - ha:padstack_ref.ID { - type=ha - ver={>=4} - desc { a padstack reference (instance) placed on the board (e.g. used as a via) } - li:children { - ha:proto = { valtype=integer; desc={padstack prototype ID to use, from the parent data's proto list }} - ha:x = { valtype=coord; desc={place padstack with origin at this horizontal coordinate }} - ha:y = { valtype=coord; desc={place padstack with origin at this vertical coordinate }} - ha:clearance = { valtype=coord; desc={global clearance; if non-zero, overrides local (per shape) clearance }} - ha:rot = { valtype=angle; desc={rotation angle in degrees }} - ha:xmirror = { valtype=integer; desc={0 or 1; if 1, mirror all shapes over the x (horizontal) axis (so that y coords are flipped)}} - ha:smirror = { valtype=integer; desc={0 or 1; if 1, mirror the layer stackup: bottom becomes top, top becomes bottom (a.k.a. "place on the other side")}} - sy:attr@dup = {/lht_tree_doc/comm/attributes} - sy:flags@dup = {/lht_tree_doc/comm/flags_padstack} - ha:thermal { - type=li - desc { list of thermal shapes, per layer } - li:children { - ha:LAYERID { - type=li - desc { integer layer ID the thermal affects; each word is a boolean flag that is either present on the list or is missing; only one shape may be present } - li:children { - ha:on = { valtype=none; desc={ thermal is present on this layer; if not present, all other thermal flags are ignored on this layer }} - ha:diag = { valtype=none; desc={ thermal graphics is not axis aligned but diagonal (rotated by 45 degrees) }} - ha:round = { valtype=none; desc={ shape: rounded edge fingers }} - ha:sharp = { valtype=none; desc={ shape: sharp edge fingers }} - ha:solid = { valtype=none; desc={ shape: no thermal relief, solid connection without clearance }} - ha:noshape = { valtype=none; desc={ shape: special: omit copper shape of the padstack on this layer }} - } - } - } - } - } - } - ha:via.ID { - type=ha - ver={<=4} - desc { an old via object (loaded as padstack in the new model) } - li:children { - ha:x = { valtype=coord; desc={place padstack with origin at this horizontal coordinate }} - ha:y = { valtype=coord; desc={place padstack with origin at this vertical coordinate }} - ha:thickness = { valtype=coord; desc={copper shape dimension (diameter) }} - ha:clearance = { valtype=coord; desc={copper clearance around the copper shape }} - ha:mask = { valtype=coord; desc={mask cutout shape dimension (diameter) }} - ha:hole = { valtype=coord; desc={drill/hole diameter }} - ha:name = { valtype=string; desc={optional name attribute }} - ha:number = { valtype=string; desc={for a pin (or to-be-pin) this is the terminal ID }} - sy:attr@dup = {/lht_tree_doc/comm/attributes} - sy:flags@dup = {/lht_tree_doc/comm/flags_pinvia} - } - } - } - } - ha:layers { - type=li - desc={ordered list of layers; v1 required the order to be top-bottom physically; v1 also required silk layers to be at the end (same resrtictions as in the old .pcb format; only real (non-bound) layers have attributes)} - li:children { - ha:NAME { - type=ha - desc={a logical layer} - li:children { - ha:lid = { valtype=integer; ver={>=2} desc={layer ID}} - ha:visible = { valtype=integer; desc={only in real (non-boud) layers: 1 if the layer is visible, 0 if not (UI setting)}} - ha:group = { valtype=integer; desc={only in real (non-boud) layers: "parent" layer group ID }} - ha:color = { valtype=string; ver={>=5} desc={ layer color on UI, in #rrggbb format }} - ha:stack_offs = { valtype=integer; desc={only in bound layers: match offset e.g. for internal copper layers}} - ha:type { - type=ha - desc={only for bound layers: try to bind to this type of layer on the host board} - sy:children {/lht_tree_doc/comm/layer_mask/children} - } - ha:combining { - ver={>=2} - desc={layer combination (compositing) flags} - sy:children {/lht_tree_doc/comm/combining/children} - } - sy:attr@dup = {/lht_tree_doc/comm/attributes} - ha:objects { - type=li - desc={list of drawing primitives put on this layer} - li:children { - ha:line.ID { - type=ha - desc={round cap line} - li:children { - ha:x1 = { valtype=coord; desc={line first endpoint, horizontal offset }} - ha:y1 = { valtype=coord; desc={line first endpoint, vertical offset }} - ha:x2 = { valtype=coord; desc={line second endpoint, horizontal offset }} - ha:y2 = { valtype=coord; desc={line second endpoint, vertical offset }} - ha:thickness = { valtype=coord; desc={width of the line }} - ha:clearance = { valtype=coord; desc={copper clearance around the object }} - sy:attr@dup = {/lht_tree_doc/comm/attributes} - sy:flags@dup = {/lht_tree_doc/comm/flags_line} - sy:hvthr@dup = {/lht_tree_doc/comm/thermal_heavy} - } - } - ha:arc.ID { - type=ha - desc={round cap elliptic arc (only width==height is fully supported at the moment)} - li:children { - ha:x = { valtype=coord; desc={center, X coord}} - ha:y = { valtype=coord; desc={center, Y coord}} - ha:width = { valtype=coord; desc={radius (of the centerline of the arc) in X direction }} - ha:height = { valtype=coord; desc={radius (of the centerline of the arc) in Y direction }} - ha:thickness = { valtype=coord; desc={width of the pen the arc is drawn with }} - ha:clearance = { valtype=coord; desc={copper clearance around the object }} - ha:astart = { valtype=angle; desc={ start angle}} - ha:adelta = { valtype=angle; desc={ delta angle}} - sy:attr@dup = {/lht_tree_doc/comm/attributes} - sy:flags@dup = {/lht_tree_doc/comm/flags_arc} - sy:hvthr@dup = {/lht_tree_doc/comm/thermal_heavy} - } - } - ha:polygon.ID { - type=ha - desc={polygon, as drawn (unclipped)} - li:children { - ha:clearance = { valtype=coord; ver={>=3} desc={copper clearance around the object }} - sy:attr@dup = {/lht_tree_doc/comm/attributes} - sy:flags@dup = {/lht_tree_doc/comm/flags_polygon} - sy:hvthr@dup = {/lht_tree_doc/comm/thermal_heavy} - ha:geometry { - type=li - desc={first item is the outer contour, subsequent, optional items are holes} - li:children { - ha:contour = { valtype=coordtbl; desc={2 column table of x;y coords for the outer contour}} - ha:hole = { valtype=coordtbl; desc={2 column table of x;y coords for a hole}} - } - } - } - } - ha:text.ID { - type=ha - desc={single line text object} - li:children { - ha:x = { valtype=coord; desc={placement: X coord}} - ha:y = { valtype=coord; desc={placement: Y coord}} - ha:role = { valtype=string; desc={when part of an old element, determines which of the three hardwired text object role is used (footprint, refdes or value)}} - ha:string = { valtype=string; desc={text string (payload)}} - ha:fid = { valtype=integer; desc={font ID}} - ha:scale = { valtype=integer; desc={text size scale in %}} - ha:direction = { valtype=integer; desc={rotation in 90 degree steps (0 is horizontal)}} - sy:attr@dup = {/lht_tree_doc/comm/attributes} - sy:flags@dup = {/lht_tree_doc/comm/flags_text} - } - } - } - } - } - } - } - } - ha:padstack_prototypes { - type=li - ver = {>=4} - li:children { - ha:unused = { valtype=none; desc={placeholder for markign uunsed slot to keep slot indices for early lihata v4 }} - ha:ps_proto_v4.PID { - type=ha - desc={padstack prototype specification, as introduced in lihata board v4} - li:children { - ha:hdia = { valtype=coord; desc={hole diameter; 0 means no hole }} - ha:htop = { valtype=integer; desc={hole start: copper layer index from the top (positive) or bottom (negative) copper layer (0 means top copper layer)}} - ha:hbottom = { valtype=integer; desc={hole start: copper layer index from the bottom (positive) or top (negative) copper layer (0 means bottom copper layer)}} - ha:plated = { valtype=integer; desc={0=unplated hole; 1=plated hole}} - ha:name = { valtype=string; ver={>=5} desc={optional user assigned prototype name}} - ha:shape { - type=li - desc={shape per layer type definition} - li:children { - ha:ps_shape_v4 { - type=ha - desc={shape on a specific layer type (specified by layer_mask and combining), as specifie in lihata board v4; shape is either ps_poly, ps_line or ps_circ (only one of these will present per layer type); shape coords are relative to padstack origin} - li:children { - sy:layer_mask@dup = {/lht_tree_doc/comm/layer_mask} - ha:combining { - desc={layer compositing match} - sy:children = {/lht_tree_doc/comm/combining/children} - } - ha:clearance = { valtype=coord; desc={local, per-layer-type clearance; applied if global padstack clearance is 0 }} - ha:ps_poly { - type=li - desc={arbitrary convex polygon shape; contains a list of x;y coordinates } - } - ha:ps_line { - type=ha - desc={straight line shape, round or square cap} - li:children { - ha:x1 = { valtype=coord; desc={line first endpoint, horizontal offset }} - ha:y1 = { valtype=coord; desc={line first endpoint, vertical offset }} - ha:x2 = { valtype=coord; desc={line second endpoint, horizontal offset }} - ha:y2 = { valtype=coord; desc={line second endpoint, vertical offset }} - ha:thickness = { valtype=coord; desc={width of the line }} - ha:square = { valtype=integer; desc={0=round cap; 1=square cap }} - } - } - ha:ps_circ { - type=ha - desc={filled circle shape} - li:children { - ha:x = { valtype=coord; desc={center, horizontal offset }} - ha:y = { valtype=coord; desc={center, vertical offset }} - ha:dia = { valtype=coord; desc={circle diameter }} - } - } - } - } - } - } - } - } - } - } - sy:subc.ID@dup {/lht_tree_doc/roots/pcb-rnd-subcircuit-v*/children/subc.ID} - ha:element.ID { - type=ha - desc={an instance (full copy) of an obsolete element footprint} - ver = {<3} - li:children { - ha:x = { valtype=coord; desc={element origin (diamond), horizontal offset }} - ha:y = { valtype=coord; desc={element origin (diamond), vertical offset }} - sy:attr@dup = {/lht_tree_doc/comm/attributes} - sy:flags@dup = {/lht_tree_doc/comm/flags_element} - ha:objects { - type=li - desc={list of special objects that make up the element; lines and arcs are always on a silk layer} - li:children { - sy:line.ID = {/lht_tree_doc/comm/data/children/layers/children/NAME/children/objects/children/line.ID} - sy:arc.ID = {/lht_tree_doc/comm/data/children/layers/children/NAME/children/objects/children/arc.ID} - sy:text.ID = {/lht_tree_doc/comm/data/children/layers/children/NAME/children/objects/children/text.ID} - ha:pad.ID { - type=ha - desc={SMD pad emulated using a line object; becomes a rectangle (but watch out for the cap-extended length!) when the square flag is set} - li:children { - ha:x1 = { valtype=coord; desc={line first endpoint, horizontal offset }} - ha:y1 = { valtype=coord; desc={line first endpoint, vertical offset }} - ha:x2 = { valtype=coord; desc={line second endpoint, horizontal offset }} - ha:y2 = { valtype=coord; desc={line second endpoint, vertical offset }} - ha:thickness = { valtype=coord; desc={width of the line}} - ha:clearance = { valtype=coord; desc={clearance around the line}} - ha:mask = { valtype=coord; desc={size of the mask cutout, as interpreted by gEDA/PCB}} - ha:name = { valtype=string; desc={symbolic name of the pad}} - ha:number = { valtype=string; desc={"pin number" for the netlist}} - sy:attr@dup = {/lht_tree_doc/comm/attributes} - sy:flags@dup = {/lht_tree_doc/comm/flags_pad} - } - } - ha:pin.ID { - type=ha - desc={thru-hole pin; emulated as an old-style via } - sy:children = {/lht_tree_doc/comm/data/children/objects/children/via.ID} - } - } - } - } - } - ha:rat.ID { - type=ha - desc={global rat line} - li:children { - ha:x1 = { valtype=coord; desc={line first endpoint, horizontal offset }} - ha:y1 = { valtype=coord; desc={line first endpoint, vertical offset }} - ha:x2 = { valtype=coord; desc={line second endpoint, horizontal offset }} - ha:y2 = { valtype=coord; desc={line second endpoint, vertical offset }} - ha:lgrp1 = { valtype=integer; desc={first endpoint's layer group ID }} - ha:lgrp2 = { valtype=integer; desc={second endpoint's layer group ID }} - sy:attr@dup = {/lht_tree_doc/comm/attributes} - sy:flags@dup = {/lht_tree_doc/comm/flags_line} - } - } - } - } - -}} Index: trunk/doc/developer/lihata_board/types.lht =================================================================== --- trunk/doc/developer/lihata_board/types.lht (revision 16842) +++ trunk/doc/developer/lihata_board/types.lht (nonexistent) @@ -1,65 +0,0 @@ -ha:lht_tree_doc { ha:types { - -angle { - A decimal number without unit, representing an angle in degree. Can - be positive or negative. -} - -coord { - A decimal number with a unit suffix. If the unit suffix is missing, - the coordinate is loaded in the internal units (which is nanometer as of 2018, - but could change in the future, thus files shall not depend on it). Depending - on the context, coordinates may have a sign (positive or negative). -

- Examples: -

-x=10mil;
-y=1.5mm;
-dia=12cm;
-
-} - -coordtbl { - A two-column table of coords. First column are X, second column are Y - coordinates. -

- Examples: -

-ta:contour {
-	1mm;   2.1mm;
-	5mm;   5.2mm;
-	3.7mm; 12mil;
-\}
-ta:foo = { 1mm; 2.1mm;  5mm;   5.2mm;  3.7mm; 12mil; \}
-
-} - -double { - Unitless numeric value in decimal format. Depending on context it is - sometimes signed. -} - -flag { - If the flag is set, the value is "1", if the flag is not set, the - whole key=value pair is omitted. -} - -integer { - Unitless integer value in decimal format. Depending on context it is - sometimes signed. -} - -minuid { - An unique ID as generated by libminuid (24 ASCII characters). -} - -none { - No value. -} - -string { - Free form text data -} - -}} - Index: trunk/doc/developer/lihata_board/comm_flags_old.lht =================================================================== --- trunk/doc/developer/lihata_board/comm_flags_old.lht (revision 16842) +++ trunk/doc/developer/lihata_board/comm_flags_old.lht (nonexistent) @@ -1,66 +0,0 @@ -ha:lht_tree_doc { ha:comm { - -# these obsolete flags are only relevant in compatibility mode; -# they are not generated by the flag dump but they will not change -# thus this file is hand-written - - ha:flags_element { - hide=1 - desc={flag bits of an element} - type=ha - li:children { - ha:found { valtype=flag; desc={If set, this object has been found by FindConnection()}} - ha:selected { valtype=flag; desc={Set when the object is selected.}} - ha:auto { valtype=flag; desc={For lines and vias, indicates that these were created by the autorouter.}} - ha:drc { valtype=flag; desc={Set for objects that fail DRC: flag like FOUND flag for DRC checking.}} - ha:lock { valtype=flag; desc={Set for locked objects.}} - ha:nonetlist { valtype=flag; desc={subcircuit is not on the netlist and should not interfere with the netlist }} - ha:termname { valtype=flag; desc={when set the names of pins are shown.}} - ha:floater { valtype=flag; desc={subc part can be moved after subc placing}} - ha:onsolder { valtype=flag; desc={element is placed on the solder side}} - } - } - ha:flags_pinvia { - hide=1 - desc={flag bits of a pin or via} - type=ha - li:children { - ha:found { valtype=flag; desc={If set, this object has been found by FindConnection()}} - ha:hole { valtype=flag; desc={For pins and vias, this flag means that the pin or via is a hole without a copper annulus.}} - ha:clearline { valtype=flag; desc={For lines and arcs, the line/arc will clear polygons instead of connecting to them.}} - ha:selected { valtype=flag; desc={Set when the object is selected.}} - ha:auto { valtype=flag; desc={For lines and vias, indicates that these were created by the autorouter.}} - ha:warn { valtype=flag; desc={For pins, vias, and pads, set to indicate a warning.}} - ha:usetherm { valtype=flag; desc={Obsolete, indicates that pins/vias should be drawn with thermal fingers.}} - ha:drc { valtype=flag; desc={Set for objects that fail DRC: flag like FOUND flag for DRC checking.}} - ha:lock { valtype=flag; desc={Set for locked objects.}} - ha:nonetlist { valtype=flag; desc={subcircuit is not on the netlist and should not interfere with the netlist }} - ha:termname { valtype=flag; desc={when set the names of pins are shown.}} - ha:floater { valtype=flag; desc={subc part can be moved after subc placing}} - ha:pin { valtype=flag; desc={object is a pin (in an element)}} - ha:via { valtype=flag; desc={object is a via}} - } - } - - ha:flags_pad { - hide=1 - desc={flag bits of a pad} - type=ha - li:children { - ha:found { valtype=flag; desc={If set, this object has been found by FindConnection()}} - ha:hole { valtype=flag; desc={For pins and vias, this flag means that the pin or via is a hole without a copper annulus.}} - ha:clearline { valtype=flag; desc={For lines and arcs, the line/arc will clear polygons instead of connecting to them.}} - ha:selected { valtype=flag; desc={Set when the object is selected.}} - ha:auto { valtype=flag; desc={For lines and vias, indicates that these were created by the autorouter.}} - ha:warn { valtype=flag; desc={For pins, vias, and pads, set to indicate a warning.}} - ha:usetherm { valtype=flag; desc={Obsolete, indicates that pins/vias should be drawn with thermal fingers.}} - ha:drc { valtype=flag; desc={Set for objects that fail DRC: flag like FOUND flag for DRC checking.}} - ha:lock { valtype=flag; desc={Set for locked objects.}} - ha:nonetlist { valtype=flag; desc={subcircuit is not on the netlist and should not interfere with the netlist }} - ha:termname { valtype=flag; desc={when set the names of pins are shown.}} - ha:floater { valtype=flag; desc={subc part can be moved after subc placing}} - ha:pin { valtype=flag; desc={object is a pin (in an element)}} - ha:via { valtype=flag; desc={object is a via}} - } - } -} } Index: trunk/doc/developer/lihata_board/comm_thermal.lht =================================================================== --- trunk/doc/developer/lihata_board/comm_thermal.lht (revision 16842) +++ trunk/doc/developer/lihata_board/comm_thermal.lht (nonexistent) @@ -1,17 +0,0 @@ -ha:lht_tree_doc { ha:comm { - - ha:thermal_heavy { - name=thermal - type=li - hide=1 - desc { list of thermal flags for heavy terminals, on the single layer the object is on } - li:children { - ha:on { valtype=none; desc={draw any thermal only if this string is present; else normal clearance is applied}} - ha:diag { valtype=none; desc={if present, the thermal is diagonal (45 degree rotated)}} - ha:round { valtype=none; desc={if present, thermal shape is rounded}} - ha:sharp { valtype=none; desc={if present, thermal shape is sharp}} - ha:solid { valtype=none; desc={if present, there is no thermal but a solid connection ("join")}} - } - } - -}} Index: trunk/doc/developer/lihata_board/tree.txt =================================================================== --- trunk/doc/developer/lihata_board/tree.txt (revision 16842) +++ trunk/doc/developer/lihata_board/tree.txt (nonexistent) @@ -1,515 +0,0 @@ -File format root nodes - -Each table below describes the full tree of one of the pcb-rnd file formats, from the root. - -ha:pcb-rnd-board-v* - -type:name value ver description -ha:pcb-rnd-board-v* The full, self-contained description of a printed circuit board. This is the root of a board .lht file. The * after the v in the name is an integer which is the format version. - ha:meta Any meta-data that won't directly turn into physical material (e.g. copper). - board_name string User assigned name of the board - ha:grid User interface last grid settings - offs_x coord grid origin: X offset from 0;0 - offs_y coord grid origin: Y offset from 0;0 - spacing coord distance between two grid points both in X and Y directions - ha:size object size related settings - x coord drawing area size X (width) - y coord drawing area size Y (height) - isle_area_nm2 double remove polygon islands smaller than this value, specified in mm^2 - thermal_scale double scale all thermals on the board by this factor - ha:drc design rule checker settings for the old DRC - bloat coord Minimum copper spacing - shrink coord Minimum overlap between validly touching copper objects - min_width coord Minimum copper width - min_silk coord Minimum silk width - min_drill coord Minimum drill diameter - min_ring coord Minimum annular ring width - ha:cursor obsolete cursor/view state - x coord last positin, X (horizontal) - y coord last positin, Y (horizontal) - zoom double last view zoom factor - ha:layer_stack physical layer stack information: geometry and properties of physical layers - li:groups ordered list of physical layers from top to bottom - ha:INTEGER a layer group (a physical layer of the board); the ID of the layer group is the integer in the name of the node - name string user assigned name of the layer group, e.g. "top copper" - ha:type a flag-list of layer type flag bits - top flag location: top side - bottom flag location: bottom side - intern flag location: internal - logical flag location: logical (not in the actual stackup) - copper flag material: copper - silk flag material: silk - mask flag material: mask - paste flag material: paste - outline flag "material": router path (board outline, slots, cutouts) - substrate flag material: substrate or insulator - li:layers ordered list of logical layer IDs hosted by this layer group - ha:font font kit: all fonts used on the board (if no font specified, default font will be used) - ha:FONT-ID the full description of a font; the node name is the integer font id or "geda_pcb" for font 0 (for historical reasons); the name is used only to make each node unique, the ID is also a field below -> - ha:styles routing styles hash: collection of all available routing syles - ha:netlists all availale netlists - li:netlist the input netlist (as seen in the last netlist import, a.k.a. forward annotation) - ha:NETNAME a network - li:conn list of terminals connceted to the network - diameter string refdes-terminal - ha:attributes >=5 a hash of attribute key=value pairs - attrib-key string attribute value - li:netlist_patch a list of intentional deviations from the input netlist, a.k.a. material for back annotation - li:net_info describe the current state of a net, as seen on the input - net string net name; first item on the list, only once - term string terminal name; zero or more items starting from the second item - ha:add_conn the 'as built' network requires a new conncetion to be created during the back annotation - net string net name the terminal should be added to - term string terminal name - ha:del_conn the 'as built' network requires an existing conncetion to be removed during the back annotation - net string net name the terminal should be removed from - term string terminal name - ha:change_attrib the 'as built' network requires an attribute to be set or changed - net string net name whose attribute needs to be changed - key string key (name) of the attribute - val string new value of the attribute - li:conf complete pcb-rnd configuration tree -> - ha:data Layers and global objects of the board -> - ha:attributes a hash of attribute key=value pairs - attrib-key string attribute value - -li:pcb-rnd-conf-v1 - -type:name value ver description -li:pcb-rnd-conf-v1 complete pcb-rnd configuration tree - ha:overwrite overwrite values while merging; children: a full or partial config tree - ha:prepend prepend values while merging; children: a full or partial config tree - ha:append append values while merging; children: a full or partial config tree - -li:pcb-rnd-font-v1 - -type:name value ver description -li:pcb-rnd-font-v1 font description - ha:FONT-ID the full description of a font; the node name is the integer font id or "geda_pcb" for font 0 (for historical reasons); the name is used only to make each node unique, the ID is also a field below - cell_height coord height of the tallest glyph - cell_width coord width of the widest glyph - id integer unique font ID within the fontkit; fonts are referenced by ID - name string user specified, user readable font name - ha:symbols a collections of glyphs availbale in the font - ha:CHARACTER Description of a glyph (symbol). Node name is a signel ASCII character or is of format &xx where xx is a hex digit of the ASCII code of the character. Characters that must use the hex version are: codes below 33 or over - 126, &, #, {, }, /, :, ;, =, \, : - height coord height of the glyph - width coord width of the glyph - delta coord extra space always inserted after the current symbol, before the next character - li:objects objects that make up the symbol; IDs are per symbol local IDs counted from 0 - ha:line.ID round cap line, simplified - x1 coord line first endpoint, horizontal offset - y1 coord line first endpoint, vertical offset - x2 coord line second endpoint, horizontal offset - y2 coord line second endpoint, vertical offset - thickness coord width of the line - ha:simplearc.ID round cap arc, simplified - x coord center, X coord - y coord center, Y coord - r coord radius (of the centerline of the arc) - thickness coord width of the pen the arc is drawn with - astart angle start angle - adelta angle delta angle - li:simplepoly.ID round cap arc, simplified; contains a flat list of coords; each coord pair is an x;y corner of the outline of the polygon (odd indices are x coords, even indices are y coords) - -li:pcb-rnd-subcircuit-v* - -type:name value ver description -li:pcb-rnd-subcircuit-v* footprint file containing a single subcircuit - ha:subc.ID >=3 an instance (full copy) of a subcircuit - uid minuid UID assigned by the user to track subc history - ha:attributes a hash of attribute key=value pairs - attrib-key string attribute value - ha:flags_subcircuit flag bits of a subcircuit - found flag If set, this object has been found by FindConnection() - selected flag Set when the object is selected. - auto flag For lines and vias, indicates that these were created by the autorouter. - drc flag Set for objects that fail DRC: flag like FOUND flag for DRC checking. - lock flag Set for locked objects. - nonetlist flag subcircuit is not on the netlist and should not interfere with the netlist - termname flag when set the names of pins are shown. - floater flag subc part can be moved after subc placing - ha:data Layers and global objects of the board -> - -Common subtrees - -Each table below describes a subtree that usually does not specify a whole tree (thus they are usually not a valid file on their own). These subtrees are described in a separate table because they are used from multiple other trees. - -ha:data - -type:name value ver description -ha:data Layers and global objects of the board - li:objects List of global (non-layer/multi-layer) objects - ha:padstack_ref.ID >=4 a padstack reference (instance) placed on the board (e.g. used as a via) - proto integer padstack prototype ID to use, from the parent data's proto list - x coord place padstack with origin at this horizontal coordinate - y coord place padstack with origin at this vertical coordinate - clearance coord global clearance; if non-zero, overrides local (per shape) clearance - rot angle rotation angle in degrees - xmirror integer 0 or 1; if 1, mirror all shapes over the x (horizontal) axis (so that y coords are flipped) - smirror integer 0 or 1; if 1, mirror the layer stackup: bottom becomes top, top becomes bottom (a.k.a. "place on the other side") - ha:attributes a hash of attribute key=value pairs - attrib-key string attribute value - ha:flags_padstack flag bits of a padstack - found flag If set, this object has been found by FindConnection() - hole flag For pins and vias, this flag means that the pin or via is a hole without a copper annulus. - clearline flag For lines and arcs, the line/arc will clear polygons instead of connecting to them. - selected flag Set when the object is selected. - auto flag For lines and vias, indicates that these were created by the autorouter. - warn flag For pins, vias, and pads, set to indicate a warning. - usetherm flag Obsolete, indicates that pins/vias should be drawn with thermal fingers. - drc flag Set for objects that fail DRC: flag like FOUND flag for DRC checking. - lock flag Set for locked objects. - nonetlist flag subcircuit is not on the netlist and should not interfere with the netlist - termname flag when set the names of pins are shown. - floater flag subc part can be moved after subc placing - li:thermal list of thermal shapes, per layer - li:LAYERID integer layer ID the thermal affects; each word is a boolean flag that is either present on the list or is missing; only one shape may be present - on none thermal is present on this layer; if not present, all other thermal flags are ignored on this layer - diag none thermal graphics is not axis aligned but diagonal (rotated by 45 degrees) - round none shape: rounded edge fingers - sharp none shape: sharp edge fingers - solid none shape: no thermal relief, solid connection without clearance - noshape none shape: special: omit copper shape of the padstack on this layer - ha:via.ID <=4 an old via object (loaded as padstack in the new model) - x coord place padstack with origin at this horizontal coordinate - y coord place padstack with origin at this vertical coordinate - thickness coord copper shape dimension (diameter) - clearance coord copper clearance around the copper shape - mask coord mask cutout shape dimension (diameter) - hole coord drill/hole diameter - name string optional name attribute - number string for a pin (or to-be-pin) this is the terminal ID - ha:attributes a hash of attribute key=value pairs - attrib-key string attribute value - ha:flags_pinvia flag bits of a pin or via - found flag If set, this object has been found by FindConnection() - hole flag For pins and vias, this flag means that the pin or via is a hole without a copper annulus. - clearline flag For lines and arcs, the line/arc will clear polygons instead of connecting to them. - selected flag Set when the object is selected. - auto flag For lines and vias, indicates that these were created by the autorouter. - warn flag For pins, vias, and pads, set to indicate a warning. - usetherm flag Obsolete, indicates that pins/vias should be drawn with thermal fingers. - drc flag Set for objects that fail DRC: flag like FOUND flag for DRC checking. - lock flag Set for locked objects. - nonetlist flag subcircuit is not on the netlist and should not interfere with the netlist - termname flag when set the names of pins are shown. - floater flag subc part can be moved after subc placing - pin flag object is a pin (in an element) - via flag object is a via - li:layers ordered list of layers; v1 required the order to be top-bottom physically; v1 also required silk layers to be at the end (same resrtictions as in the old .pcb format; only real (non-bound) layers have attributes) - ha:NAME a logical layer - lid integer >=2 layer ID - visible integer only in real (non-boud) layers: 1 if the layer is visible, 0 if not (UI setting) - group integer only in real (non-boud) layers: "parent" layer group ID - color string >=5 layer color on UI, in #rrggbb format - stack_offs integer only in bound layers: match offset e.g. for internal copper layers - ha:type only for bound layers: try to bind to this type of layer on the host board - top flag location: top side - bottom flag location: bottom side - intern flag location: internal - logical flag location: logical (not in the actual stackup) - copper flag material: copper - silk flag material: silk - mask flag material: mask - paste flag material: paste - outline flag "material": router path (board outline, slots, cutouts) - substrate flag material: substrate or insulator - combining >=2 layer combination (compositing) flags - sub flag draw in negative - auto flag padstacks draw their paste, mask and silk objects on the first layer (of matching type) that features the auto flag - ha:attributes a hash of attribute key=value pairs - attrib-key string attribute value - li:objects list of drawing primitives put on this layer - ha:line.ID round cap line - x1 coord line first endpoint, horizontal offset - y1 coord line first endpoint, vertical offset - x2 coord line second endpoint, horizontal offset - y2 coord line second endpoint, vertical offset - thickness coord width of the line - clearance coord copper clearance around the object - ha:attributes a hash of attribute key=value pairs - attrib-key string attribute value - ha:flags_line flag bits of a line - found flag If set, this object has been found by FindConnection() - clearline flag For lines and arcs, the line/arc will clear polygons instead of connecting to them. - selected flag Set when the object is selected. - auto flag For lines and vias, indicates that these were created by the autorouter. - rubberend flag For lines, used internally for rubber band moves: indicates one end already rubber banding. - usetherm flag Obsolete, indicates that pins/vias should be drawn with thermal fingers. - drc flag Set for objects that fail DRC: flag like FOUND flag for DRC checking. - lock flag Set for locked objects. - nonetlist flag subcircuit is not on the netlist and should not interfere with the netlist - termname flag when set the names of pins are shown. - floater flag subc part can be moved after subc placing - li:thermal list of thermal flags for heavy terminals, on the single layer the object is on - on none draw any thermal only if this string is present; else normal clearance is applied - diag none if present, the thermal is diagonal (45 degree rotated) - round none if present, thermal shape is rounded - sharp none if present, thermal shape is sharp - solid none if present, there is no thermal but a solid connection ("join") - ha:arc.ID round cap elliptic arc (only width==height is fully supported at the moment) - x coord center, X coord - y coord center, Y coord - width coord radius (of the centerline of the arc) in X direction - height coord radius (of the centerline of the arc) in Y direction - thickness coord width of the pen the arc is drawn with - clearance coord copper clearance around the object - astart angle start angle - adelta angle delta angle - ha:attributes a hash of attribute key=value pairs - attrib-key string attribute value - ha:flags_arc flag bits of a arc - found flag If set, this object has been found by FindConnection() - clearline flag For lines and arcs, the line/arc will clear polygons instead of connecting to them. - selected flag Set when the object is selected. - auto flag For lines and vias, indicates that these were created by the autorouter. - rubberend flag For lines, used internally for rubber band moves: indicates one end already rubber banding. - usetherm flag Obsolete, indicates that pins/vias should be drawn with thermal fingers. - drc flag Set for objects that fail DRC: flag like FOUND flag for DRC checking. - lock flag Set for locked objects. - nonetlist flag subcircuit is not on the netlist and should not interfere with the netlist - termname flag when set the names of pins are shown. - floater flag subc part can be moved after subc placing - li:thermal list of thermal flags for heavy terminals, on the single layer the object is on - on none draw any thermal only if this string is present; else normal clearance is applied - diag none if present, the thermal is diagonal (45 degree rotated) - round none if present, thermal shape is rounded - sharp none if present, thermal shape is sharp - solid none if present, there is no thermal but a solid connection ("join") - ha:polygon.ID polygon, as drawn (unclipped) - clearance coord >=3 copper clearance around the object - ha:attributes a hash of attribute key=value pairs - attrib-key string attribute value - ha:flags_polygon flag bits of a polygon - found flag If set, this object has been found by FindConnection() - clearpoly flag For polygons, this flag means that pins and vias will normally clear these polygons (thus, thermals are required for electrical connection). When clear, polygons will solidly connect to pins and vias. - fullpoly flag For polygons, the full polygon is drawn (i.e. all parts instead of only the biggest one). - selected flag Set when the object is selected. - auto flag For lines and vias, indicates that these were created by the autorouter. - drc flag Set for objects that fail DRC: flag like FOUND flag for DRC checking. - lock flag Set for locked objects. - nonetlist flag subcircuit is not on the netlist and should not interfere with the netlist - termname flag when set the names of pins are shown. - clearpolypoly flag For polygons, apply clearance to nearby polygons - floater flag subc part can be moved after subc placing - li:thermal list of thermal flags for heavy terminals, on the single layer the object is on - on none draw any thermal only if this string is present; else normal clearance is applied - diag none if present, the thermal is diagonal (45 degree rotated) - round none if present, thermal shape is rounded - sharp none if present, thermal shape is sharp - solid none if present, there is no thermal but a solid connection ("join") - li:geometry first item is the outer contour, subsequent, optional items are holes - contour coordtbl 2 column table of x;y coords for the outer contour - hole coordtbl 2 column table of x;y coords for a hole - ha:text.ID single line text object - x coord placement: X coord - y coord placement: Y coord - role string when part of an old element, determines which of the three hardwired text object role is used (footprint, refdes or value) - string string text string (payload) - fid integer font ID - scale integer text size scale in % - direction integer rotation in 90 degree steps (0 is horizontal) - ha:attributes a hash of attribute key=value pairs - attrib-key string attribute value - ha:flags_text flag bits of a text - found flag If set, this object has been found by FindConnection() - clearline flag For lines and arcs, the line/arc will clear polygons instead of connecting to them. - selected flag Set when the object is selected. - onsolder flag For text, indicates that it is on the solder side. - auto flag For lines and vias, indicates that these were created by the autorouter. - drc flag Set for objects that fail DRC: flag like FOUND flag for DRC checking. - lock flag Set for locked objects. - nonetlist flag subcircuit is not on the netlist and should not interfere with the netlist - termname flag when set the names of pins are shown. - dyntext flag For text: dynamic string (substitute %patterns%) - floater flag subc part can be moved after subc placing - li:padstack_prototypes >=4 - unused none placeholder for markign uunsed slot to keep slot indices for early lihata v4 - ha:ps_proto_v4.PID padstack prototype specification, as introduced in lihata board v4 - hdia coord hole diameter; 0 means no hole - htop integer hole start: copper layer index from the top (positive) or bottom (negative) copper layer (0 means top copper layer) - hbottom integer hole start: copper layer index from the bottom (positive) or top (negative) copper layer (0 means bottom copper layer) - plated integer 0=unplated hole; 1=plated hole - name string >=5 optional user assigned prototype name - li:shape shape per layer type definition - ha:ps_shape_v4 shape on a specific layer type (specified by layer_mask and combining), as specifie in lihata board v4; shape is either ps_poly, ps_line or ps_circ (only one of these will present per layer type); shape coords are - relative to padstack origin - ha:layer_mask layer type and location - top flag location: top side - bottom flag location: bottom side - intern flag location: internal - logical flag location: logical (not in the actual stackup) - copper flag material: copper - silk flag material: silk - mask flag material: mask - paste flag material: paste - outline flag "material": router path (board outline, slots, cutouts) - substrate flag material: substrate or insulator - combining layer compositing match - sub flag draw in negative - auto flag padstacks draw their paste, mask and silk objects on the first layer (of matching type) that features the auto flag - clearance coord local, per-layer-type clearance; applied if global padstack clearance is 0 - li:ps_poly arbitrary convex polygon shape; contains a list of x;y coordinates - ha:ps_line straight line shape, round or square cap - x1 coord line first endpoint, horizontal offset - y1 coord line first endpoint, vertical offset - x2 coord line second endpoint, horizontal offset - y2 coord line second endpoint, vertical offset - thickness coord width of the line - square integer 0=round cap; 1=square cap - ha:ps_circ filled circle shape - x coord center, horizontal offset - y coord center, vertical offset - dia coord circle diameter - ha:subc.ID >=3 an instance (full copy) of a subcircuit - uid minuid UID assigned by the user to track subc history - ha:attributes a hash of attribute key=value pairs - attrib-key string attribute value - ha:flags_subcircuit flag bits of a subcircuit - found flag If set, this object has been found by FindConnection() - selected flag Set when the object is selected. - auto flag For lines and vias, indicates that these were created by the autorouter. - drc flag Set for objects that fail DRC: flag like FOUND flag for DRC checking. - lock flag Set for locked objects. - nonetlist flag subcircuit is not on the netlist and should not interfere with the netlist - termname flag when set the names of pins are shown. - floater flag subc part can be moved after subc placing - ha:data Layers and global objects of the board -> - ha:element.ID <3 an instance (full copy) of an obsolete element footprint - x coord element origin (diamond), horizontal offset - y coord element origin (diamond), vertical offset - ha:attributes a hash of attribute key=value pairs - attrib-key string attribute value - ha:flags_element flag bits of an element - found flag If set, this object has been found by FindConnection() - selected flag Set when the object is selected. - auto flag For lines and vias, indicates that these were created by the autorouter. - drc flag Set for objects that fail DRC: flag like FOUND flag for DRC checking. - lock flag Set for locked objects. - nonetlist flag subcircuit is not on the netlist and should not interfere with the netlist - termname flag when set the names of pins are shown. - floater flag subc part can be moved after subc placing - onsolder flag element is placed on the solder side - li:objects list of special objects that make up the element; lines and arcs are always on a silk layer - ha:line.ID round cap line -> - ha:arc.ID round cap elliptic arc (only width==height is fully supported at the moment) -> - ha:text.ID single line text object -> - ha:pad.ID SMD pad emulated using a line object; becomes a rectangle (but watch out for the cap-extended length!) when the square flag is set - x1 coord line first endpoint, horizontal offset - y1 coord line first endpoint, vertical offset - x2 coord line second endpoint, horizontal offset - y2 coord line second endpoint, vertical offset - thickness coord width of the line - clearance coord clearance around the line - mask coord size of the mask cutout, as interpreted by gEDA/PCB - name string symbolic name of the pad - number string "pin number" for the netlist - ha:attributes a hash of attribute key=value pairs - attrib-key string attribute value - ha:flags_pad flag bits of a pad - found flag If set, this object has been found by FindConnection() - hole flag For pins and vias, this flag means that the pin or via is a hole without a copper annulus. - clearline flag For lines and arcs, the line/arc will clear polygons instead of connecting to them. - selected flag Set when the object is selected. - auto flag For lines and vias, indicates that these were created by the autorouter. - warn flag For pins, vias, and pads, set to indicate a warning. - usetherm flag Obsolete, indicates that pins/vias should be drawn with thermal fingers. - drc flag Set for objects that fail DRC: flag like FOUND flag for DRC checking. - lock flag Set for locked objects. - nonetlist flag subcircuit is not on the netlist and should not interfere with the netlist - termname flag when set the names of pins are shown. - floater flag subc part can be moved after subc placing - pin flag object is a pin (in an element) - via flag object is a via - ha:pin.ID thru-hole pin; emulated as an old-style via - x coord place padstack with origin at this horizontal coordinate - y coord place padstack with origin at this vertical coordinate - thickness coord copper shape dimension (diameter) - clearance coord copper clearance around the copper shape - mask coord mask cutout shape dimension (diameter) - hole coord drill/hole diameter - name string optional name attribute - number string for a pin (or to-be-pin) this is the terminal ID - ha:attributes a hash of attribute key=value pairs - attrib-key string attribute value - ha:flags_pinvia flag bits of a pin or via - found flag If set, this object has been found by FindConnection() - hole flag For pins and vias, this flag means that the pin or via is a hole without a copper annulus. - clearline flag For lines and arcs, the line/arc will clear polygons instead of connecting to them. - selected flag Set when the object is selected. - auto flag For lines and vias, indicates that these were created by the autorouter. - warn flag For pins, vias, and pads, set to indicate a warning. - usetherm flag Obsolete, indicates that pins/vias should be drawn with thermal fingers. - drc flag Set for objects that fail DRC: flag like FOUND flag for DRC checking. - lock flag Set for locked objects. - nonetlist flag subcircuit is not on the netlist and should not interfere with the netlist - termname flag when set the names of pins are shown. - floater flag subc part can be moved after subc placing - pin flag object is a pin (in an element) - via flag object is a via - ha:rat.ID global rat line - x1 coord line first endpoint, horizontal offset - y1 coord line first endpoint, vertical offset - x2 coord line second endpoint, horizontal offset - y2 coord line second endpoint, vertical offset - lgrp1 integer first endpoint's layer group ID - lgrp2 integer second endpoint's layer group ID - ha:attributes a hash of attribute key=value pairs - attrib-key string attribute value - ha:flags_line flag bits of a line - found flag If set, this object has been found by FindConnection() - clearline flag For lines and arcs, the line/arc will clear polygons instead of connecting to them. - selected flag Set when the object is selected. - auto flag For lines and vias, indicates that these were created by the autorouter. - rubberend flag For lines, used internally for rubber band moves: indicates one end already rubber banding. - usetherm flag Obsolete, indicates that pins/vias should be drawn with thermal fingers. - drc flag Set for objects that fail DRC: flag like FOUND flag for DRC checking. - lock flag Set for locked objects. - nonetlist flag subcircuit is not on the netlist and should not interfere with the netlist - termname flag when set the names of pins are shown. - floater flag subc part can be moved after subc placing - -Types - -+--------------------------------------------------------------------------------------------------+ -| type | description | -|--------+-----------------------------------------------------------------------------------------| -|angle |A decimal number without unit, representing an angle in degree. Can be positive or | -| |negative. | -|--------+-----------------------------------------------------------------------------------------| -| |A decimal number with a unit suffix. If the unit suffix is missing, the coordinate is | -| |loaded in the internal units (which is nanometer as of 2018, but could change in the | -| |future, thus files shall not depend on it). Depending on the context, coordinates may | -| |have a sign (positive or negative). | -|coord | | -| |Examples: | -| | | -| |x=10mil; | -| |y=1.5mm; | -| |dia=12cm; | -|--------+-----------------------------------------------------------------------------------------| -| |A two-column table of coords. First column are X, second column are Y coordinates. | -| | | -| |Examples: | -| | | -|coordtbl|ta:contour { | -| | 1mm; 2.1mm; | -| | 5mm; 5.2mm; | -| | 3.7mm; 12mil; | -| |} | -| |ta:foo = { 1mm; 2.1mm; 5mm; 5.2mm; 3.7mm; 12mil; } | -|--------+-----------------------------------------------------------------------------------------| -|double |Unitless numeric value in decimal format. Depending on context it is sometimes signed. | -|--------+-----------------------------------------------------------------------------------------| -|flag |If the flag is set, the value is "1", if the flag is not set, the whole key=value pair is| -| |omitted. | -|--------+-----------------------------------------------------------------------------------------| -|integer |Unitless integer value in decimal format. Depending on context it is sometimes signed. | -|--------+-----------------------------------------------------------------------------------------| -|minuid |An unique ID as generated by libminuid (24 ASCII characters). | -|--------+-----------------------------------------------------------------------------------------| -|none |No value. | -|--------+-----------------------------------------------------------------------------------------| -|string |Free form text data | -+--------------------------------------------------------------------------------------------------+ Index: trunk/doc/developer/lihata_board/comm_flags.lht =================================================================== --- trunk/doc/developer/lihata_board/comm_flags.lht (revision 16842) +++ trunk/doc/developer/lihata_board/comm_flags.lht (nonexistent) @@ -1,123 +0,0 @@ -ha:lht_tree_doc { ha:comm { - ha:flags_arc { - hide=1 - desc={flag bits of a arc} - type=ha - li:children { - ha:found { valtype=flag; desc={If set, this object has been found by FindConnection()}} - ha:clearline { valtype=flag; desc={For lines and arcs, the line/arc will clear polygons instead of connecting to them.}} - ha:selected { valtype=flag; desc={Set when the object is selected.}} - ha:auto { valtype=flag; desc={For lines and vias, indicates that these were created by the autorouter.}} - ha:rubberend { valtype=flag; desc={For lines, used internally for rubber band moves: indicates one end already rubber banding.}} - ha:usetherm { valtype=flag; desc={Obsolete, indicates that pins/vias should be drawn with thermal fingers.}} - ha:drc { valtype=flag; desc={Set for objects that fail DRC: flag like FOUND flag for DRC checking.}} - ha:lock { valtype=flag; desc={Set for locked objects.}} - ha:nonetlist { valtype=flag; desc={subcircuit is not on the netlist and should not interfere with the netlist }} - ha:termname { valtype=flag; desc={when set the names of pins are shown.}} - ha:floater { valtype=flag; desc={subc part can be moved after subc placing}} - } - } - ha:flags_line { - hide=1 - desc={flag bits of a line} - type=ha - li:children { - ha:found { valtype=flag; desc={If set, this object has been found by FindConnection()}} - ha:clearline { valtype=flag; desc={For lines and arcs, the line/arc will clear polygons instead of connecting to them.}} - ha:selected { valtype=flag; desc={Set when the object is selected.}} - ha:auto { valtype=flag; desc={For lines and vias, indicates that these were created by the autorouter.}} - ha:rubberend { valtype=flag; desc={For lines, used internally for rubber band moves: indicates one end already rubber banding.}} - ha:usetherm { valtype=flag; desc={Obsolete, indicates that pins/vias should be drawn with thermal fingers.}} - ha:drc { valtype=flag; desc={Set for objects that fail DRC: flag like FOUND flag for DRC checking.}} - ha:lock { valtype=flag; desc={Set for locked objects.}} - ha:nonetlist { valtype=flag; desc={subcircuit is not on the netlist and should not interfere with the netlist }} - ha:termname { valtype=flag; desc={when set the names of pins are shown.}} - ha:floater { valtype=flag; desc={subc part can be moved after subc placing}} - } - } - ha:flags_polygon { - hide=1 - desc={flag bits of a polygon} - type=ha - li:children { - ha:found { valtype=flag; desc={If set, this object has been found by FindConnection()}} - ha:clearpoly { valtype=flag; desc={For polygons, this flag means that pins and vias will normally clear these polygons (thus, thermals are required for electrical connection). When clear, polygons will solidly connect to pins and vias. }} - ha:fullpoly { valtype=flag; desc={For polygons, the full polygon is drawn (i.e. all parts instead of only the biggest one).}} - ha:selected { valtype=flag; desc={Set when the object is selected.}} - ha:auto { valtype=flag; desc={For lines and vias, indicates that these were created by the autorouter.}} - ha:drc { valtype=flag; desc={Set for objects that fail DRC: flag like FOUND flag for DRC checking.}} - ha:lock { valtype=flag; desc={Set for locked objects.}} - ha:nonetlist { valtype=flag; desc={subcircuit is not on the netlist and should not interfere with the netlist }} - ha:termname { valtype=flag; desc={when set the names of pins are shown.}} - ha:clearpolypoly { valtype=flag; desc={For polygons, apply clearance to nearby polygons}} - ha:floater { valtype=flag; desc={subc part can be moved after subc placing}} - } - } - ha:flags_text { - hide=1 - desc={flag bits of a text} - type=ha - li:children { - ha:found { valtype=flag; desc={If set, this object has been found by FindConnection()}} - ha:clearline { valtype=flag; desc={For lines and arcs, the line/arc will clear polygons instead of connecting to them.}} - ha:selected { valtype=flag; desc={Set when the object is selected.}} - ha:onsolder { valtype=flag; desc={For text, indicates that it is on the solder side.}} - ha:auto { valtype=flag; desc={For lines and vias, indicates that these were created by the autorouter.}} - ha:drc { valtype=flag; desc={Set for objects that fail DRC: flag like FOUND flag for DRC checking.}} - ha:lock { valtype=flag; desc={Set for locked objects.}} - ha:nonetlist { valtype=flag; desc={subcircuit is not on the netlist and should not interfere with the netlist }} - ha:termname { valtype=flag; desc={when set the names of pins are shown.}} - ha:dyntext { valtype=flag; desc={For text: dynamic string (substitute %patterns%)}} - ha:floater { valtype=flag; desc={subc part can be moved after subc placing}} - } - } - ha:flags_subcircuit { - hide=1 - desc={flag bits of a subcircuit} - type=ha - li:children { - ha:found { valtype=flag; desc={If set, this object has been found by FindConnection()}} - ha:selected { valtype=flag; desc={Set when the object is selected.}} - ha:auto { valtype=flag; desc={For lines and vias, indicates that these were created by the autorouter.}} - ha:drc { valtype=flag; desc={Set for objects that fail DRC: flag like FOUND flag for DRC checking.}} - ha:lock { valtype=flag; desc={Set for locked objects.}} - ha:nonetlist { valtype=flag; desc={subcircuit is not on the netlist and should not interfere with the netlist }} - ha:termname { valtype=flag; desc={when set the names of pins are shown.}} - ha:floater { valtype=flag; desc={subc part can be moved after subc placing}} - } - } - ha:flags_padstack { - hide=1 - desc={flag bits of a padstack} - type=ha - li:children { - ha:found { valtype=flag; desc={If set, this object has been found by FindConnection()}} - ha:hole { valtype=flag; desc={For pins and vias, this flag means that the pin or via is a hole without a copper annulus.}} - ha:clearline { valtype=flag; desc={For lines and arcs, the line/arc will clear polygons instead of connecting to them.}} - ha:selected { valtype=flag; desc={Set when the object is selected.}} - ha:auto { valtype=flag; desc={For lines and vias, indicates that these were created by the autorouter.}} - ha:warn { valtype=flag; desc={For pins, vias, and pads, set to indicate a warning.}} - ha:usetherm { valtype=flag; desc={Obsolete, indicates that pins/vias should be drawn with thermal fingers.}} - ha:drc { valtype=flag; desc={Set for objects that fail DRC: flag like FOUND flag for DRC checking.}} - ha:lock { valtype=flag; desc={Set for locked objects.}} - ha:nonetlist { valtype=flag; desc={subcircuit is not on the netlist and should not interfere with the netlist }} - ha:termname { valtype=flag; desc={when set the names of pins are shown.}} - ha:floater { valtype=flag; desc={subc part can be moved after subc placing}} - } - } - ha:flags_ratline { - hide=1 - desc={flag bits of a ratline} - type=ha - li:children { - ha:found { valtype=flag; desc={If set, this object has been found by FindConnection()}} - ha:rat { valtype=flag; desc={If set for a line, indicates that this line is a rat line instead of a copper trace.}} - ha:selected { valtype=flag; desc={Set when the object is selected.}} - ha:auto { valtype=flag; desc={For lines and vias, indicates that these were created by the autorouter.}} - ha:drc { valtype=flag; desc={Set for objects that fail DRC: flag like FOUND flag for DRC checking.}} - ha:lock { valtype=flag; desc={Set for locked objects.}} - ha:nonetlist { valtype=flag; desc={subcircuit is not on the netlist and should not interfere with the netlist }} - ha:floater { valtype=flag; desc={subc part can be moved after subc placing}} - } - } -} } Index: trunk/doc/developer/lihata_board/Makefile =================================================================== --- trunk/doc/developer/lihata_board/Makefile (revision 16842) +++ trunk/doc/developer/lihata_board/Makefile (nonexistent) @@ -1,10 +0,0 @@ -all: tree.html tree.txt - -tree.html: render/render.sh *.lht - cd render && ./render.sh > ../tree.html - -tree.txt: tree.html - w3m -cols 256 tree.html > tree.txt - -comm_flags.lht: ../../../src/pcb-rnd render/gen_flags.sh - cd render && ./gen_flags.sh > ../comm_flags.lht \ No newline at end of file Index: trunk/doc/developer/lihata_board/root_conf.lht =================================================================== --- trunk/doc/developer/lihata_board/root_conf.lht (revision 16842) +++ trunk/doc/developer/lihata_board/root_conf.lht (nonexistent) @@ -1,22 +0,0 @@ -ha:lht_tree_doc { ha:roots { - - ha:pcb-rnd-conf-v1 { - type=li - desc=complete pcb-rnd configuration tree - li:children { - ha:overwrite { - type=ha - desc={overwrite values while merging; children: a full or partial config tree} - } - ha:prepend { - type=ha - desc={prepend values while merging; children: a full or partial config tree} - } - ha:append { - type=ha - desc={append values while merging; children: a full or partial config tree} - } - } - } - -}} Index: trunk/doc/developer/lihata_format/Makefile =================================================================== --- trunk/doc/developer/lihata_format/Makefile (nonexistent) +++ trunk/doc/developer/lihata_format/Makefile (revision 16843) @@ -0,0 +1,10 @@ +all: tree.html tree.txt + +tree.html: render/render.sh *.lht + cd render && ./render.sh > ../tree.html + +tree.txt: tree.html + w3m -cols 256 tree.html > tree.txt + +comm_flags.lht: ../../../src/pcb-rnd render/gen_flags.sh + cd render && ./gen_flags.sh > ../comm_flags.lht \ No newline at end of file Index: trunk/doc/developer/lihata_format/comm_attribs.lht =================================================================== --- trunk/doc/developer/lihata_format/comm_attribs.lht (nonexistent) +++ trunk/doc/developer/lihata_format/comm_attribs.lht (revision 16843) @@ -0,0 +1,22 @@ +ha:lht_tree_doc { ha:comm { + + ha:attributes { + type=ha + hide=1 + desc { a hash of attribute key=value pairs } + li:children { + ha:attrib-key { valtype=string; desc={attribute value}} + } + } + ha:attributes_v5p { + name=attributes + hide=1 + type=ha + desc { a hash of attribute key=value pairs } + ver={>=5} + li:children { + ha:attrib-key { valtype=string; desc={attribute value}} + } + } + +}} Index: trunk/doc/developer/lihata_format/comm_data.lht =================================================================== --- trunk/doc/developer/lihata_format/comm_data.lht (nonexistent) +++ trunk/doc/developer/lihata_format/comm_data.lht (revision 16843) @@ -0,0 +1,284 @@ +ha:lht_tree_doc { ha:comm { + + ha:data { + type=ha + desc { Layers and global objects of the board } + li:children { + ha:objects { + type=li + desc { List of global (non-layer/multi-layer) objects } + li:children { + ha:padstack_ref.ID { + type=ha + ver={>=4} + desc { a padstack reference (instance) placed on the board (e.g. used as a via) } + li:children { + ha:proto = { valtype=integer; desc={padstack prototype ID to use, from the parent data's proto list }} + ha:x = { valtype=coord; desc={place padstack with origin at this horizontal coordinate }} + ha:y = { valtype=coord; desc={place padstack with origin at this vertical coordinate }} + ha:clearance = { valtype=coord; desc={global clearance; if non-zero, overrides local (per shape) clearance }} + ha:rot = { valtype=angle; desc={rotation angle in degrees }} + ha:xmirror = { valtype=integer; desc={0 or 1; if 1, mirror all shapes over the x (horizontal) axis (so that y coords are flipped)}} + ha:smirror = { valtype=integer; desc={0 or 1; if 1, mirror the layer stackup: bottom becomes top, top becomes bottom (a.k.a. "place on the other side")}} + sy:attr@dup = {/lht_tree_doc/comm/attributes} + sy:flags@dup = {/lht_tree_doc/comm/flags_padstack} + ha:thermal { + type=li + desc { list of thermal shapes, per layer } + li:children { + ha:LAYERID { + type=li + desc { integer layer ID the thermal affects; each word is a boolean flag that is either present on the list or is missing; only one shape may be present } + li:children { + ha:on = { valtype=none; desc={ thermal is present on this layer; if not present, all other thermal flags are ignored on this layer }} + ha:diag = { valtype=none; desc={ thermal graphics is not axis aligned but diagonal (rotated by 45 degrees) }} + ha:round = { valtype=none; desc={ shape: rounded edge fingers }} + ha:sharp = { valtype=none; desc={ shape: sharp edge fingers }} + ha:solid = { valtype=none; desc={ shape: no thermal relief, solid connection without clearance }} + ha:noshape = { valtype=none; desc={ shape: special: omit copper shape of the padstack on this layer }} + } + } + } + } + } + } + ha:via.ID { + type=ha + ver={<=4} + desc { an old via object (loaded as padstack in the new model) } + li:children { + ha:x = { valtype=coord; desc={place padstack with origin at this horizontal coordinate }} + ha:y = { valtype=coord; desc={place padstack with origin at this vertical coordinate }} + ha:thickness = { valtype=coord; desc={copper shape dimension (diameter) }} + ha:clearance = { valtype=coord; desc={copper clearance around the copper shape }} + ha:mask = { valtype=coord; desc={mask cutout shape dimension (diameter) }} + ha:hole = { valtype=coord; desc={drill/hole diameter }} + ha:name = { valtype=string; desc={optional name attribute }} + ha:number = { valtype=string; desc={for a pin (or to-be-pin) this is the terminal ID }} + sy:attr@dup = {/lht_tree_doc/comm/attributes} + sy:flags@dup = {/lht_tree_doc/comm/flags_pinvia} + } + } + } + } + ha:layers { + type=li + desc={ordered list of layers; v1 required the order to be top-bottom physically; v1 also required silk layers to be at the end (same resrtictions as in the old .pcb format; only real (non-bound) layers have attributes)} + li:children { + ha:NAME { + type=ha + desc={a logical layer} + li:children { + ha:lid = { valtype=integer; ver={>=2} desc={layer ID}} + ha:visible = { valtype=integer; desc={only in real (non-boud) layers: 1 if the layer is visible, 0 if not (UI setting)}} + ha:group = { valtype=integer; desc={only in real (non-boud) layers: "parent" layer group ID }} + ha:color = { valtype=string; ver={>=5} desc={ layer color on UI, in #rrggbb format }} + ha:stack_offs = { valtype=integer; desc={only in bound layers: match offset e.g. for internal copper layers}} + ha:type { + type=ha + desc={only for bound layers: try to bind to this type of layer on the host board} + sy:children {/lht_tree_doc/comm/layer_mask/children} + } + ha:combining { + ver={>=2} + desc={layer combination (compositing) flags} + sy:children {/lht_tree_doc/comm/combining/children} + } + sy:attr@dup = {/lht_tree_doc/comm/attributes} + ha:objects { + type=li + desc={list of drawing primitives put on this layer} + li:children { + ha:line.ID { + type=ha + desc={round cap line} + li:children { + ha:x1 = { valtype=coord; desc={line first endpoint, horizontal offset }} + ha:y1 = { valtype=coord; desc={line first endpoint, vertical offset }} + ha:x2 = { valtype=coord; desc={line second endpoint, horizontal offset }} + ha:y2 = { valtype=coord; desc={line second endpoint, vertical offset }} + ha:thickness = { valtype=coord; desc={width of the line }} + ha:clearance = { valtype=coord; desc={copper clearance around the object }} + sy:attr@dup = {/lht_tree_doc/comm/attributes} + sy:flags@dup = {/lht_tree_doc/comm/flags_line} + sy:hvthr@dup = {/lht_tree_doc/comm/thermal_heavy} + } + } + ha:arc.ID { + type=ha + desc={round cap elliptic arc (only width==height is fully supported at the moment)} + li:children { + ha:x = { valtype=coord; desc={center, X coord}} + ha:y = { valtype=coord; desc={center, Y coord}} + ha:width = { valtype=coord; desc={radius (of the centerline of the arc) in X direction }} + ha:height = { valtype=coord; desc={radius (of the centerline of the arc) in Y direction }} + ha:thickness = { valtype=coord; desc={width of the pen the arc is drawn with }} + ha:clearance = { valtype=coord; desc={copper clearance around the object }} + ha:astart = { valtype=angle; desc={ start angle}} + ha:adelta = { valtype=angle; desc={ delta angle}} + sy:attr@dup = {/lht_tree_doc/comm/attributes} + sy:flags@dup = {/lht_tree_doc/comm/flags_arc} + sy:hvthr@dup = {/lht_tree_doc/comm/thermal_heavy} + } + } + ha:polygon.ID { + type=ha + desc={polygon, as drawn (unclipped)} + li:children { + ha:clearance = { valtype=coord; ver={>=3} desc={copper clearance around the object }} + sy:attr@dup = {/lht_tree_doc/comm/attributes} + sy:flags@dup = {/lht_tree_doc/comm/flags_polygon} + sy:hvthr@dup = {/lht_tree_doc/comm/thermal_heavy} + ha:geometry { + type=li + desc={first item is the outer contour, subsequent, optional items are holes} + li:children { + ha:contour = { valtype=coordtbl; desc={2 column table of x;y coords for the outer contour}} + ha:hole = { valtype=coordtbl; desc={2 column table of x;y coords for a hole}} + } + } + } + } + ha:text.ID { + type=ha + desc={single line text object} + li:children { + ha:x = { valtype=coord; desc={placement: X coord}} + ha:y = { valtype=coord; desc={placement: Y coord}} + ha:role = { valtype=string; desc={when part of an old element, determines which of the three hardwired text object role is used (footprint, refdes or value)}} + ha:string = { valtype=string; desc={text string (payload)}} + ha:fid = { valtype=integer; desc={font ID}} + ha:scale = { valtype=integer; desc={text size scale in %}} + ha:direction = { valtype=integer; desc={rotation in 90 degree steps (0 is horizontal)}} + sy:attr@dup = {/lht_tree_doc/comm/attributes} + sy:flags@dup = {/lht_tree_doc/comm/flags_text} + } + } + } + } + } + } + } + } + ha:padstack_prototypes { + type=li + ver = {>=4} + li:children { + ha:unused = { valtype=none; desc={placeholder for markign uunsed slot to keep slot indices for early lihata v4 }} + ha:ps_proto_v4.PID { + type=ha + desc={padstack prototype specification, as introduced in lihata board v4} + li:children { + ha:hdia = { valtype=coord; desc={hole diameter; 0 means no hole }} + ha:htop = { valtype=integer; desc={hole start: copper layer index from the top (positive) or bottom (negative) copper layer (0 means top copper layer)}} + ha:hbottom = { valtype=integer; desc={hole start: copper layer index from the bottom (positive) or top (negative) copper layer (0 means bottom copper layer)}} + ha:plated = { valtype=integer; desc={0=unplated hole; 1=plated hole}} + ha:name = { valtype=string; ver={>=5} desc={optional user assigned prototype name}} + ha:shape { + type=li + desc={shape per layer type definition} + li:children { + ha:ps_shape_v4 { + type=ha + desc={shape on a specific layer type (specified by layer_mask and combining), as specifie in lihata board v4; shape is either ps_poly, ps_line or ps_circ (only one of these will present per layer type); shape coords are relative to padstack origin} + li:children { + sy:layer_mask@dup = {/lht_tree_doc/comm/layer_mask} + ha:combining { + desc={layer compositing match} + sy:children = {/lht_tree_doc/comm/combining/children} + } + ha:clearance = { valtype=coord; desc={local, per-layer-type clearance; applied if global padstack clearance is 0 }} + ha:ps_poly { + type=li + desc={arbitrary convex polygon shape; contains a list of x;y coordinates } + } + ha:ps_line { + type=ha + desc={straight line shape, round or square cap} + li:children { + ha:x1 = { valtype=coord; desc={line first endpoint, horizontal offset }} + ha:y1 = { valtype=coord; desc={line first endpoint, vertical offset }} + ha:x2 = { valtype=coord; desc={line second endpoint, horizontal offset }} + ha:y2 = { valtype=coord; desc={line second endpoint, vertical offset }} + ha:thickness = { valtype=coord; desc={width of the line }} + ha:square = { valtype=integer; desc={0=round cap; 1=square cap }} + } + } + ha:ps_circ { + type=ha + desc={filled circle shape} + li:children { + ha:x = { valtype=coord; desc={center, horizontal offset }} + ha:y = { valtype=coord; desc={center, vertical offset }} + ha:dia = { valtype=coord; desc={circle diameter }} + } + } + } + } + } + } + } + } + } + } + sy:subc.ID@dup {/lht_tree_doc/roots/pcb-rnd-subcircuit-v*/children/subc.ID} + ha:element.ID { + type=ha + desc={an instance (full copy) of an obsolete element footprint} + ver = {<3} + li:children { + ha:x = { valtype=coord; desc={element origin (diamond), horizontal offset }} + ha:y = { valtype=coord; desc={element origin (diamond), vertical offset }} + sy:attr@dup = {/lht_tree_doc/comm/attributes} + sy:flags@dup = {/lht_tree_doc/comm/flags_element} + ha:objects { + type=li + desc={list of special objects that make up the element; lines and arcs are always on a silk layer} + li:children { + sy:line.ID = {/lht_tree_doc/comm/data/children/layers/children/NAME/children/objects/children/line.ID} + sy:arc.ID = {/lht_tree_doc/comm/data/children/layers/children/NAME/children/objects/children/arc.ID} + sy:text.ID = {/lht_tree_doc/comm/data/children/layers/children/NAME/children/objects/children/text.ID} + ha:pad.ID { + type=ha + desc={SMD pad emulated using a line object; becomes a rectangle (but watch out for the cap-extended length!) when the square flag is set} + li:children { + ha:x1 = { valtype=coord; desc={line first endpoint, horizontal offset }} + ha:y1 = { valtype=coord; desc={line first endpoint, vertical offset }} + ha:x2 = { valtype=coord; desc={line second endpoint, horizontal offset }} + ha:y2 = { valtype=coord; desc={line second endpoint, vertical offset }} + ha:thickness = { valtype=coord; desc={width of the line}} + ha:clearance = { valtype=coord; desc={clearance around the line}} + ha:mask = { valtype=coord; desc={size of the mask cutout, as interpreted by gEDA/PCB}} + ha:name = { valtype=string; desc={symbolic name of the pad}} + ha:number = { valtype=string; desc={"pin number" for the netlist}} + sy:attr@dup = {/lht_tree_doc/comm/attributes} + sy:flags@dup = {/lht_tree_doc/comm/flags_pad} + } + } + ha:pin.ID { + type=ha + desc={thru-hole pin; emulated as an old-style via } + sy:children = {/lht_tree_doc/comm/data/children/objects/children/via.ID} + } + } + } + } + } + ha:rat.ID { + type=ha + desc={global rat line} + li:children { + ha:x1 = { valtype=coord; desc={line first endpoint, horizontal offset }} + ha:y1 = { valtype=coord; desc={line first endpoint, vertical offset }} + ha:x2 = { valtype=coord; desc={line second endpoint, horizontal offset }} + ha:y2 = { valtype=coord; desc={line second endpoint, vertical offset }} + ha:lgrp1 = { valtype=integer; desc={first endpoint's layer group ID }} + ha:lgrp2 = { valtype=integer; desc={second endpoint's layer group ID }} + sy:attr@dup = {/lht_tree_doc/comm/attributes} + sy:flags@dup = {/lht_tree_doc/comm/flags_line} + } + } + } + } + +}} Index: trunk/doc/developer/lihata_format/comm_flags.lht =================================================================== --- trunk/doc/developer/lihata_format/comm_flags.lht (nonexistent) +++ trunk/doc/developer/lihata_format/comm_flags.lht (revision 16843) @@ -0,0 +1,123 @@ +ha:lht_tree_doc { ha:comm { + ha:flags_arc { + hide=1 + desc={flag bits of a arc} + type=ha + li:children { + ha:found { valtype=flag; desc={If set, this object has been found by FindConnection()}} + ha:clearline { valtype=flag; desc={For lines and arcs, the line/arc will clear polygons instead of connecting to them.}} + ha:selected { valtype=flag; desc={Set when the object is selected.}} + ha:auto { valtype=flag; desc={For lines and vias, indicates that these were created by the autorouter.}} + ha:rubberend { valtype=flag; desc={For lines, used internally for rubber band moves: indicates one end already rubber banding.}} + ha:usetherm { valtype=flag; desc={Obsolete, indicates that pins/vias should be drawn with thermal fingers.}} + ha:drc { valtype=flag; desc={Set for objects that fail DRC: flag like FOUND flag for DRC checking.}} + ha:lock { valtype=flag; desc={Set for locked objects.}} + ha:nonetlist { valtype=flag; desc={subcircuit is not on the netlist and should not interfere with the netlist }} + ha:termname { valtype=flag; desc={when set the names of pins are shown.}} + ha:floater { valtype=flag; desc={subc part can be moved after subc placing}} + } + } + ha:flags_line { + hide=1 + desc={flag bits of a line} + type=ha + li:children { + ha:found { valtype=flag; desc={If set, this object has been found by FindConnection()}} + ha:clearline { valtype=flag; desc={For lines and arcs, the line/arc will clear polygons instead of connecting to them.}} + ha:selected { valtype=flag; desc={Set when the object is selected.}} + ha:auto { valtype=flag; desc={For lines and vias, indicates that these were created by the autorouter.}} + ha:rubberend { valtype=flag; desc={For lines, used internally for rubber band moves: indicates one end already rubber banding.}} + ha:usetherm { valtype=flag; desc={Obsolete, indicates that pins/vias should be drawn with thermal fingers.}} + ha:drc { valtype=flag; desc={Set for objects that fail DRC: flag like FOUND flag for DRC checking.}} + ha:lock { valtype=flag; desc={Set for locked objects.}} + ha:nonetlist { valtype=flag; desc={subcircuit is not on the netlist and should not interfere with the netlist }} + ha:termname { valtype=flag; desc={when set the names of pins are shown.}} + ha:floater { valtype=flag; desc={subc part can be moved after subc placing}} + } + } + ha:flags_polygon { + hide=1 + desc={flag bits of a polygon} + type=ha + li:children { + ha:found { valtype=flag; desc={If set, this object has been found by FindConnection()}} + ha:clearpoly { valtype=flag; desc={For polygons, this flag means that pins and vias will normally clear these polygons (thus, thermals are required for electrical connection). When clear, polygons will solidly connect to pins and vias. }} + ha:fullpoly { valtype=flag; desc={For polygons, the full polygon is drawn (i.e. all parts instead of only the biggest one).}} + ha:selected { valtype=flag; desc={Set when the object is selected.}} + ha:auto { valtype=flag; desc={For lines and vias, indicates that these were created by the autorouter.}} + ha:drc { valtype=flag; desc={Set for objects that fail DRC: flag like FOUND flag for DRC checking.}} + ha:lock { valtype=flag; desc={Set for locked objects.}} + ha:nonetlist { valtype=flag; desc={subcircuit is not on the netlist and should not interfere with the netlist }} + ha:termname { valtype=flag; desc={when set the names of pins are shown.}} + ha:clearpolypoly { valtype=flag; desc={For polygons, apply clearance to nearby polygons}} + ha:floater { valtype=flag; desc={subc part can be moved after subc placing}} + } + } + ha:flags_text { + hide=1 + desc={flag bits of a text} + type=ha + li:children { + ha:found { valtype=flag; desc={If set, this object has been found by FindConnection()}} + ha:clearline { valtype=flag; desc={For lines and arcs, the line/arc will clear polygons instead of connecting to them.}} + ha:selected { valtype=flag; desc={Set when the object is selected.}} + ha:onsolder { valtype=flag; desc={For text, indicates that it is on the solder side.}} + ha:auto { valtype=flag; desc={For lines and vias, indicates that these were created by the autorouter.}} + ha:drc { valtype=flag; desc={Set for objects that fail DRC: flag like FOUND flag for DRC checking.}} + ha:lock { valtype=flag; desc={Set for locked objects.}} + ha:nonetlist { valtype=flag; desc={subcircuit is not on the netlist and should not interfere with the netlist }} + ha:termname { valtype=flag; desc={when set the names of pins are shown.}} + ha:dyntext { valtype=flag; desc={For text: dynamic string (substitute %patterns%)}} + ha:floater { valtype=flag; desc={subc part can be moved after subc placing}} + } + } + ha:flags_subcircuit { + hide=1 + desc={flag bits of a subcircuit} + type=ha + li:children { + ha:found { valtype=flag; desc={If set, this object has been found by FindConnection()}} + ha:selected { valtype=flag; desc={Set when the object is selected.}} + ha:auto { valtype=flag; desc={For lines and vias, indicates that these were created by the autorouter.}} + ha:drc { valtype=flag; desc={Set for objects that fail DRC: flag like FOUND flag for DRC checking.}} + ha:lock { valtype=flag; desc={Set for locked objects.}} + ha:nonetlist { valtype=flag; desc={subcircuit is not on the netlist and should not interfere with the netlist }} + ha:termname { valtype=flag; desc={when set the names of pins are shown.}} + ha:floater { valtype=flag; desc={subc part can be moved after subc placing}} + } + } + ha:flags_padstack { + hide=1 + desc={flag bits of a padstack} + type=ha + li:children { + ha:found { valtype=flag; desc={If set, this object has been found by FindConnection()}} + ha:hole { valtype=flag; desc={For pins and vias, this flag means that the pin or via is a hole without a copper annulus.}} + ha:clearline { valtype=flag; desc={For lines and arcs, the line/arc will clear polygons instead of connecting to them.}} + ha:selected { valtype=flag; desc={Set when the object is selected.}} + ha:auto { valtype=flag; desc={For lines and vias, indicates that these were created by the autorouter.}} + ha:warn { valtype=flag; desc={For pins, vias, and pads, set to indicate a warning.}} + ha:usetherm { valtype=flag; desc={Obsolete, indicates that pins/vias should be drawn with thermal fingers.}} + ha:drc { valtype=flag; desc={Set for objects that fail DRC: flag like FOUND flag for DRC checking.}} + ha:lock { valtype=flag; desc={Set for locked objects.}} + ha:nonetlist { valtype=flag; desc={subcircuit is not on the netlist and should not interfere with the netlist }} + ha:termname { valtype=flag; desc={when set the names of pins are shown.}} + ha:floater { valtype=flag; desc={subc part can be moved after subc placing}} + } + } + ha:flags_ratline { + hide=1 + desc={flag bits of a ratline} + type=ha + li:children { + ha:found { valtype=flag; desc={If set, this object has been found by FindConnection()}} + ha:rat { valtype=flag; desc={If set for a line, indicates that this line is a rat line instead of a copper trace.}} + ha:selected { valtype=flag; desc={Set when the object is selected.}} + ha:auto { valtype=flag; desc={For lines and vias, indicates that these were created by the autorouter.}} + ha:drc { valtype=flag; desc={Set for objects that fail DRC: flag like FOUND flag for DRC checking.}} + ha:lock { valtype=flag; desc={Set for locked objects.}} + ha:nonetlist { valtype=flag; desc={subcircuit is not on the netlist and should not interfere with the netlist }} + ha:floater { valtype=flag; desc={subc part can be moved after subc placing}} + } + } +} } Index: trunk/doc/developer/lihata_format/comm_flags_old.lht =================================================================== --- trunk/doc/developer/lihata_format/comm_flags_old.lht (nonexistent) +++ trunk/doc/developer/lihata_format/comm_flags_old.lht (revision 16843) @@ -0,0 +1,66 @@ +ha:lht_tree_doc { ha:comm { + +# these obsolete flags are only relevant in compatibility mode; +# they are not generated by the flag dump but they will not change +# thus this file is hand-written + + ha:flags_element { + hide=1 + desc={flag bits of an element} + type=ha + li:children { + ha:found { valtype=flag; desc={If set, this object has been found by FindConnection()}} + ha:selected { valtype=flag; desc={Set when the object is selected.}} + ha:auto { valtype=flag; desc={For lines and vias, indicates that these were created by the autorouter.}} + ha:drc { valtype=flag; desc={Set for objects that fail DRC: flag like FOUND flag for DRC checking.}} + ha:lock { valtype=flag; desc={Set for locked objects.}} + ha:nonetlist { valtype=flag; desc={subcircuit is not on the netlist and should not interfere with the netlist }} + ha:termname { valtype=flag; desc={when set the names of pins are shown.}} + ha:floater { valtype=flag; desc={subc part can be moved after subc placing}} + ha:onsolder { valtype=flag; desc={element is placed on the solder side}} + } + } + ha:flags_pinvia { + hide=1 + desc={flag bits of a pin or via} + type=ha + li:children { + ha:found { valtype=flag; desc={If set, this object has been found by FindConnection()}} + ha:hole { valtype=flag; desc={For pins and vias, this flag means that the pin or via is a hole without a copper annulus.}} + ha:clearline { valtype=flag; desc={For lines and arcs, the line/arc will clear polygons instead of connecting to them.}} + ha:selected { valtype=flag; desc={Set when the object is selected.}} + ha:auto { valtype=flag; desc={For lines and vias, indicates that these were created by the autorouter.}} + ha:warn { valtype=flag; desc={For pins, vias, and pads, set to indicate a warning.}} + ha:usetherm { valtype=flag; desc={Obsolete, indicates that pins/vias should be drawn with thermal fingers.}} + ha:drc { valtype=flag; desc={Set for objects that fail DRC: flag like FOUND flag for DRC checking.}} + ha:lock { valtype=flag; desc={Set for locked objects.}} + ha:nonetlist { valtype=flag; desc={subcircuit is not on the netlist and should not interfere with the netlist }} + ha:termname { valtype=flag; desc={when set the names of pins are shown.}} + ha:floater { valtype=flag; desc={subc part can be moved after subc placing}} + ha:pin { valtype=flag; desc={object is a pin (in an element)}} + ha:via { valtype=flag; desc={object is a via}} + } + } + + ha:flags_pad { + hide=1 + desc={flag bits of a pad} + type=ha + li:children { + ha:found { valtype=flag; desc={If set, this object has been found by FindConnection()}} + ha:hole { valtype=flag; desc={For pins and vias, this flag means that the pin or via is a hole without a copper annulus.}} + ha:clearline { valtype=flag; desc={For lines and arcs, the line/arc will clear polygons instead of connecting to them.}} + ha:selected { valtype=flag; desc={Set when the object is selected.}} + ha:auto { valtype=flag; desc={For lines and vias, indicates that these were created by the autorouter.}} + ha:warn { valtype=flag; desc={For pins, vias, and pads, set to indicate a warning.}} + ha:usetherm { valtype=flag; desc={Obsolete, indicates that pins/vias should be drawn with thermal fingers.}} + ha:drc { valtype=flag; desc={Set for objects that fail DRC: flag like FOUND flag for DRC checking.}} + ha:lock { valtype=flag; desc={Set for locked objects.}} + ha:nonetlist { valtype=flag; desc={subcircuit is not on the netlist and should not interfere with the netlist }} + ha:termname { valtype=flag; desc={when set the names of pins are shown.}} + ha:floater { valtype=flag; desc={subc part can be moved after subc placing}} + ha:pin { valtype=flag; desc={object is a pin (in an element)}} + ha:via { valtype=flag; desc={object is a via}} + } + } +} } Index: trunk/doc/developer/lihata_format/comm_lyt.lht =================================================================== --- trunk/doc/developer/lihata_format/comm_lyt.lht (nonexistent) +++ trunk/doc/developer/lihata_format/comm_lyt.lht (revision 16843) @@ -0,0 +1,39 @@ +ha:lht_tree_doc { ha:comm { + + ha:layer_mask { + hide=1 + type=ha + desc={layer type and location} + li:children { + ha:top { valtype=flag; desc={location: top side}} + ha:bottom { valtype=flag; desc={location: bottom side}} + ha:intern { valtype=flag; desc={location: internal}} + ha:logical { valtype=flag; desc={location: logical (not in the actual stackup)}} + ha:copper { valtype=flag; desc={material: copper}} + ha:silk { valtype=flag; desc={material: silk}} + ha:mask { valtype=flag; desc={material: mask}} + ha:paste { valtype=flag; desc={material: paste}} + ha:outline { valtype=flag; desc={"material": router path (board outline, slots, cutouts) }} + ha:substrate { valtype=flag; desc={material: substrate or insulator}} + +# ha:rat { valtype=flag; desc={(virtual: rat lines)}} +# ha:invis { valtype=flag; desc={(virtual: invisible)}} +# ha:assy { valtype=flag; desc={(virtual: assembly drawing)}} +# ha:fab { valtype=flag; desc={(virtual: fab drawing)}} +# ha:plateddrill { valtype=flag; desc={(drills: plated)}} +# ha:unplateddrill { valtype=flag; desc={(drills: unplated)}} +# ha:cross-section { valtype=flag; desc={(virtual: cross section drawing)}} +# ha:misc { valtype=flag; desc={(virtual: virtual misc layer)}} +# ha:virtual { valtype=flag; desc={(if set, the layer is not a physical layer but a drawing or documentation)}} + } + } + + ha:combining { + hide=1 + li:children { + ha:sub { valtype=flag; desc={draw in negative}} + ha:auto { valtype=flag; desc={padstacks draw their paste, mask and silk objects on the first layer (of matching type) that features the auto flag}} + } + } + +}} Index: trunk/doc/developer/lihata_format/comm_thermal.lht =================================================================== --- trunk/doc/developer/lihata_format/comm_thermal.lht (nonexistent) +++ trunk/doc/developer/lihata_format/comm_thermal.lht (revision 16843) @@ -0,0 +1,17 @@ +ha:lht_tree_doc { ha:comm { + + ha:thermal_heavy { + name=thermal + type=li + hide=1 + desc { list of thermal flags for heavy terminals, on the single layer the object is on } + li:children { + ha:on { valtype=none; desc={draw any thermal only if this string is present; else normal clearance is applied}} + ha:diag { valtype=none; desc={if present, the thermal is diagonal (45 degree rotated)}} + ha:round { valtype=none; desc={if present, thermal shape is rounded}} + ha:sharp { valtype=none; desc={if present, thermal shape is sharp}} + ha:solid { valtype=none; desc={if present, there is no thermal but a solid connection ("join")}} + } + } + +}} Index: trunk/doc/developer/lihata_format/render/gen_flags.sh =================================================================== --- trunk/doc/developer/lihata_format/render/gen_flags.sh (nonexistent) +++ trunk/doc/developer/lihata_format/render/gen_flags.sh (revision 16843) @@ -0,0 +1,38 @@ +../../../../src/pcb-rnd --dump-oflags | awk ' +BEGIN { + print "ha:lht_tree_doc { ha:comm {" +} + +function close_last() +{ + if (is_open) { + print " }" + print " }" + } + is_open = 0; +} + +/^[^\t]/ { + close_last() + print " ha:flags_" $1 " {" + print " hide=1" + print " desc={flag bits of a " $1 "}" + print " type=ha" + print " li:children {" + is_open=1 +} + +/^[\t]/ { + bit=$1 + name=$2 + help=$0 + sub("^[\t ]*" $1 "[\t ]*" $2 "[\t ]*", "", help) + print " ha:" name " { valtype=flag; desc={" help "}}" +} + +END { + close_last() + print "} }" +} + +' Property changes on: trunk/doc/developer/lihata_format/render/gen_flags.sh ___________________________________________________________________ Added: svn:executable ## -0,0 +1 ## +* \ No newline at end of property Index: trunk/doc/developer/lihata_format/render/html.awk =================================================================== --- trunk/doc/developer/lihata_format/render/html.awk (nonexistent) +++ trunk/doc/developer/lihata_format/render/html.awk (revision 16843) @@ -0,0 +1,154 @@ +function tbl_hdr(node, level) +{ + print " type:name value ver description" +} + +function get_name(node, ty, level) +{ + if (node "/name" in DATA) + nm = DATA[node "/name"] + else + nm = qstrip(NAME[node]) + if (ty != "") + nm = ty ":" nm + while(level > 0) { + nm = " " nm + level-- + } + return nm +} + +function get_valtype(node, vt) +{ + vt = DATA[node "/valtype"] + if (vt != "") + vt = "" vt "" + else + vt = " " + return vt +} + +function tbl_entry(node, level ,nm,vt,dsc,ty,vr) +{ + if (!(node in NAME)) { + print "Error: path not found: " node > "/dev/stderr" + return + } + ty = DATA[node "/type"] + nm = get_name(node, ty, level) + vt = get_valtype(node) + vr = DATA[node "/ver"] + if (vr == "") vr = " " + dsc = qstrip(DATA[node "/desc"]) + print " " nm " " vt " " vr " " dsc +} + +function tbl_entry_link(node, dst, level ,nm,vt,dsc,ty,vr) +{ + if (!(node in NAME)) { + print "Error: path not found: " node > "/dev/stderr" + return + } + if (!(dst in NAME)) { + print "Error: path not found: " dst > "/dev/stderr" + return + } + + ty = DATA[dst "/type"] + nm = get_name(node, ty, level) + vt = get_valtype(dst) + vr = DATA[dst "/ver"] + if (vr == "") vr = " " + dsc = qstrip(DATA[dst "/desc"]) + print " " nm " " vt " " vr " " dsc " -> " +} + +function gen_sub(root, level, v, n, N, node, dst_children) +{ + if (!(root in NAME)) { + print "Error: path not found: " root > "/dev/stderr" + return + } + v = children(N, root "/children") + for(n = 1; n <= v; n++) { + node = N[n] + if (TYPE[node] == "symlink") { + # normal node symlink: generate a link +# print "SY:" node " " DATA[node] "^^^" sy_is_recursive(node) > "/dev/stderr" + if (NAME[node] ~ "@dup") { + tbl_entry(DATA[node], level) + gen_sub(DATA[node], level+1) + } + else + tbl_entry_link(node, DATA[node], level) + } + else if ((node "/children") in NAME) { + tbl_entry(node, level) + if (TYPE[node "/children"] == "symlink") { + dst_children = DATA[node "/children"] + sub("/children$", "", dst_children) + gen_sub(dst_children, level+1) + } + else { + gen_sub(node, level+1) + } + } + else if (TYPE[node] == "hash") + tbl_entry(node, level) + else + print "Unhandled child (unknown type): " node > "/dev/stderr" + } +} + +function gen_main(path, v, n, N) +{ + print "

" DATA[path "/type"] ":" NAME[path] "

" +# print "

" +# print qstrip(DATA[path "/desc"]) + print "

" + print "" + tbl_hdr() + tbl_entry(path, 0) + gen_sub(path, 1) + print "
" +} + +function gen_roots(rpath, v, n, N) +{ + v = children(N, rpath) + for(n = 1; n <= v; n++) { + if (N[n] "/hide" in NAME) + continue + gen_main(N[n]) + } +} + +function gen_types(path, v, n, N, node) +{ + print "" + print "" + print "
type description" + + v = children(N, path) + for(n = 1; n <= v; n++) { + node = N[n] + print "
" NAME[node] + print " " qstripnl(DATA[node]) + } + print "
" +} + + +END { + print "

File format root nodes

" + print "

Each table below describes the full tree of one of the pcb-rnd file formats, from the root." + gen_roots("/lht_tree_doc/roots") + + print "

Common subtrees

" + print "

Each table below describes a subtree that usually does not specify a whole tree (thus they are usually not a valid file on their own). These subtrees are described in a separate table because they are used from multiple other trees." + gen_roots("/lht_tree_doc/comm") + + print "

Types

" + print "

" + gen_types("/lht_tree_doc/types") +} Index: trunk/doc/developer/lihata_format/render/lht.awk =================================================================== --- trunk/doc/developer/lihata_format/render/lht.awk (nonexistent) +++ trunk/doc/developer/lihata_format/render/lht.awk (revision 16843) @@ -0,0 +1,62 @@ +BEGIN { + q="\"" +} + +function parent(path) +{ + sub("/[^/]*$", "", path) + return path +} + +function children(DST, path) +{ + return split(CHILDREN[path], DST, "[|]") +} + +function sy_is_recursive(path, dp) +{ + dp = DATA[path] + gsub("/[0-9]::", "/", path) + if (path ~ dp) + rturn 1 + return 0 +} + +function sy_href(path) +{ + return "#" path +} + +(($1 == "open") || ($1 == "data")) { + path=$3 + gsub("[0-9]+::", "", path) + TYPE[path] = $2 + p = parent(path) + if (CHILDREN[p] == "") + CHILDREN[p] = path + else + CHILDREN[p] = CHILDREN[p] "|" path + data=$4 + gsub("\\\\057", "/", data) + DATA[path] = data + + name=$3 + sub("^.*/", "", name) + sub(".*::", "", name) + NAME[path] = name +} + +function qstrip(s) +{ + gsub("[\\\\]+164", " ", s) + gsub("[\\\\]n", " ", s) + return s +} + +function qstripnl(s) +{ + gsub("[\\\\]+164", " ", s) + gsub("[\\\\]n", "\n", s) + return s +} + Index: trunk/doc/developer/lihata_format/render/render.sh =================================================================== --- trunk/doc/developer/lihata_format/render/render.sh (nonexistent) +++ trunk/doc/developer/lihata_format/render/render.sh (revision 16843) @@ -0,0 +1,16 @@ +#!/bin/sh + +echo ' + + +' + +for n in ../*.lht +do + lhtflat < $n +done | tee Flat | awk -F "[\t]" -f lht.awk -f html.awk + +echo ' + + +' Property changes on: trunk/doc/developer/lihata_format/render/render.sh ___________________________________________________________________ Added: svn:executable ## -0,0 +1 ## +* \ No newline at end of property Index: trunk/doc/developer/lihata_format/root_board.lht =================================================================== --- trunk/doc/developer/lihata_format/root_board.lht (nonexistent) +++ trunk/doc/developer/lihata_format/root_board.lht (revision 16843) @@ -0,0 +1,181 @@ +ha:lht_tree_doc { ha:roots { + + ha:pcb-rnd-board-v* { + type=ha + desc { + The full, self-contained description of a printed circuit board. + This is the root of a board .lht file. The * after the v in the name + is an integer which is the format version. + } + li:children { + ha:meta { + type=ha + desc { Any meta-data that won't directly turn into physical material (e.g. copper). } + li:children { + ha:board_name { valtype=string; desc={User assigned name of the board}} + ha:grid { + type=ha + desc { User interface last grid settings } + li:children { + ha:offs_x { valtype=coord; desc={grid origin: X offset from 0;0}} + ha:offs_y { valtype=coord; desc={grid origin: Y offset from 0;0}} + ha:spacing { valtype=coord; desc={distance between two grid points both in X and Y directions }} + } + } + ha:size { + type=ha + desc { object size related settings } + li:children { + ha:x { valtype=coord; desc={drawing area size X (width)}} + ha:y { valtype=coord; desc={drawing area size Y (height)}} + ha:isle_area_nm2 { valtype=double; desc={remove polygon islands smaller than this value, specified in mm2}} + ha:thermal_scale { valtype=double; desc={scale all thermals on the board by this factor}} + } + } + ha:drc { + type=ha + desc { design rule checker settings for the old DRC } + li:children { + ha:bloat { valtype=coord; desc={Minimum copper spacing}} + ha:shrink { valtype=coord; desc={Minimum overlap between validly touching copper objects}} + ha:min_width { valtype=coord; desc={Minimum copper width}} + ha:min_silk { valtype=coord; desc={Minimum silk width}} + ha:min_drill { valtype=coord; desc={Minimum drill diameter}} + ha:min_ring { valtype=coord; desc={Minimum annular ring width}} + } + } + ha:cursor { + type=ha + desc { obsolete cursor/view state } + li:children { + ha:x { valtype=coord; obs=1; desc={last positin, X (horizontal)}} + ha:y { valtype=coord; obs=1; desc={last positin, Y (horizontal)}} + ha:zoom { valtype=double; obs=1; desc={last view zoom factor}} + } + } + } + } + ha:layer_stack { + type=ha + desc { physical layer stack information: geometry and properties of physical layers } + li:children { + ha:groups { + type=li + desc { ordered list of physical layers from top to bottom } + li:children { + ha:INTEGER { + li:name_patterns={p={[0-9]+}} + type=ha + desc { a layer group (a physical layer of the board); the ID of the layer group is the integer in the name of the node } + li:children { + ha:name { valtype=string; desc={user assigned name of the layer group, e.g. "top copper"}} + ha:type { + type=ha + desc { a flag-list of layer type flag bits } + sy:children = {/lht_tree_doc/comm/layer_mask/children} + } + ha:layers { + type=li + desc { ordered list of logical layer IDs hosted by this layer group } + } + } + } + } + } + } + } + ha:font { + type=ha + desc { font kit: all fonts used on the board (if no font specified, default font will be used) } + li:children { + sy:FONT-ID {/lht_tree_doc/roots/pcb-rnd-font-v1/children/FONT-ID} + } + } + ha:styles { + type=ha + desc { routing styles hash: collection of all available routing syles } + ha:ROUTE-STYLE-NAME { + type=ha + desc { routing style: a collection of pen settings } + li:children { + ha:thickness { valtype=coord; desc={default trace thickness (affects lines and arcs)}} + ha:clearance { valtype=coord; desc={default clearance (affects lines, arcs and polygons)}} + ha:diameter { valtype=coord; ver={<=5} desc={old round via outer diameter; removed in favor of padstack prototype based vias, see via_proto}} + ha:hole { valtype=coord; ver={<=5} desc={old round via hole diameter; removed in favor of padstack prototype based vias, see via_proto}} + ha:via_proto { valtype=integer; ver={>5} desc={padstack prototype ID used for placing new vias}} + sy:attr@dup {/lht_tree_doc/comm/attributes} + } + } + } + ha:netlists { + type=ha + desc { all availale netlists } + li:children { + ha:netlist { + type=li + desc { the input netlist (as seen in the last netlist import, a.k.a. forward annotation) } + li:children { + ha:NETNAME { + type=ha + desc { a network } + li:children { + ha:conn { + type=li + desc { list of terminals connceted to the network } + li:children { + ha:diameter { valtype=string; desc={refdes-terminal}} + } + } + sy:attr@dup = {/lht_tree_doc/comm/attributes_v5p} + } + } + } + } + ha:netlist_patch { + type=li + desc { a list of intentional deviations from the input netlist, a.k.a. material for back annotation } + li:children { + ha:net_info { + type=li + desc { describe the current state of a net, as seen on the input } + li:children { + ha:net { valtype=string; desc={net name; first item on the list, only once}} + ha:term { valtype=string; desc={terminal name; zero or more items starting from the second item}} + } + } + ha:add_conn { + type=ha + desc { the 'as built' network requires a new conncetion to be created during the back annotation } + li:children { + ha:net { valtype=string; desc={net name the terminal should be added to}} + ha:term { valtype=string; desc={terminal name}} + } + } + ha:del_conn { + type=ha + desc { the 'as built' network requires an existing conncetion to be removed during the back annotation } + li:children { + ha:net { valtype=string; desc={net name the terminal should be removed from}} + ha:term { valtype=string; desc={terminal name}} + } + } + ha:change_attrib { + type=ha + desc { the 'as built' network requires an attribute to be set or changed } + li:children { + ha:net { valtype=string; desc={net name whose attribute needs to be changed }} + ha:key { valtype=string; desc={key (name) of the attribute}} + ha:val { valtype=string; desc={new value of the attribute}} + } + } + } + } + } + } + sy:conf = {/lht_tree_doc/roots/pcb-rnd-conf-v1} + sy:data = {/lht_tree_doc/comm/data} + sy:attributes@dup = {/lht_tree_doc/comm/attributes} + } + } + +}} Index: trunk/doc/developer/lihata_format/root_conf.lht =================================================================== --- trunk/doc/developer/lihata_format/root_conf.lht (nonexistent) +++ trunk/doc/developer/lihata_format/root_conf.lht (revision 16843) @@ -0,0 +1,22 @@ +ha:lht_tree_doc { ha:roots { + + ha:pcb-rnd-conf-v1 { + type=li + desc=complete pcb-rnd configuration tree + li:children { + ha:overwrite { + type=ha + desc={overwrite values while merging; children: a full or partial config tree} + } + ha:prepend { + type=ha + desc={prepend values while merging; children: a full or partial config tree} + } + ha:append { + type=ha + desc={append values while merging; children: a full or partial config tree} + } + } + } + +}} Index: trunk/doc/developer/lihata_format/root_font.lht =================================================================== --- trunk/doc/developer/lihata_format/root_font.lht (nonexistent) +++ trunk/doc/developer/lihata_format/root_font.lht (revision 16843) @@ -0,0 +1,69 @@ +ha:lht_tree_doc { ha:roots { + + ha:pcb-rnd-font-v1 { + type=li + desc={font description} + li:children { + ha:FONT-ID { + type=ha + li:name_patterns={p={geda_pcb}; p={[0-9]+}} + desc { the full description of a font; the node name is the integer font id or "geda_pcb" for font 0 (for historical reasons); the name is used only to make each node unique, the ID is also a field below } + li:children { + ha:cell_height { valtype=coord; desc={height of the tallest glyph}} + ha:cell_width { valtype=coord; desc={width of the widest glyph}} + ha:id { valtype=integer; desc={unique font ID within the fontkit; fonts are referenced by ID}} + ha:name { valtype=string; desc={user specified, user readable font name}} + ha:symbols { + type=ha + desc { a collections of glyphs availbale in the font } + li:children { + ha:CHARACTER { + type=ha + li:name_patterns={p={.}} + desc { Description of a glyph (symbol). Node name is a signel ASCII character or is of format &xx where xx is a hex digit of the ASCII code of the character. Characters that must use the hex version are: codes below 33 or over 126, &, #, {, \}, /, :, ;, =, \\, :} + li:children { + ha:height { valtype=coord; desc={height of the glyph}} + ha:width { valtype=coord; desc={width of the glyph}} + ha:delta { valtype=coord; desc={extra space always inserted after the current symbol, before the next character}} + ha:objects { + type=li + desc={objects that make up the symbol; IDs are per symbol local IDs counted from 0} + li:children { + ha:line.ID { + type=ha + desc={round cap line, simplified} + li:children { + ha:x1 = { valtype=coord; desc={line first endpoint, horizontal offset }} + ha:y1 = { valtype=coord; desc={line first endpoint, vertical offset }} + ha:x2 = { valtype=coord; desc={line second endpoint, horizontal offset }} + ha:y2 = { valtype=coord; desc={line second endpoint, vertical offset }} + ha:thickness = { valtype=coord; desc={width of the line }} + } + } + ha:simplearc.ID { + type=ha + desc={round cap arc, simplified } + li:children { + ha:x = { valtype=coord; desc={center, X coord}} + ha:y = { valtype=coord; desc={center, Y coord}} + ha:r = { valtype=coord; desc={radius (of the centerline of the arc) }} + ha:thickness = { valtype=coord; desc={width of the pen the arc is drawn with }} + ha:astart = { valtype=angle; desc={ start angle}} + ha:adelta = { valtype=angle; desc={ delta angle}} + } + } + ha:simplepoly.ID { + type=li + desc={round cap arc, simplified; contains a flat list of coords; each coord pair is an x;y corner of the outline of the polygon (odd indices are x coords, even indices are y coords) } + } + } + } + } + } + } + } + } + } + } + } +}} \ No newline at end of file Index: trunk/doc/developer/lihata_format/root_subc.lht =================================================================== --- trunk/doc/developer/lihata_format/root_subc.lht (nonexistent) +++ trunk/doc/developer/lihata_format/root_subc.lht (revision 16843) @@ -0,0 +1,20 @@ +ha:lht_tree_doc { ha:roots { + + ha:pcb-rnd-subcircuit-v* { + type=li + desc={footprint file containing a single subcircuit} + li:children { + ha:subc.ID { + type=ha + desc={an instance (full copy) of a subcircuit} + ver = {>=3} + li:children { + ha:uid = { valtype=minuid; desc={UID assigned by the user to track subc history }} + sy:attr@dup = {/lht_tree_doc/comm/attributes} + sy:flags@dup = {/lht_tree_doc/comm/flags_subcircuit} + sy:data = {/lht_tree_doc/comm/data} + } + } + } + } +}} \ No newline at end of file Index: trunk/doc/developer/lihata_format/tree.html =================================================================== --- trunk/doc/developer/lihata_format/tree.html (nonexistent) +++ trunk/doc/developer/lihata_format/tree.html (revision 16843) @@ -0,0 +1,554 @@ + + + + +

File format root nodes

+

Each table below describes the full tree of one of the pcb-rnd file formats, from the root. +

ha:pcb-rnd-board-v*

+

+ +
type:name value ver description +
ha:pcb-rnd-board-v*     The full, self-contained description of a printed circuit board. This is the root of a board .lht file. The * after the v in the name is an integer which is the format version. +
 ha:meta     Any meta-data that won't directly turn into physical material (e.g. copper). +
  board_name string   User assigned name of the board +
  ha:grid     User interface last grid settings +
   offs_x coord   grid origin: X offset from 0;0 +
   offs_y coord   grid origin: Y offset from 0;0 +
   spacing coord   distance between two grid points both in X and Y directions +
  ha:size     object size related settings +
   x coord   drawing area size X (width) +
   y coord   drawing area size Y (height) +
   isle_area_nm2 double   remove polygon islands smaller than this value, specified in mm2 +
   thermal_scale double   scale all thermals on the board by this factor +
  ha:drc     design rule checker settings for the old DRC +
   bloat coord   Minimum copper spacing +
   shrink coord   Minimum overlap between validly touching copper objects +
   min_width coord   Minimum copper width +
   min_silk coord   Minimum silk width +
   min_drill coord   Minimum drill diameter +
   min_ring coord   Minimum annular ring width +
  ha:cursor     obsolete cursor/view state +
   x coord   last positin, X (horizontal) +
   y coord   last positin, Y (horizontal) +
   zoom double   last view zoom factor +
 ha:layer_stack     physical layer stack information: geometry and properties of physical layers +
  li:groups     ordered list of physical layers from top to bottom +
   ha:INTEGER     a layer group (a physical layer of the board); the ID of the layer group is the integer in the name of the node +
    name string   user assigned name of the layer group, e.g. "top copper" +
    ha:type     a flag-list of layer type flag bits +
     top flag   location: top side +
     bottom flag   location: bottom side +
     intern flag   location: internal +
     logical flag   location: logical (not in the actual stackup) +
     copper flag   material: copper +
     silk flag   material: silk +
     mask flag   material: mask +
     paste flag   material: paste +
     outline flag   "material": router path (board outline, slots, cutouts) +
     substrate flag   material: substrate or insulator +
    li:layers     ordered list of logical layer IDs hosted by this layer group +
 ha:font     font kit: all fonts used on the board (if no font specified, default font will be used) +
  ha:FONT-ID     the full description of a font; the node name is the integer font id or "geda_pcb" for font 0 (for historical reasons); the name is used only to make each node unique, the ID is also a field below -> +
 ha:styles     routing styles hash: collection of all available routing syles +
 ha:netlists     all availale netlists +
  li:netlist     the input netlist (as seen in the last netlist import, a.k.a. forward annotation) +
   ha:NETNAME     a network +
    li:conn     list of terminals connceted to the network +
     diameter string   refdes-terminal +
    ha:attributes   >=5 a hash of attribute key=value pairs +
     attrib-key string   attribute value +
  li:netlist_patch     a list of intentional deviations from the input netlist, a.k.a. material for back annotation +
   li:net_info     describe the current state of a net, as seen on the input +
    net string   net name; first item on the list, only once +
    term string   terminal name; zero or more items starting from the second item +
   ha:add_conn     the 'as built' network requires a new conncetion to be created during the back annotation +
    net string   net name the terminal should be added to +
    term string   terminal name +
   ha:del_conn     the 'as built' network requires an existing conncetion to be removed during the back annotation +
    net string   net name the terminal should be removed from +
    term string   terminal name +
   ha:change_attrib     the 'as built' network requires an attribute to be set or changed +
    net string   net name whose attribute needs to be changed +
    key string   key (name) of the attribute +
    val string   new value of the attribute +
 li:conf     complete pcb-rnd configuration tree -> +
 ha:data     Layers and global objects of the board -> +
 ha:attributes     a hash of attribute key=value pairs +
  attrib-key string   attribute value +
+

li:pcb-rnd-conf-v1

+

+ +
type:name value ver description +
li:pcb-rnd-conf-v1     complete pcb-rnd configuration tree +
 ha:overwrite     overwrite values while merging; children: a full or partial config tree +
 ha:prepend     prepend values while merging; children: a full or partial config tree +
 ha:append     append values while merging; children: a full or partial config tree +
+

li:pcb-rnd-font-v1

+

+ +
type:name value ver description +
li:pcb-rnd-font-v1     font description +
 ha:FONT-ID     the full description of a font; the node name is the integer font id or "geda_pcb" for font 0 (for historical reasons); the name is used only to make each node unique, the ID is also a field below +
  cell_height coord   height of the tallest glyph +
  cell_width coord   width of the widest glyph +
  id integer   unique font ID within the fontkit; fonts are referenced by ID +
  name string   user specified, user readable font name +
  ha:symbols     a collections of glyphs availbale in the font +
   ha:CHARACTER     Description of a glyph (symbol). Node name is a signel ASCII character or is of format &xx where xx is a hex digit of the ASCII code of the character. Characters that must use the hex version are: codes below 33 or over 126, &, #, {, }, /, :, ;, =, \, : +
    height coord   height of the glyph +
    width coord   width of the glyph +
    delta coord   extra space always inserted after the current symbol, before the next character +
    li:objects     objects that make up the symbol; IDs are per symbol local IDs counted from 0 +
     ha:line.ID     round cap line, simplified +
      x1 coord   line first endpoint, horizontal offset +
      y1 coord   line first endpoint, vertical offset +
      x2 coord   line second endpoint, horizontal offset +
      y2 coord   line second endpoint, vertical offset +
      thickness coord   width of the line +
     ha:simplearc.ID     round cap arc, simplified +
      x coord   center, X coord +
      y coord   center, Y coord +
      r coord   radius (of the centerline of the arc) +
      thickness coord   width of the pen the arc is drawn with +
      astart angle   start angle +
      adelta angle   delta angle +
     li:simplepoly.ID     round cap arc, simplified; contains a flat list of coords; each coord pair is an x;y corner of the outline of the polygon (odd indices are x coords, even indices are y coords) +
+

li:pcb-rnd-subcircuit-v*

+

+ +
type:name value ver description +
li:pcb-rnd-subcircuit-v*     footprint file containing a single subcircuit +
 ha:subc.ID   >=3 an instance (full copy) of a subcircuit +
  uid minuid   UID assigned by the user to track subc history +
  ha:attributes     a hash of attribute key=value pairs +
   attrib-key string   attribute value +
  ha:flags_subcircuit     flag bits of a subcircuit +
   found flag   If set, this object has been found by FindConnection() +
   selected flag   Set when the object is selected. +
   auto flag   For lines and vias, indicates that these were created by the autorouter. +
   drc flag   Set for objects that fail DRC: flag like FOUND flag for DRC checking. +
   lock flag   Set for locked objects. +
   nonetlist flag   subcircuit is not on the netlist and should not interfere with the netlist +
   termname flag   when set the names of pins are shown. +
   floater flag   subc part can be moved after subc placing +
  ha:data     Layers and global objects of the board -> +
+

Common subtrees

+

Each table below describes a subtree that usually does not specify a whole tree (thus they are usually not a valid file on their own). These subtrees are described in a separate table because they are used from multiple other trees. +

ha:data

+

+ +
type:name value ver description +
ha:data     Layers and global objects of the board +
 li:objects     List of global (non-layer/multi-layer) objects +
  ha:padstack_ref.ID   >=4 a padstack reference (instance) placed on the board (e.g. used as a via) +
   proto integer   padstack prototype ID to use, from the parent data's proto list +
   x coord   place padstack with origin at this horizontal coordinate +
   y coord   place padstack with origin at this vertical coordinate +
   clearance coord   global clearance; if non-zero, overrides local (per shape) clearance +
   rot angle   rotation angle in degrees +
   xmirror integer   0 or 1; if 1, mirror all shapes over the x (horizontal) axis (so that y coords are flipped) +
   smirror integer   0 or 1; if 1, mirror the layer stackup: bottom becomes top, top becomes bottom (a.k.a. "place on the other side") +
   ha:attributes     a hash of attribute key=value pairs +
    attrib-key string   attribute value +
   ha:flags_padstack     flag bits of a padstack +
    found flag   If set, this object has been found by FindConnection() +
    hole flag   For pins and vias, this flag means that the pin or via is a hole without a copper annulus. +
    clearline flag   For lines and arcs, the line/arc will clear polygons instead of connecting to them. +
    selected flag   Set when the object is selected. +
    auto flag   For lines and vias, indicates that these were created by the autorouter. +
    warn flag   For pins, vias, and pads, set to indicate a warning. +
    usetherm flag   Obsolete, indicates that pins/vias should be drawn with thermal fingers. +
    drc flag   Set for objects that fail DRC: flag like FOUND flag for DRC checking. +
    lock flag   Set for locked objects. +
    nonetlist flag   subcircuit is not on the netlist and should not interfere with the netlist +
    termname flag   when set the names of pins are shown. +
    floater flag   subc part can be moved after subc placing +
   li:thermal     list of thermal shapes, per layer +
    li:LAYERID     integer layer ID the thermal affects; each word is a boolean flag that is either present on the list or is missing; only one shape may be present +
     on none   thermal is present on this layer; if not present, all other thermal flags are ignored on this layer +
     diag none   thermal graphics is not axis aligned but diagonal (rotated by 45 degrees) +
     round none   shape: rounded edge fingers +
     sharp none   shape: sharp edge fingers +
     solid none   shape: no thermal relief, solid connection without clearance +
     noshape none   shape: special: omit copper shape of the padstack on this layer +
  ha:via.ID   <=4 an old via object (loaded as padstack in the new model) +
   x coord   place padstack with origin at this horizontal coordinate +
   y coord   place padstack with origin at this vertical coordinate +
   thickness coord   copper shape dimension (diameter) +
   clearance coord   copper clearance around the copper shape +
   mask coord   mask cutout shape dimension (diameter) +
   hole coord   drill/hole diameter +
   name string   optional name attribute +
   number string   for a pin (or to-be-pin) this is the terminal ID +
   ha:attributes     a hash of attribute key=value pairs +
    attrib-key string   attribute value +
   ha:flags_pinvia     flag bits of a pin or via +
    found flag   If set, this object has been found by FindConnection() +
    hole flag   For pins and vias, this flag means that the pin or via is a hole without a copper annulus. +
    clearline flag   For lines and arcs, the line/arc will clear polygons instead of connecting to them. +
    selected flag   Set when the object is selected. +
    auto flag   For lines and vias, indicates that these were created by the autorouter. +
    warn flag   For pins, vias, and pads, set to indicate a warning. +
    usetherm flag   Obsolete, indicates that pins/vias should be drawn with thermal fingers. +
    drc flag   Set for objects that fail DRC: flag like FOUND flag for DRC checking. +
    lock flag   Set for locked objects. +
    nonetlist flag   subcircuit is not on the netlist and should not interfere with the netlist +
    termname flag   when set the names of pins are shown. +
    floater flag   subc part can be moved after subc placing +
    pin flag   object is a pin (in an element) +
    via flag   object is a via +
 li:layers     ordered list of layers; v1 required the order to be top-bottom physically; v1 also required silk layers to be at the end (same resrtictions as in the old .pcb format; only real (non-bound) layers have attributes) +
  ha:NAME     a logical layer +
   lid integer >=2 layer ID +
   visible integer   only in real (non-boud) layers: 1 if the layer is visible, 0 if not (UI setting) +
   group integer   only in real (non-boud) layers: "parent" layer group ID +
   color string >=5 layer color on UI, in #rrggbb format +
   stack_offs integer   only in bound layers: match offset e.g. for internal copper layers +
   ha:type     only for bound layers: try to bind to this type of layer on the host board +
    top flag   location: top side +
    bottom flag   location: bottom side +
    intern flag   location: internal +
    logical flag   location: logical (not in the actual stackup) +
    copper flag   material: copper +
    silk flag   material: silk +
    mask flag   material: mask +
    paste flag   material: paste +
    outline flag   "material": router path (board outline, slots, cutouts) +
    substrate flag   material: substrate or insulator +
   combining   >=2 layer combination (compositing) flags +
    sub flag   draw in negative +
    auto flag   padstacks draw their paste, mask and silk objects on the first layer (of matching type) that features the auto flag +
   ha:attributes     a hash of attribute key=value pairs +
    attrib-key string   attribute value +
   li:objects     list of drawing primitives put on this layer +
    ha:line.ID     round cap line +
     x1 coord   line first endpoint, horizontal offset +
     y1 coord   line first endpoint, vertical offset +
     x2 coord   line second endpoint, horizontal offset +
     y2 coord   line second endpoint, vertical offset +
     thickness coord   width of the line +
     clearance coord   copper clearance around the object +
     ha:attributes     a hash of attribute key=value pairs +
      attrib-key string   attribute value +
     ha:flags_line     flag bits of a line +
      found flag   If set, this object has been found by FindConnection() +
      clearline flag   For lines and arcs, the line/arc will clear polygons instead of connecting to them. +
      selected flag   Set when the object is selected. +
      auto flag   For lines and vias, indicates that these were created by the autorouter. +
      rubberend flag   For lines, used internally for rubber band moves: indicates one end already rubber banding. +
      usetherm flag   Obsolete, indicates that pins/vias should be drawn with thermal fingers. +
      drc flag   Set for objects that fail DRC: flag like FOUND flag for DRC checking. +
      lock flag   Set for locked objects. +
      nonetlist flag   subcircuit is not on the netlist and should not interfere with the netlist +
      termname flag   when set the names of pins are shown. +
      floater flag   subc part can be moved after subc placing +
     li:thermal     list of thermal flags for heavy terminals, on the single layer the object is on +
      on none   draw any thermal only if this string is present; else normal clearance is applied +
      diag none   if present, the thermal is diagonal (45 degree rotated) +
      round none   if present, thermal shape is rounded +
      sharp none   if present, thermal shape is sharp +
      solid none   if present, there is no thermal but a solid connection ("join") +
    ha:arc.ID     round cap elliptic arc (only width==height is fully supported at the moment) +
     x coord   center, X coord +
     y coord   center, Y coord +
     width coord   radius (of the centerline of the arc) in X direction +
     height coord   radius (of the centerline of the arc) in Y direction +
     thickness coord   width of the pen the arc is drawn with +
     clearance coord   copper clearance around the object +
     astart angle   start angle +
     adelta angle   delta angle +
     ha:attributes     a hash of attribute key=value pairs +
      attrib-key string   attribute value +
     ha:flags_arc     flag bits of a arc +
      found flag   If set, this object has been found by FindConnection() +
      clearline flag   For lines and arcs, the line/arc will clear polygons instead of connecting to them. +
      selected flag   Set when the object is selected. +
      auto flag   For lines and vias, indicates that these were created by the autorouter. +
      rubberend flag   For lines, used internally for rubber band moves: indicates one end already rubber banding. +
      usetherm flag   Obsolete, indicates that pins/vias should be drawn with thermal fingers. +
      drc flag   Set for objects that fail DRC: flag like FOUND flag for DRC checking. +
      lock flag   Set for locked objects. +
      nonetlist flag   subcircuit is not on the netlist and should not interfere with the netlist +
      termname flag   when set the names of pins are shown. +
      floater flag   subc part can be moved after subc placing +
     li:thermal     list of thermal flags for heavy terminals, on the single layer the object is on +
      on none   draw any thermal only if this string is present; else normal clearance is applied +
      diag none   if present, the thermal is diagonal (45 degree rotated) +
      round none   if present, thermal shape is rounded +
      sharp none   if present, thermal shape is sharp +
      solid none   if present, there is no thermal but a solid connection ("join") +
    ha:polygon.ID     polygon, as drawn (unclipped) +
     clearance coord >=3 copper clearance around the object +
     ha:attributes     a hash of attribute key=value pairs +
      attrib-key string   attribute value +
     ha:flags_polygon     flag bits of a polygon +
      found flag   If set, this object has been found by FindConnection() +
      clearpoly flag   For polygons, this flag means that pins and vias will normally clear these polygons (thus, thermals are required for electrical connection). When clear, polygons will solidly connect to pins and vias. +
      fullpoly flag   For polygons, the full polygon is drawn (i.e. all parts instead of only the biggest one). +
      selected flag   Set when the object is selected. +
      auto flag   For lines and vias, indicates that these were created by the autorouter. +
      drc flag   Set for objects that fail DRC: flag like FOUND flag for DRC checking. +
      lock flag   Set for locked objects. +
      nonetlist flag   subcircuit is not on the netlist and should not interfere with the netlist +
      termname flag   when set the names of pins are shown. +
      clearpolypoly flag   For polygons, apply clearance to nearby polygons +
      floater flag   subc part can be moved after subc placing +
     li:thermal     list of thermal flags for heavy terminals, on the single layer the object is on +
      on none   draw any thermal only if this string is present; else normal clearance is applied +
      diag none   if present, the thermal is diagonal (45 degree rotated) +
      round none   if present, thermal shape is rounded +
      sharp none   if present, thermal shape is sharp +
      solid none   if present, there is no thermal but a solid connection ("join") +
     li:geometry     first item is the outer contour, subsequent, optional items are holes +
      contour coordtbl   2 column table of x;y coords for the outer contour +
      hole coordtbl   2 column table of x;y coords for a hole +
    ha:text.ID     single line text object +
     x coord   placement: X coord +
     y coord   placement: Y coord +
     role string   when part of an old element, determines which of the three hardwired text object role is used (footprint, refdes or value) +
     string string   text string (payload) +
     fid integer   font ID +
     scale integer   text size scale in % +
     direction integer   rotation in 90 degree steps (0 is horizontal) +
     ha:attributes     a hash of attribute key=value pairs +
      attrib-key string   attribute value +
     ha:flags_text     flag bits of a text +
      found flag   If set, this object has been found by FindConnection() +
      clearline flag   For lines and arcs, the line/arc will clear polygons instead of connecting to them. +
      selected flag   Set when the object is selected. +
      onsolder flag   For text, indicates that it is on the solder side. +
      auto flag   For lines and vias, indicates that these were created by the autorouter. +
      drc flag   Set for objects that fail DRC: flag like FOUND flag for DRC checking. +
      lock flag   Set for locked objects. +
      nonetlist flag   subcircuit is not on the netlist and should not interfere with the netlist +
      termname flag   when set the names of pins are shown. +
      dyntext flag   For text: dynamic string (substitute %patterns%) +
      floater flag   subc part can be moved after subc placing +
 li:padstack_prototypes   >=4 +
  unused none   placeholder for markign uunsed slot to keep slot indices for early lihata v4 +
  ha:ps_proto_v4.PID     padstack prototype specification, as introduced in lihata board v4 +
   hdia coord   hole diameter; 0 means no hole +
   htop integer   hole start: copper layer index from the top (positive) or bottom (negative) copper layer (0 means top copper layer) +
   hbottom integer   hole start: copper layer index from the bottom (positive) or top (negative) copper layer (0 means bottom copper layer) +
   plated integer   0=unplated hole; 1=plated hole +
   name string >=5 optional user assigned prototype name +
   li:shape     shape per layer type definition +
    ha:ps_shape_v4     shape on a specific layer type (specified by layer_mask and combining), as specifie in lihata board v4; shape is either ps_poly, ps_line or ps_circ (only one of these will present per layer type); shape coords are relative to padstack origin +
     ha:layer_mask     layer type and location +
      top flag   location: top side +
      bottom flag   location: bottom side +
      intern flag   location: internal +
      logical flag   location: logical (not in the actual stackup) +
      copper flag   material: copper +
      silk flag   material: silk +
      mask flag   material: mask +
      paste flag   material: paste +
      outline flag   "material": router path (board outline, slots, cutouts) +
      substrate flag   material: substrate or insulator +
     combining     layer compositing match +
      sub flag   draw in negative +
      auto flag   padstacks draw their paste, mask and silk objects on the first layer (of matching type) that features the auto flag +
     clearance coord   local, per-layer-type clearance; applied if global padstack clearance is 0 +
     li:ps_poly     arbitrary convex polygon shape; contains a list of x;y coordinates +
     ha:ps_line     straight line shape, round or square cap +
      x1 coord   line first endpoint, horizontal offset +
      y1 coord   line first endpoint, vertical offset +
      x2 coord   line second endpoint, horizontal offset +
      y2 coord   line second endpoint, vertical offset +
      thickness coord   width of the line +
      square integer   0=round cap; 1=square cap +
     ha:ps_circ     filled circle shape +
      x coord   center, horizontal offset +
      y coord   center, vertical offset +
      dia coord   circle diameter +
 ha:subc.ID   >=3 an instance (full copy) of a subcircuit +
  uid minuid   UID assigned by the user to track subc history +
  ha:attributes     a hash of attribute key=value pairs +
   attrib-key string   attribute value +
  ha:flags_subcircuit     flag bits of a subcircuit +
   found flag   If set, this object has been found by FindConnection() +
   selected flag   Set when the object is selected. +
   auto flag   For lines and vias, indicates that these were created by the autorouter. +
   drc flag   Set for objects that fail DRC: flag like FOUND flag for DRC checking. +
   lock flag   Set for locked objects. +
   nonetlist flag   subcircuit is not on the netlist and should not interfere with the netlist +
   termname flag   when set the names of pins are shown. +
   floater flag   subc part can be moved after subc placing +
  ha:data     Layers and global objects of the board -> +
 ha:element.ID   <3 an instance (full copy) of an obsolete element footprint +
  x coord   element origin (diamond), horizontal offset +
  y coord   element origin (diamond), vertical offset +
  ha:attributes     a hash of attribute key=value pairs +
   attrib-key string   attribute value +
  ha:flags_element     flag bits of an element +
   found flag   If set, this object has been found by FindConnection() +
   selected flag   Set when the object is selected. +
   auto flag   For lines and vias, indicates that these were created by the autorouter. +
   drc flag   Set for objects that fail DRC: flag like FOUND flag for DRC checking. +
   lock flag   Set for locked objects. +
   nonetlist flag   subcircuit is not on the netlist and should not interfere with the netlist +
   termname flag   when set the names of pins are shown. +
   floater flag   subc part can be moved after subc placing +
   onsolder flag   element is placed on the solder side +
  li:objects     list of special objects that make up the element; lines and arcs are always on a silk layer +
   ha:line.ID     round cap line -> +
   ha:arc.ID     round cap elliptic arc (only width==height is fully supported at the moment) -> +
   ha:text.ID     single line text object -> +
   ha:pad.ID     SMD pad emulated using a line object; becomes a rectangle (but watch out for the cap-extended length!) when the square flag is set +
    x1 coord   line first endpoint, horizontal offset +
    y1 coord   line first endpoint, vertical offset +
    x2 coord   line second endpoint, horizontal offset +
    y2 coord   line second endpoint, vertical offset +
    thickness coord   width of the line +
    clearance coord   clearance around the line +
    mask coord   size of the mask cutout, as interpreted by gEDA/PCB +
    name string   symbolic name of the pad +
    number string   "pin number" for the netlist +
    ha:attributes     a hash of attribute key=value pairs +
     attrib-key string   attribute value +
    ha:flags_pad     flag bits of a pad +
     found flag   If set, this object has been found by FindConnection() +
     hole flag   For pins and vias, this flag means that the pin or via is a hole without a copper annulus. +
     clearline flag   For lines and arcs, the line/arc will clear polygons instead of connecting to them. +
     selected flag   Set when the object is selected. +
     auto flag   For lines and vias, indicates that these were created by the autorouter. +
     warn flag   For pins, vias, and pads, set to indicate a warning. +
     usetherm flag   Obsolete, indicates that pins/vias should be drawn with thermal fingers. +
     drc flag   Set for objects that fail DRC: flag like FOUND flag for DRC checking. +
     lock flag   Set for locked objects. +
     nonetlist flag   subcircuit is not on the netlist and should not interfere with the netlist +
     termname flag   when set the names of pins are shown. +
     floater flag   subc part can be moved after subc placing +
     pin flag   object is a pin (in an element) +
     via flag   object is a via +
   ha:pin.ID     thru-hole pin; emulated as an old-style via +
    x coord   place padstack with origin at this horizontal coordinate +
    y coord   place padstack with origin at this vertical coordinate +
    thickness coord   copper shape dimension (diameter) +
    clearance coord   copper clearance around the copper shape +
    mask coord   mask cutout shape dimension (diameter) +
    hole coord   drill/hole diameter +
    name string   optional name attribute +
    number string   for a pin (or to-be-pin) this is the terminal ID +
    ha:attributes     a hash of attribute key=value pairs +
     attrib-key string   attribute value +
    ha:flags_pinvia     flag bits of a pin or via +
     found flag   If set, this object has been found by FindConnection() +
     hole flag   For pins and vias, this flag means that the pin or via is a hole without a copper annulus. +
     clearline flag   For lines and arcs, the line/arc will clear polygons instead of connecting to them. +
     selected flag   Set when the object is selected. +
     auto flag   For lines and vias, indicates that these were created by the autorouter. +
     warn flag   For pins, vias, and pads, set to indicate a warning. +
     usetherm flag   Obsolete, indicates that pins/vias should be drawn with thermal fingers. +
     drc flag   Set for objects that fail DRC: flag like FOUND flag for DRC checking. +
     lock flag   Set for locked objects. +
     nonetlist flag   subcircuit is not on the netlist and should not interfere with the netlist +
     termname flag   when set the names of pins are shown. +
     floater flag   subc part can be moved after subc placing +
     pin flag   object is a pin (in an element) +
     via flag   object is a via +
 ha:rat.ID     global rat line +
  x1 coord   line first endpoint, horizontal offset +
  y1 coord   line first endpoint, vertical offset +
  x2 coord   line second endpoint, horizontal offset +
  y2 coord   line second endpoint, vertical offset +
  lgrp1 integer   first endpoint's layer group ID +
  lgrp2 integer   second endpoint's layer group ID +
  ha:attributes     a hash of attribute key=value pairs +
   attrib-key string   attribute value +
  ha:flags_line     flag bits of a line +
   found flag   If set, this object has been found by FindConnection() +
   clearline flag   For lines and arcs, the line/arc will clear polygons instead of connecting to them. +
   selected flag   Set when the object is selected. +
   auto flag   For lines and vias, indicates that these were created by the autorouter. +
   rubberend flag   For lines, used internally for rubber band moves: indicates one end already rubber banding. +
   usetherm flag   Obsolete, indicates that pins/vias should be drawn with thermal fingers. +
   drc flag   Set for objects that fail DRC: flag like FOUND flag for DRC checking. +
   lock flag   Set for locked objects. +
   nonetlist flag   subcircuit is not on the netlist and should not interfere with the netlist +
   termname flag   when set the names of pins are shown. +
   floater flag   subc part can be moved after subc placing +
+

Types

+

+ + + + + + + + + + +
type description +
angle + + A decimal number without unit, representing an angle in degree. Can + be positive or negative. + +
coord + + A decimal number with a unit suffix. If the unit suffix is missing, + the coordinate is loaded in the internal units (which is nanometer as of 2018, + but could change in the future, thus files shall not depend on it). Depending + on the context, coordinates may have a sign (positive or negative). +

+ Examples: +

+x=10mil;
+y=1.5mm;
+dia=12cm;
+
+ +
coordtbl + + A two-column table of coords. First column are X, second column are Y + coordinates. +

+ Examples: +

+ta:contour {
+ 1mm;   2.1mm;
+ 5mm;   5.2mm;
+ 3.7mm; 12mil;
+}
+ta:foo = { 1mm; 2.1mm;  5mm;   5.2mm;  3.7mm; 12mil; }
+
+ +
double + + Unitless numeric value in decimal format. Depending on context it is + sometimes signed. + +
flag + + If the flag is set, the value is "1", if the flag is not set, the + whole key=value pair is omitted. + +
integer + + Unitless integer value in decimal format. Depending on context it is + sometimes signed. + +
minuid + + An unique ID as generated by libminuid (24 ASCII characters). + +
none + + No value. + +
string + + Free form text data + +
+ + + + Index: trunk/doc/developer/lihata_format/tree.txt =================================================================== --- trunk/doc/developer/lihata_format/tree.txt (nonexistent) +++ trunk/doc/developer/lihata_format/tree.txt (revision 16843) @@ -0,0 +1,515 @@ +File format root nodes + +Each table below describes the full tree of one of the pcb-rnd file formats, from the root. + +ha:pcb-rnd-board-v* + +type:name value ver description +ha:pcb-rnd-board-v* The full, self-contained description of a printed circuit board. This is the root of a board .lht file. The * after the v in the name is an integer which is the format version. + ha:meta Any meta-data that won't directly turn into physical material (e.g. copper). + board_name string User assigned name of the board + ha:grid User interface last grid settings + offs_x coord grid origin: X offset from 0;0 + offs_y coord grid origin: Y offset from 0;0 + spacing coord distance between two grid points both in X and Y directions + ha:size object size related settings + x coord drawing area size X (width) + y coord drawing area size Y (height) + isle_area_nm2 double remove polygon islands smaller than this value, specified in mm^2 + thermal_scale double scale all thermals on the board by this factor + ha:drc design rule checker settings for the old DRC + bloat coord Minimum copper spacing + shrink coord Minimum overlap between validly touching copper objects + min_width coord Minimum copper width + min_silk coord Minimum silk width + min_drill coord Minimum drill diameter + min_ring coord Minimum annular ring width + ha:cursor obsolete cursor/view state + x coord last positin, X (horizontal) + y coord last positin, Y (horizontal) + zoom double last view zoom factor + ha:layer_stack physical layer stack information: geometry and properties of physical layers + li:groups ordered list of physical layers from top to bottom + ha:INTEGER a layer group (a physical layer of the board); the ID of the layer group is the integer in the name of the node + name string user assigned name of the layer group, e.g. "top copper" + ha:type a flag-list of layer type flag bits + top flag location: top side + bottom flag location: bottom side + intern flag location: internal + logical flag location: logical (not in the actual stackup) + copper flag material: copper + silk flag material: silk + mask flag material: mask + paste flag material: paste + outline flag "material": router path (board outline, slots, cutouts) + substrate flag material: substrate or insulator + li:layers ordered list of logical layer IDs hosted by this layer group + ha:font font kit: all fonts used on the board (if no font specified, default font will be used) + ha:FONT-ID the full description of a font; the node name is the integer font id or "geda_pcb" for font 0 (for historical reasons); the name is used only to make each node unique, the ID is also a field below -> + ha:styles routing styles hash: collection of all available routing syles + ha:netlists all availale netlists + li:netlist the input netlist (as seen in the last netlist import, a.k.a. forward annotation) + ha:NETNAME a network + li:conn list of terminals connceted to the network + diameter string refdes-terminal + ha:attributes >=5 a hash of attribute key=value pairs + attrib-key string attribute value + li:netlist_patch a list of intentional deviations from the input netlist, a.k.a. material for back annotation + li:net_info describe the current state of a net, as seen on the input + net string net name; first item on the list, only once + term string terminal name; zero or more items starting from the second item + ha:add_conn the 'as built' network requires a new conncetion to be created during the back annotation + net string net name the terminal should be added to + term string terminal name + ha:del_conn the 'as built' network requires an existing conncetion to be removed during the back annotation + net string net name the terminal should be removed from + term string terminal name + ha:change_attrib the 'as built' network requires an attribute to be set or changed + net string net name whose attribute needs to be changed + key string key (name) of the attribute + val string new value of the attribute + li:conf complete pcb-rnd configuration tree -> + ha:data Layers and global objects of the board -> + ha:attributes a hash of attribute key=value pairs + attrib-key string attribute value + +li:pcb-rnd-conf-v1 + +type:name value ver description +li:pcb-rnd-conf-v1 complete pcb-rnd configuration tree + ha:overwrite overwrite values while merging; children: a full or partial config tree + ha:prepend prepend values while merging; children: a full or partial config tree + ha:append append values while merging; children: a full or partial config tree + +li:pcb-rnd-font-v1 + +type:name value ver description +li:pcb-rnd-font-v1 font description + ha:FONT-ID the full description of a font; the node name is the integer font id or "geda_pcb" for font 0 (for historical reasons); the name is used only to make each node unique, the ID is also a field below + cell_height coord height of the tallest glyph + cell_width coord width of the widest glyph + id integer unique font ID within the fontkit; fonts are referenced by ID + name string user specified, user readable font name + ha:symbols a collections of glyphs availbale in the font + ha:CHARACTER Description of a glyph (symbol). Node name is a signel ASCII character or is of format &xx where xx is a hex digit of the ASCII code of the character. Characters that must use the hex version are: codes below 33 or over + 126, &, #, {, }, /, :, ;, =, \, : + height coord height of the glyph + width coord width of the glyph + delta coord extra space always inserted after the current symbol, before the next character + li:objects objects that make up the symbol; IDs are per symbol local IDs counted from 0 + ha:line.ID round cap line, simplified + x1 coord line first endpoint, horizontal offset + y1 coord line first endpoint, vertical offset + x2 coord line second endpoint, horizontal offset + y2 coord line second endpoint, vertical offset + thickness coord width of the line + ha:simplearc.ID round cap arc, simplified + x coord center, X coord + y coord center, Y coord + r coord radius (of the centerline of the arc) + thickness coord width of the pen the arc is drawn with + astart angle start angle + adelta angle delta angle + li:simplepoly.ID round cap arc, simplified; contains a flat list of coords; each coord pair is an x;y corner of the outline of the polygon (odd indices are x coords, even indices are y coords) + +li:pcb-rnd-subcircuit-v* + +type:name value ver description +li:pcb-rnd-subcircuit-v* footprint file containing a single subcircuit + ha:subc.ID >=3 an instance (full copy) of a subcircuit + uid minuid UID assigned by the user to track subc history + ha:attributes a hash of attribute key=value pairs + attrib-key string attribute value + ha:flags_subcircuit flag bits of a subcircuit + found flag If set, this object has been found by FindConnection() + selected flag Set when the object is selected. + auto flag For lines and vias, indicates that these were created by the autorouter. + drc flag Set for objects that fail DRC: flag like FOUND flag for DRC checking. + lock flag Set for locked objects. + nonetlist flag subcircuit is not on the netlist and should not interfere with the netlist + termname flag when set the names of pins are shown. + floater flag subc part can be moved after subc placing + ha:data Layers and global objects of the board -> + +Common subtrees + +Each table below describes a subtree that usually does not specify a whole tree (thus they are usually not a valid file on their own). These subtrees are described in a separate table because they are used from multiple other trees. + +ha:data + +type:name value ver description +ha:data Layers and global objects of the board + li:objects List of global (non-layer/multi-layer) objects + ha:padstack_ref.ID >=4 a padstack reference (instance) placed on the board (e.g. used as a via) + proto integer padstack prototype ID to use, from the parent data's proto list + x coord place padstack with origin at this horizontal coordinate + y coord place padstack with origin at this vertical coordinate + clearance coord global clearance; if non-zero, overrides local (per shape) clearance + rot angle rotation angle in degrees + xmirror integer 0 or 1; if 1, mirror all shapes over the x (horizontal) axis (so that y coords are flipped) + smirror integer 0 or 1; if 1, mirror the layer stackup: bottom becomes top, top becomes bottom (a.k.a. "place on the other side") + ha:attributes a hash of attribute key=value pairs + attrib-key string attribute value + ha:flags_padstack flag bits of a padstack + found flag If set, this object has been found by FindConnection() + hole flag For pins and vias, this flag means that the pin or via is a hole without a copper annulus. + clearline flag For lines and arcs, the line/arc will clear polygons instead of connecting to them. + selected flag Set when the object is selected. + auto flag For lines and vias, indicates that these were created by the autorouter. + warn flag For pins, vias, and pads, set to indicate a warning. + usetherm flag Obsolete, indicates that pins/vias should be drawn with thermal fingers. + drc flag Set for objects that fail DRC: flag like FOUND flag for DRC checking. + lock flag Set for locked objects. + nonetlist flag subcircuit is not on the netlist and should not interfere with the netlist + termname flag when set the names of pins are shown. + floater flag subc part can be moved after subc placing + li:thermal list of thermal shapes, per layer + li:LAYERID integer layer ID the thermal affects; each word is a boolean flag that is either present on the list or is missing; only one shape may be present + on none thermal is present on this layer; if not present, all other thermal flags are ignored on this layer + diag none thermal graphics is not axis aligned but diagonal (rotated by 45 degrees) + round none shape: rounded edge fingers + sharp none shape: sharp edge fingers + solid none shape: no thermal relief, solid connection without clearance + noshape none shape: special: omit copper shape of the padstack on this layer + ha:via.ID <=4 an old via object (loaded as padstack in the new model) + x coord place padstack with origin at this horizontal coordinate + y coord place padstack with origin at this vertical coordinate + thickness coord copper shape dimension (diameter) + clearance coord copper clearance around the copper shape + mask coord mask cutout shape dimension (diameter) + hole coord drill/hole diameter + name string optional name attribute + number string for a pin (or to-be-pin) this is the terminal ID + ha:attributes a hash of attribute key=value pairs + attrib-key string attribute value + ha:flags_pinvia flag bits of a pin or via + found flag If set, this object has been found by FindConnection() + hole flag For pins and vias, this flag means that the pin or via is a hole without a copper annulus. + clearline flag For lines and arcs, the line/arc will clear polygons instead of connecting to them. + selected flag Set when the object is selected. + auto flag For lines and vias, indicates that these were created by the autorouter. + warn flag For pins, vias, and pads, set to indicate a warning. + usetherm flag Obsolete, indicates that pins/vias should be drawn with thermal fingers. + drc flag Set for objects that fail DRC: flag like FOUND flag for DRC checking. + lock flag Set for locked objects. + nonetlist flag subcircuit is not on the netlist and should not interfere with the netlist + termname flag when set the names of pins are shown. + floater flag subc part can be moved after subc placing + pin flag object is a pin (in an element) + via flag object is a via + li:layers ordered list of layers; v1 required the order to be top-bottom physically; v1 also required silk layers to be at the end (same resrtictions as in the old .pcb format; only real (non-bound) layers have attributes) + ha:NAME a logical layer + lid integer >=2 layer ID + visible integer only in real (non-boud) layers: 1 if the layer is visible, 0 if not (UI setting) + group integer only in real (non-boud) layers: "parent" layer group ID + color string >=5 layer color on UI, in #rrggbb format + stack_offs integer only in bound layers: match offset e.g. for internal copper layers + ha:type only for bound layers: try to bind to this type of layer on the host board + top flag location: top side + bottom flag location: bottom side + intern flag location: internal + logical flag location: logical (not in the actual stackup) + copper flag material: copper + silk flag material: silk + mask flag material: mask + paste flag material: paste + outline flag "material": router path (board outline, slots, cutouts) + substrate flag material: substrate or insulator + combining >=2 layer combination (compositing) flags + sub flag draw in negative + auto flag padstacks draw their paste, mask and silk objects on the first layer (of matching type) that features the auto flag + ha:attributes a hash of attribute key=value pairs + attrib-key string attribute value + li:objects list of drawing primitives put on this layer + ha:line.ID round cap line + x1 coord line first endpoint, horizontal offset + y1 coord line first endpoint, vertical offset + x2 coord line second endpoint, horizontal offset + y2 coord line second endpoint, vertical offset + thickness coord width of the line + clearance coord copper clearance around the object + ha:attributes a hash of attribute key=value pairs + attrib-key string attribute value + ha:flags_line flag bits of a line + found flag If set, this object has been found by FindConnection() + clearline flag For lines and arcs, the line/arc will clear polygons instead of connecting to them. + selected flag Set when the object is selected. + auto flag For lines and vias, indicates that these were created by the autorouter. + rubberend flag For lines, used internally for rubber band moves: indicates one end already rubber banding. + usetherm flag Obsolete, indicates that pins/vias should be drawn with thermal fingers. + drc flag Set for objects that fail DRC: flag like FOUND flag for DRC checking. + lock flag Set for locked objects. + nonetlist flag subcircuit is not on the netlist and should not interfere with the netlist + termname flag when set the names of pins are shown. + floater flag subc part can be moved after subc placing + li:thermal list of thermal flags for heavy terminals, on the single layer the object is on + on none draw any thermal only if this string is present; else normal clearance is applied + diag none if present, the thermal is diagonal (45 degree rotated) + round none if present, thermal shape is rounded + sharp none if present, thermal shape is sharp + solid none if present, there is no thermal but a solid connection ("join") + ha:arc.ID round cap elliptic arc (only width==height is fully supported at the moment) + x coord center, X coord + y coord center, Y coord + width coord radius (of the centerline of the arc) in X direction + height coord radius (of the centerline of the arc) in Y direction + thickness coord width of the pen the arc is drawn with + clearance coord copper clearance around the object + astart angle start angle + adelta angle delta angle + ha:attributes a hash of attribute key=value pairs + attrib-key string attribute value + ha:flags_arc flag bits of a arc + found flag If set, this object has been found by FindConnection() + clearline flag For lines and arcs, the line/arc will clear polygons instead of connecting to them. + selected flag Set when the object is selected. + auto flag For lines and vias, indicates that these were created by the autorouter. + rubberend flag For lines, used internally for rubber band moves: indicates one end already rubber banding. + usetherm flag Obsolete, indicates that pins/vias should be drawn with thermal fingers. + drc flag Set for objects that fail DRC: flag like FOUND flag for DRC checking. + lock flag Set for locked objects. + nonetlist flag subcircuit is not on the netlist and should not interfere with the netlist + termname flag when set the names of pins are shown. + floater flag subc part can be moved after subc placing + li:thermal list of thermal flags for heavy terminals, on the single layer the object is on + on none draw any thermal only if this string is present; else normal clearance is applied + diag none if present, the thermal is diagonal (45 degree rotated) + round none if present, thermal shape is rounded + sharp none if present, thermal shape is sharp + solid none if present, there is no thermal but a solid connection ("join") + ha:polygon.ID polygon, as drawn (unclipped) + clearance coord >=3 copper clearance around the object + ha:attributes a hash of attribute key=value pairs + attrib-key string attribute value + ha:flags_polygon flag bits of a polygon + found flag If set, this object has been found by FindConnection() + clearpoly flag For polygons, this flag means that pins and vias will normally clear these polygons (thus, thermals are required for electrical connection). When clear, polygons will solidly connect to pins and vias. + fullpoly flag For polygons, the full polygon is drawn (i.e. all parts instead of only the biggest one). + selected flag Set when the object is selected. + auto flag For lines and vias, indicates that these were created by the autorouter. + drc flag Set for objects that fail DRC: flag like FOUND flag for DRC checking. + lock flag Set for locked objects. + nonetlist flag subcircuit is not on the netlist and should not interfere with the netlist + termname flag when set the names of pins are shown. + clearpolypoly flag For polygons, apply clearance to nearby polygons + floater flag subc part can be moved after subc placing + li:thermal list of thermal flags for heavy terminals, on the single layer the object is on + on none draw any thermal only if this string is present; else normal clearance is applied + diag none if present, the thermal is diagonal (45 degree rotated) + round none if present, thermal shape is rounded + sharp none if present, thermal shape is sharp + solid none if present, there is no thermal but a solid connection ("join") + li:geometry first item is the outer contour, subsequent, optional items are holes + contour coordtbl 2 column table of x;y coords for the outer contour + hole coordtbl 2 column table of x;y coords for a hole + ha:text.ID single line text object + x coord placement: X coord + y coord placement: Y coord + role string when part of an old element, determines which of the three hardwired text object role is used (footprint, refdes or value) + string string text string (payload) + fid integer font ID + scale integer text size scale in % + direction integer rotation in 90 degree steps (0 is horizontal) + ha:attributes a hash of attribute key=value pairs + attrib-key string attribute value + ha:flags_text flag bits of a text + found flag If set, this object has been found by FindConnection() + clearline flag For lines and arcs, the line/arc will clear polygons instead of connecting to them. + selected flag Set when the object is selected. + onsolder flag For text, indicates that it is on the solder side. + auto flag For lines and vias, indicates that these were created by the autorouter. + drc flag Set for objects that fail DRC: flag like FOUND flag for DRC checking. + lock flag Set for locked objects. + nonetlist flag subcircuit is not on the netlist and should not interfere with the netlist + termname flag when set the names of pins are shown. + dyntext flag For text: dynamic string (substitute %patterns%) + floater flag subc part can be moved after subc placing + li:padstack_prototypes >=4 + unused none placeholder for markign uunsed slot to keep slot indices for early lihata v4 + ha:ps_proto_v4.PID padstack prototype specification, as introduced in lihata board v4 + hdia coord hole diameter; 0 means no hole + htop integer hole start: copper layer index from the top (positive) or bottom (negative) copper layer (0 means top copper layer) + hbottom integer hole start: copper layer index from the bottom (positive) or top (negative) copper layer (0 means bottom copper layer) + plated integer 0=unplated hole; 1=plated hole + name string >=5 optional user assigned prototype name + li:shape shape per layer type definition + ha:ps_shape_v4 shape on a specific layer type (specified by layer_mask and combining), as specifie in lihata board v4; shape is either ps_poly, ps_line or ps_circ (only one of these will present per layer type); shape coords are + relative to padstack origin + ha:layer_mask layer type and location + top flag location: top side + bottom flag location: bottom side + intern flag location: internal + logical flag location: logical (not in the actual stackup) + copper flag material: copper + silk flag material: silk + mask flag material: mask + paste flag material: paste + outline flag "material": router path (board outline, slots, cutouts) + substrate flag material: substrate or insulator + combining layer compositing match + sub flag draw in negative + auto flag padstacks draw their paste, mask and silk objects on the first layer (of matching type) that features the auto flag + clearance coord local, per-layer-type clearance; applied if global padstack clearance is 0 + li:ps_poly arbitrary convex polygon shape; contains a list of x;y coordinates + ha:ps_line straight line shape, round or square cap + x1 coord line first endpoint, horizontal offset + y1 coord line first endpoint, vertical offset + x2 coord line second endpoint, horizontal offset + y2 coord line second endpoint, vertical offset + thickness coord width of the line + square integer 0=round cap; 1=square cap + ha:ps_circ filled circle shape + x coord center, horizontal offset + y coord center, vertical offset + dia coord circle diameter + ha:subc.ID >=3 an instance (full copy) of a subcircuit + uid minuid UID assigned by the user to track subc history + ha:attributes a hash of attribute key=value pairs + attrib-key string attribute value + ha:flags_subcircuit flag bits of a subcircuit + found flag If set, this object has been found by FindConnection() + selected flag Set when the object is selected. + auto flag For lines and vias, indicates that these were created by the autorouter. + drc flag Set for objects that fail DRC: flag like FOUND flag for DRC checking. + lock flag Set for locked objects. + nonetlist flag subcircuit is not on the netlist and should not interfere with the netlist + termname flag when set the names of pins are shown. + floater flag subc part can be moved after subc placing + ha:data Layers and global objects of the board -> + ha:element.ID <3 an instance (full copy) of an obsolete element footprint + x coord element origin (diamond), horizontal offset + y coord element origin (diamond), vertical offset + ha:attributes a hash of attribute key=value pairs + attrib-key string attribute value + ha:flags_element flag bits of an element + found flag If set, this object has been found by FindConnection() + selected flag Set when the object is selected. + auto flag For lines and vias, indicates that these were created by the autorouter. + drc flag Set for objects that fail DRC: flag like FOUND flag for DRC checking. + lock flag Set for locked objects. + nonetlist flag subcircuit is not on the netlist and should not interfere with the netlist + termname flag when set the names of pins are shown. + floater flag subc part can be moved after subc placing + onsolder flag element is placed on the solder side + li:objects list of special objects that make up the element; lines and arcs are always on a silk layer + ha:line.ID round cap line -> + ha:arc.ID round cap elliptic arc (only width==height is fully supported at the moment) -> + ha:text.ID single line text object -> + ha:pad.ID SMD pad emulated using a line object; becomes a rectangle (but watch out for the cap-extended length!) when the square flag is set + x1 coord line first endpoint, horizontal offset + y1 coord line first endpoint, vertical offset + x2 coord line second endpoint, horizontal offset + y2 coord line second endpoint, vertical offset + thickness coord width of the line + clearance coord clearance around the line + mask coord size of the mask cutout, as interpreted by gEDA/PCB + name string symbolic name of the pad + number string "pin number" for the netlist + ha:attributes a hash of attribute key=value pairs + attrib-key string attribute value + ha:flags_pad flag bits of a pad + found flag If set, this object has been found by FindConnection() + hole flag For pins and vias, this flag means that the pin or via is a hole without a copper annulus. + clearline flag For lines and arcs, the line/arc will clear polygons instead of connecting to them. + selected flag Set when the object is selected. + auto flag For lines and vias, indicates that these were created by the autorouter. + warn flag For pins, vias, and pads, set to indicate a warning. + usetherm flag Obsolete, indicates that pins/vias should be drawn with thermal fingers. + drc flag Set for objects that fail DRC: flag like FOUND flag for DRC checking. + lock flag Set for locked objects. + nonetlist flag subcircuit is not on the netlist and should not interfere with the netlist + termname flag when set the names of pins are shown. + floater flag subc part can be moved after subc placing + pin flag object is a pin (in an element) + via flag object is a via + ha:pin.ID thru-hole pin; emulated as an old-style via + x coord place padstack with origin at this horizontal coordinate + y coord place padstack with origin at this vertical coordinate + thickness coord copper shape dimension (diameter) + clearance coord copper clearance around the copper shape + mask coord mask cutout shape dimension (diameter) + hole coord drill/hole diameter + name string optional name attribute + number string for a pin (or to-be-pin) this is the terminal ID + ha:attributes a hash of attribute key=value pairs + attrib-key string attribute value + ha:flags_pinvia flag bits of a pin or via + found flag If set, this object has been found by FindConnection() + hole flag For pins and vias, this flag means that the pin or via is a hole without a copper annulus. + clearline flag For lines and arcs, the line/arc will clear polygons instead of connecting to them. + selected flag Set when the object is selected. + auto flag For lines and vias, indicates that these were created by the autorouter. + warn flag For pins, vias, and pads, set to indicate a warning. + usetherm flag Obsolete, indicates that pins/vias should be drawn with thermal fingers. + drc flag Set for objects that fail DRC: flag like FOUND flag for DRC checking. + lock flag Set for locked objects. + nonetlist flag subcircuit is not on the netlist and should not interfere with the netlist + termname flag when set the names of pins are shown. + floater flag subc part can be moved after subc placing + pin flag object is a pin (in an element) + via flag object is a via + ha:rat.ID global rat line + x1 coord line first endpoint, horizontal offset + y1 coord line first endpoint, vertical offset + x2 coord line second endpoint, horizontal offset + y2 coord line second endpoint, vertical offset + lgrp1 integer first endpoint's layer group ID + lgrp2 integer second endpoint's layer group ID + ha:attributes a hash of attribute key=value pairs + attrib-key string attribute value + ha:flags_line flag bits of a line + found flag If set, this object has been found by FindConnection() + clearline flag For lines and arcs, the line/arc will clear polygons instead of connecting to them. + selected flag Set when the object is selected. + auto flag For lines and vias, indicates that these were created by the autorouter. + rubberend flag For lines, used internally for rubber band moves: indicates one end already rubber banding. + usetherm flag Obsolete, indicates that pins/vias should be drawn with thermal fingers. + drc flag Set for objects that fail DRC: flag like FOUND flag for DRC checking. + lock flag Set for locked objects. + nonetlist flag subcircuit is not on the netlist and should not interfere with the netlist + termname flag when set the names of pins are shown. + floater flag subc part can be moved after subc placing + +Types + ++--------------------------------------------------------------------------------------------------+ +| type | description | +|--------+-----------------------------------------------------------------------------------------| +|angle |A decimal number without unit, representing an angle in degree. Can be positive or | +| |negative. | +|--------+-----------------------------------------------------------------------------------------| +| |A decimal number with a unit suffix. If the unit suffix is missing, the coordinate is | +| |loaded in the internal units (which is nanometer as of 2018, but could change in the | +| |future, thus files shall not depend on it). Depending on the context, coordinates may | +| |have a sign (positive or negative). | +|coord | | +| |Examples: | +| | | +| |x=10mil; | +| |y=1.5mm; | +| |dia=12cm; | +|--------+-----------------------------------------------------------------------------------------| +| |A two-column table of coords. First column are X, second column are Y coordinates. | +| | | +| |Examples: | +| | | +|coordtbl|ta:contour { | +| | 1mm; 2.1mm; | +| | 5mm; 5.2mm; | +| | 3.7mm; 12mil; | +| |} | +| |ta:foo = { 1mm; 2.1mm; 5mm; 5.2mm; 3.7mm; 12mil; } | +|--------+-----------------------------------------------------------------------------------------| +|double |Unitless numeric value in decimal format. Depending on context it is sometimes signed. | +|--------+-----------------------------------------------------------------------------------------| +|flag |If the flag is set, the value is "1", if the flag is not set, the whole key=value pair is| +| |omitted. | +|--------+-----------------------------------------------------------------------------------------| +|integer |Unitless integer value in decimal format. Depending on context it is sometimes signed. | +|--------+-----------------------------------------------------------------------------------------| +|minuid |An unique ID as generated by libminuid (24 ASCII characters). | +|--------+-----------------------------------------------------------------------------------------| +|none |No value. | +|--------+-----------------------------------------------------------------------------------------| +|string |Free form text data | ++--------------------------------------------------------------------------------------------------+ Index: trunk/doc/developer/lihata_format/types.lht =================================================================== --- trunk/doc/developer/lihata_format/types.lht (nonexistent) +++ trunk/doc/developer/lihata_format/types.lht (revision 16843) @@ -0,0 +1,65 @@ +ha:lht_tree_doc { ha:types { + +angle { + A decimal number without unit, representing an angle in degree. Can + be positive or negative. +} + +coord { + A decimal number with a unit suffix. If the unit suffix is missing, + the coordinate is loaded in the internal units (which is nanometer as of 2018, + but could change in the future, thus files shall not depend on it). Depending + on the context, coordinates may have a sign (positive or negative). +

+ Examples: +

+x=10mil;
+y=1.5mm;
+dia=12cm;
+
+} + +coordtbl { + A two-column table of coords. First column are X, second column are Y + coordinates. +

+ Examples: +

+ta:contour {
+	1mm;   2.1mm;
+	5mm;   5.2mm;
+	3.7mm; 12mil;
+\}
+ta:foo = { 1mm; 2.1mm;  5mm;   5.2mm;  3.7mm; 12mil; \}
+
+} + +double { + Unitless numeric value in decimal format. Depending on context it is + sometimes signed. +} + +flag { + If the flag is set, the value is "1", if the flag is not set, the + whole key=value pair is omitted. +} + +integer { + Unitless integer value in decimal format. Depending on context it is + sometimes signed. +} + +minuid { + An unique ID as generated by libminuid (24 ASCII characters). +} + +none { + No value. +} + +string { + Free form text data +} + +}} +