tEDAx - schematic symbol

purpose

Focus is on providing a common-minimum symbol representation.

Layers: there are two layers: non-conductive graphic and conductive electric.

symbol model

A symbol consists of drawing primitives and pins. Pins are special in two senses: they can be connected by wiring when the symbol is used in a schematics and they can have their own attributes. A symbol has its attributes too.

Attributes are arbitrary key=value pairs; the interpretation is up to the software. Fixed attributes are similar, except that their possible keys and meaning are mandated by this document.

Each pin is identified by a pinID that is unique within the symbol.

Graphical drawing primitives also have an ID, which is either unspecified (a single dash) or a symbol-unique integer between 1 and 2^31-1. These IDs are used for referencing the objects when setting their optional properties.

block

Block type is "symbol", version is "v1". The unique identifier should be the name of the symbol.

Drawing primitives:

command parameter names explanation
line id x1 y1 x2 y2 width Draw a line on the graphic layer. If possible, the line is round cap. coords x1;y1 and x2;y2 specify the centerline of the object. The outline of the object is as if it was drawn with a circle with diameter of width between iterating over the centerline.

Zero length lines are invalid.

pin id x y diameter Place a pin connection point on the electric layer at x;y. Diameter is only a hint for the graphical representation.
polyline id pid ox oy width Instantiate the polyline specified as a separate block with ID matching pid. While instantiating, add offset ox and oy to each coordinate. Each line segment is drawn as it was a separate line object, using width.

Works on the graphic layer.

arc id cx cy r start_ang delta_ang width sx sy ex ey An arc segment with centerpoint, radius, start and end angles specified Start angle is between 0 and 360 degrees. Delta angle is between -360 and +360 degrees. If delta angle or radius is 0, the arc is invalid.

The start and endpoint coords are hints only. If they do not match the calculated value on load, the software may modify other parameters to guarantee endpoint correctness.

Works on the graphic layer.

circle id cx cy r Filled circle with center cx, cy and radius r.

Works on the graphic layer.

text x1 y1 x2 y2 relsiz rot textstring A text rendered in the bounding box specified by coords. The text string must be a single field. Considerations for text in PCB layers all apply (except for the clearance). The text is placed on the graphic layer.
fill id The named primitive gets filled. A primitive is either stroked or filled, but not both. In case of a filled primitive, the original width of the primitive is ignored (should be 0 as a convention).

Works on graphic layer objects only. Does not work on text.

color id #rrggbb Set the color of the named primitive to #rrggbb, which is a standard 24 bit color specified in 6 hexadecimal digits.

Works on the graphic layer.

pin_attr id key value Set the specified attribute of a pin objects.
pin_fattr id key value Set the specified fixed attribute of a pin objects.
attr id key value Set the specified attribute of a pin objects.
fattr id key value Set the specified fixed attribute of a pin objects.

pin_fattr

key meaning
number user visible pin number (e.g. 2)
name user visible pin name (e.g. "Emitter" or "E")

symbol fattr

key meaning
device arbitrary device class (e.g. "resistor", "capacitor", etc.)
footprint arbitrary footprint string (e.g. "1206", "to92", "dip(4)")

minimal support required

Line, circle, pins, all pin_fattr, symbol attr and all fattr. If filled objects are not supported, they shall be imported as unfilled objects with a software specified drawing width. If unfilled polyline is not supported, it should be imported as a set of independent lines.

Fattrs that do not need special treatment may be handled as plain attrs.

Examples

TODO