Index: trunk/doc/developer/lihata_format/cschem-buffer-v.svg =================================================================== --- trunk/doc/developer/lihata_format/cschem-buffer-v.svg (nonexistent) +++ trunk/doc/developer/lihata_format/cschem-buffer-v.svg (revision 4295) @@ -0,0 +1,50 @@ + + + + + + +li:cschem-buffer-v* + + + +/lht_tree_doc/roots/cschem-buffer-v* + + +li:cschem-buffer-v* + + + + + +dup1_/lht_tree_doc/roots/cschem-buffer-v*/children/obj_indirect.1 + +obj_indirect.1 -> + + + + + +/lht_tree_doc/roots/cschem-buffer-v*->dup1_/lht_tree_doc/roots/cschem-buffer-v*/children/obj_indirect.1 + + + + + +dup2_/lht_tree_doc/roots/cschem-buffer-v*/children/obj_direct.2 + +obj_direct.2 -> + + + + + +/lht_tree_doc/roots/cschem-buffer-v*->dup2_/lht_tree_doc/roots/cschem-buffer-v*/children/obj_direct.2 + + + + + Index: trunk/doc/developer/lihata_format/cschem-group-v.svg =================================================================== --- trunk/doc/developer/lihata_format/cschem-group-v.svg (nonexistent) +++ trunk/doc/developer/lihata_format/cschem-group-v.svg (revision 4295) @@ -0,0 +1,36 @@ + + + + + + +li:cschem-group-v* + + + +/lht_tree_doc/roots/cschem-group-v* + + +li:cschem-group-v* + + + + + +dup3_/lht_tree_doc/roots/cschem-group-v*/children/group.1 + +group.1 -> + + + + + +/lht_tree_doc/roots/cschem-group-v*->dup3_/lht_tree_doc/roots/cschem-group-v*/children/group.1 + + + + + Index: trunk/doc/developer/lihata_format/cschem-sheet-v.svg =================================================================== --- trunk/doc/developer/lihata_format/cschem-sheet-v.svg (nonexistent) +++ trunk/doc/developer/lihata_format/cschem-sheet-v.svg (revision 4295) @@ -0,0 +1,50 @@ + + + + + + +li:cschem-sheet-v* + + + +/lht_tree_doc/roots/cschem-sheet-v* + + +li:cschem-sheet-v* + + + + + +dup4_/lht_tree_doc/roots/cschem-sheet-v*/children/obj_indirect.1 + +obj_indirect.1 -> + + + + + +/lht_tree_doc/roots/cschem-sheet-v*->dup4_/lht_tree_doc/roots/cschem-sheet-v*/children/obj_indirect.1 + + + + + +dup5_/lht_tree_doc/roots/cschem-sheet-v*/children/obj_direct.2 + +obj_direct.2 -> + + + + + +/lht_tree_doc/roots/cschem-sheet-v*->dup5_/lht_tree_doc/roots/cschem-sheet-v*/children/obj_direct.2 + + + + + Index: trunk/doc/developer/lihata_format/tree.html =================================================================== --- trunk/doc/developer/lihata_format/tree.html (nonexistent) +++ trunk/doc/developer/lihata_format/tree.html (revision 4295) @@ -0,0 +1,253 @@ + + + + sch-rnd developer manual - lihata file formats + + + +

File format root nodes

+

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

li:cschem-buffer-v*

+

+ +
type:name value ver description +
li:cschem-buffer-v*     Buffer content (direct/indirect: same meaning as schematic sheet) +
 ha:obj_indirect.1     Group of concrete objects -> +
 ha:obj_direct.2     Group of concrete objects -> +
+

li:cschem-group-v*

+

+ +
type:name value ver description +
li:cschem-group-v*     concrete group (e.g. symbol) +
 ha:group.1     Group of concrete objects -> +
+

li:cschem-sheet-v*

+

+ +
type:name value ver description +
li:cschem-sheet-v*     schematic sheet +
 ha:obj_indirect.1     Group of concrete objects -> +
 ha:obj_direct.2     Group of concrete objects -> +
+

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:attrib

+

+ +
type:name value ver description +
ha:attrib     a hash of attributes +
 simple-attrib-key string   attribute value without metadata (text node) +
 ha:detailed-attrib     attribute with metadata (hash node) +
  value string   attribute value +
  prio integer   priority value +
+

ha:group.ID

+

+ +
type:name value ver description +
ha:group.ID     Group of concrete objects +
 x coord   xform: translate placement in x (horizontal) direction +
 y coord   xform: translate placement in y (vertical) direction +
 rot angle   xform: rotate placement +
 mirx bool   xform: mirror placement left/right +
 miry bool   xform: mirror placement child up/down +
 loclib_name string   name in the local library (optional) +
 li:objects     List of child objects +
  ha:line.ID     Drawing object: straight line -> +
  ha:arc.ID     Drawing object: circular arc -> +
  ha:polygon.ID     Drawing object: polygon -> +
  ha:text.ID     Drawing object: straight line -> +
  ha:connection.ID     Logical object: connection between different groups -> +
  ha:pen.NAME     Logical object: a named pen used for drawing; names are unique within a group -> +
 ha:attrib     a hash of attributes +
  simple-attrib-key string   attribute value without metadata (text node) +
  ha:detailed-attrib     attribute with metadata (hash node) +
   value string   attribute value +
   prio integer   priority value +
+

ha:group_ref.ID

+

+ +
type:name value ver description +
ha:group_ref.ID     Group reference to a concrete object within the same sheet or buffer +
 ref oidpath   path relative to sheet root, to the referee (should be a group) +
 li:child_xform     List of child object transformation to be performed after placement +
  OIDPATH     list of transformations to be performed on referee children objects after placement; OIDPATH is relative to the referee group +
   movex coord   xform: move child in x (horizontal) direction +
   movey coord   xform: move child in y (vertical) direction +
   rot angle   xform: rotate child +
   mirx bool   xform: mirror child left/right +
   miry bool   xform: mirror child up/down +
   remove bool   xform: mirror child up/down +
 ha:attrib     a hash of attributes +
  simple-attrib-key string   attribute value without metadata (text node) +
  ha:detailed-attrib     attribute with metadata (hash node) +
   value string   attribute value +
   prio integer   priority value +
+

ha:line.ID

+

+ +
type:name value ver description +
ha:line.ID     Drawing object: straight line +
 x1 coord   start point, x coord +
 y1 coord   start point, y coord +
 x2 coord   end point, x coord +
 y2 coord   end point, y coord +
 stroke pen   pen to use +
 lock bool   object is locked +
 floater bool   "group lock" doesn't apply +
+

ha:arc.ID

+

+ +
type:name value ver description +
ha:arc.ID     Drawing object: circular arc +
 cx coord   center point, x coord +
 cy coord   center point, y coord +
 r coord   radius +
 sang angle   start angle +
 dang angle   delta angle +
 sx coord   start point, x coord +
 sy coord   start point, y coord +
 ex coord   end point, x coord +
 ey coord   end point, y coord +
 stroke pen   pen to use +
 lock bool   object is locked +
 floater bool   "group lock" doesn't apply +
+

ha:polygon.ID

+

+ +
type:name value ver description +
ha:polygon.ID     Drawing object: polygon +
 li:outline     ordered list of contour objects (no gaps allowed) +
  ha:line.ID     Drawing object: straight line -> +
  ha:arc.ID     Drawing object: circular arc -> +
 stroke pen   pen used for outline objects +
 fill pen   pen used for fill (no fill if not present) +
 lock bool   object is locked +
 floater bool   "group lock" doesn't apply +
+

ha:connection.ID

+

+ +
type:name value ver description +
ha:connection.ID     Logical object: connection between different groups +
 li:conn     list of objects participating in the connection (at least 2) +
  OIDPATH oidpath   drawing object making the connection ) +
+

ha:text.ID

+

+ +
type:name value ver description +
ha:text.ID     Drawing object: straight line +
 text string   text string (or dyntext template) +
 x1 coord   lower left x coord of text box +
 y1 coord   lower left y coord of text box +
 x2 coord   upper right corner of untrasformed box; present only if text size is bbox-specified +
 y2 coord   upper right corner of untrasformed box; present only if text size is bbox-specified +
 rot angle   rotaition around x1;y1 +
 halign halign   horizontal alignment +
 dyntext bool   if text string is a dyntext template +
 stroke pen   pen to use +
 lock bool   object is locked +
 floater bool   "group lock" doesn't apply +
+

ha:pen.NAME

+

+ +
type:name value ver description +
ha:pen.NAME     Logical object: a named pen used for drawing; names are unique within a group +
 shape shape   pen tip shape) +
 size coord   diameter or side length +
 color color   ink color +
 font_height coord   height of text font for non-bbox-defined text +
 font_family string   family hint for the font selector +
 font_style string   style hint for the font selector +
 dash hex4   dash pattern +
 dash_period coord   dash pattern length +
+

Types

+

+ + + + + + + + + + + + + + + +
type description +
angle + + A decimal number without unit, representing an angle in degree. Can + be positive or negative. + +
coord + + A decimal integer. + +
double + + Unitless numeric value in decimal format. Depending on context it is + sometimes signed. + +
integer + + Unitless integer value in decimal format. Depending on context it is + sometimes signed. + +
hex4 + + 4 digits of hexadecimal numbers (0-9, a-f, A-F) + +
bool + + Single digit boolean value: 0 means false, 1 means true. + +
pen + + Name of a pen defined in a parent group. + +
halign + + One of: left, center, right, word_justify, justify. + +
shape + + One of: round, square. + +
color + + #rrggbb + +
minuid + + An unique ID as generated by libminuid (24 ASCII characters). + +
none + + No value. + +
string + + Free form text data + +
oidpath + + A slash separated list of integer object IDs (oids). + +
+

Comments

+

ver column: Format version range the subtree may appear in. + + Index: trunk/doc/developer/lihata_format/tree.txt =================================================================== --- trunk/doc/developer/lihata_format/tree.txt (nonexistent) +++ trunk/doc/developer/lihata_format/tree.txt (revision 4295) @@ -0,0 +1,194 @@ +File format root nodes + +Each table below describes the full tree of one of the sch-rnd file formats, from the root. + +li:cschem-buffer-v* + +type:name value ver description +li:cschem-buffer-v* Buffer content (direct/indirect: same meaning as schematic sheet) + ha:obj_indirect.1 Group of concrete objects -> + ha:obj_direct.2 Group of concrete objects -> + +li:cschem-group-v* + +type:name value ver description +li:cschem-group-v* concrete group (e.g. symbol) + ha:group.1 Group of concrete objects -> + +li:cschem-sheet-v* + +type:name value ver description +li:cschem-sheet-v* schematic sheet + ha:obj_indirect.1 Group of concrete objects -> + ha:obj_direct.2 Group of concrete objects -> + +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:attrib + +type:name value ver description +ha:attrib a hash of attributes + simple-attrib-key string attribute value without metadata (text node) + ha:detailed-attrib attribute with metadata (hash node) + value string attribute value + prio integer priority value + +ha:group.ID + +type:name value ver description +ha:group.ID Group of concrete objects + x coord xform: translate placement in x (horizontal) direction + y coord xform: translate placement in y (vertical) direction + rot angle xform: rotate placement + mirx bool xform: mirror placement left/right + miry bool xform: mirror placement child up/down + loclib_name string name in the local library (optional) + li:objects List of child objects + ha:line.ID Drawing object: straight line -> + ha:arc.ID Drawing object: circular arc -> + ha:polygon.ID Drawing object: polygon -> + ha:text.ID Drawing object: straight line -> + ha:connection.ID Logical object: connection between different groups -> + ha:pen.NAME Logical object: a named pen used for drawing; names are unique within a group -> + ha:attrib a hash of attributes + simple-attrib-key string attribute value without metadata (text node) + ha:detailed-attrib attribute with metadata (hash node) + value string attribute value + prio integer priority value + +ha:group_ref.ID + +type:name value ver description +ha:group_ref.ID Group reference to a concrete object within the same sheet or buffer + ref oidpath path relative to sheet root, to the referee (should be a group) + li:child_xform List of child object transformation to be performed after placement + OIDPATH list of transformations to be performed on referee children objects after placement; OIDPATH is relative to the referee group + movex coord xform: move child in x (horizontal) direction + movey coord xform: move child in y (vertical) direction + rot angle xform: rotate child + mirx bool xform: mirror child left/right + miry bool xform: mirror child up/down + remove bool xform: mirror child up/down + ha:attrib a hash of attributes + simple-attrib-key string attribute value without metadata (text node) + ha:detailed-attrib attribute with metadata (hash node) + value string attribute value + prio integer priority value + +ha:line.ID + +type:name value ver description +ha:line.ID Drawing object: straight line + x1 coord start point, x coord + y1 coord start point, y coord + x2 coord end point, x coord + y2 coord end point, y coord + stroke pen pen to use + lock bool object is locked + floater bool "group lock" doesn't apply + +ha:arc.ID + +type:name value ver description +ha:arc.ID Drawing object: circular arc + cx coord center point, x coord + cy coord center point, y coord + r coord radius + sang angle start angle + dang angle delta angle + sx coord start point, x coord + sy coord start point, y coord + ex coord end point, x coord + ey coord end point, y coord + stroke pen pen to use + lock bool object is locked + floater bool "group lock" doesn't apply + +ha:polygon.ID + +type:name value ver description +ha:polygon.ID Drawing object: polygon + li:outline ordered list of contour objects (no gaps allowed) + ha:line.ID Drawing object: straight line -> + ha:arc.ID Drawing object: circular arc -> + stroke pen pen used for outline objects + fill pen pen used for fill (no fill if not present) + lock bool object is locked + floater bool "group lock" doesn't apply + +ha:connection.ID + +type:name value ver description +ha:connection.ID Logical object: connection between different groups + li:conn list of objects participating in the connection (at least 2) + OIDPATH oidpath drawing object making the connection ) + +ha:text.ID + +type:name value ver description +ha:text.ID Drawing object: straight line + text string text string (or dyntext template) + x1 coord lower left x coord of text box + y1 coord lower left y coord of text box + x2 coord upper right corner of untrasformed box; present only if text size is bbox-specified + y2 coord upper right corner of untrasformed box; present only if text size is bbox-specified + rot angle rotaition around x1;y1 + halign halign horizontal alignment + dyntext bool if text string is a dyntext template + stroke pen pen to use + lock bool object is locked + floater bool "group lock" doesn't apply + +ha:pen.NAME + +type:name value ver description +ha:pen.NAME Logical object: a named pen used for drawing; names are unique within a group + shape shape pen tip shape) + size coord diameter or side length + color color ink color + font_height coord height of text font for non-bbox-defined text + font_family string family hint for the font selector + font_style string style hint for the font selector + dash hex4 dash pattern + dash_period coord dash pattern length + +Types + ++--------------------------------------------------------------------------------------------------+ +| type | description | +|-------+------------------------------------------------------------------------------------------| +|angle |A decimal number without unit, representing an angle in degree. Can be positive or | +| |negative. | +|-------+------------------------------------------------------------------------------------------| +|coord |A decimal integer. | +|-------+------------------------------------------------------------------------------------------| +|double |Unitless numeric value in decimal format. Depending on context it is sometimes signed. | +|-------+------------------------------------------------------------------------------------------| +|integer|Unitless integer value in decimal format. Depending on context it is sometimes signed. | +|-------+------------------------------------------------------------------------------------------| +|hex4 |4 digits of hexadecimal numbers (0-9, a-f, A-F) | +|-------+------------------------------------------------------------------------------------------| +|bool |Single digit boolean value: 0 means false, 1 means true. | +|-------+------------------------------------------------------------------------------------------| +|pen |Name of a pen defined in a parent group. | +|-------+------------------------------------------------------------------------------------------| +|halign |One of: left, center, right, word_justify, justify. | +|-------+------------------------------------------------------------------------------------------| +|shape |One of: round, square. | +|-------+------------------------------------------------------------------------------------------| +|color |#rrggbb | +|-------+------------------------------------------------------------------------------------------| +|minuid |An unique ID as generated by libminuid (24 ASCII characters). | +|-------+------------------------------------------------------------------------------------------| +|none |No value. | +|-------+------------------------------------------------------------------------------------------| +|string |Free form text data | +|-------+------------------------------------------------------------------------------------------| +|oidpath|A slash separated list of integer object IDs (oids). | ++--------------------------------------------------------------------------------------------------+ + +Comments + +ver column: Format version range the subtree may appear in.