Summary
create_symbol cannot draw. A symbol's body is whichever of twelve fixed glyphs you pick, and there is no way to supply geometry — so any part whose schematic symbol is a drawing rather than a box or a logic gate cannot be authored through Konnect at all.
The footprint side already has this. set_footprint_graphics takes a graphics list of line / arc / rect / circle / poly. Symbols have no equivalent.
The gap, enumerated
create_symbol takes exactly:
datasheet, glyph, library_path, name, pins, power_pins,
reference_prefix, show_pin_names, show_pin_numbers, units, value
and per unit only glyph and pins. No graphics, polyline, shape or arc argument at any level. glyph is:
rectangle, opamp, buffer, inverter, schmitt, schmitt_inverter,
and, nand, or, nor, xor, xnor
Twelve bodies, no transistors, no discretes, no primitives.
Two cases that hit it, one of them with no way out
A vactrol — an LED and a photocell inside a box. KiCad ships Isolator:VTL5C, which is drawn (9 polylines, 2 rectangles), so the immediate need was met by placing the stock symbol. It is worth saying why it nearly was not, because it shows what "just use the stock symbol" cannot fix:
- Its LED's two pins sit on the same edge (
{top: [1, 2], bottom: [3, 4]} at rotation 270), so no rotation reproduces a drawing where each element stands vertically with its anode arriving from above and its cathode leaving below. Reproducing that source drawing needs four dog-legs per part.
- It draws the photocell as the IEC rectangle. Its polylines have vertex counts
[4,4,3,3,3,3,2,2,2]; a US zigzag needs a single polyline of about seven vertices. A source drawing that uses the zigzag cannot be matched.
Both were accepted as a compromise in that case. The next one has no compromise available.
A µA726 (temperature-controlled matched transistor pair, and its relatives). Searched every installed SharedSupport/symbols/*.kicad_sym for uA726, 726, LM394, MAT02, SSM2210, THAT3xx: no stock symbol exists. And glyph has no transistor of any kind, so there is no approximate body to fall back on either. The only thing Konnect can produce for it is a rectangle with explicit pins.
That is the shape of the gap: when a stock symbol exists you can sometimes accept it; when one does not, a whole class of parts is simply unauthorable.
Proposed
A graphics list — per unit inside units[], and top-level alongside pins for the single-unit path — reusing the primitive vocabulary set_footprint_graphics already defines, so this is the existing concept applied to the other domain rather than a second vocabulary:
| type |
fields |
line |
start, end, stroke_width_mm |
arc |
start, mid, end, stroke_width_mm |
rect |
start, end, stroke_width_mm, fill |
circle |
center, radius_mm, stroke_width_mm, fill |
poly |
points, stroke_width_mm, fill |
Points as { "x": …, "y": … }, coordinates in symbol-local millimetres, exactly as on the footprint side.
Emitted into the symbol's NAME_0_1 body — the sub-symbol KiCad uses for geometry common to every unit, which is where the stock libraries put it — beside the pins in NAME_<unit>_1.
The automatic body rectangle must be suppressible. create_symbol currently sizes a rectangle to fit the pin names; a caller supplying geometry has drawn the body already, and a box around it is wrong. Suppressing it whenever graphics is given for that unit is the obvious rule and needs no extra argument.
Not proposed: text primitives, or a vactrol/transistor glyph. Generic primitives cover both cases above and the next one; another named glyph covers exactly one part.
Environment
Konnect v0.11.1 · KiCad 10.0.6 · macOS (Apple Silicon) · driven over stdio.
Summary
create_symbolcannot draw. A symbol's body is whichever of twelve fixed glyphs you pick, and there is no way to supply geometry — so any part whose schematic symbol is a drawing rather than a box or a logic gate cannot be authored through Konnect at all.The footprint side already has this.
set_footprint_graphicstakes agraphicslist ofline/arc/rect/circle/poly. Symbols have no equivalent.The gap, enumerated
create_symboltakes exactly:and per unit only
glyphandpins. No graphics, polyline, shape or arc argument at any level.glyphis:Twelve bodies, no transistors, no discretes, no primitives.
Two cases that hit it, one of them with no way out
A vactrol — an LED and a photocell inside a box. KiCad ships
Isolator:VTL5C, which is drawn (9 polylines, 2 rectangles), so the immediate need was met by placing the stock symbol. It is worth saying why it nearly was not, because it shows what "just use the stock symbol" cannot fix:{top: [1, 2], bottom: [3, 4]}at rotation 270), so no rotation reproduces a drawing where each element stands vertically with its anode arriving from above and its cathode leaving below. Reproducing that source drawing needs four dog-legs per part.[4,4,3,3,3,3,2,2,2]; a US zigzag needs a single polyline of about seven vertices. A source drawing that uses the zigzag cannot be matched.Both were accepted as a compromise in that case. The next one has no compromise available.
A µA726 (temperature-controlled matched transistor pair, and its relatives). Searched every installed
SharedSupport/symbols/*.kicad_symforuA726,726,LM394,MAT02,SSM2210,THAT3xx: no stock symbol exists. Andglyphhas no transistor of any kind, so there is no approximate body to fall back on either. The only thing Konnect can produce for it is a rectangle with explicit pins.That is the shape of the gap: when a stock symbol exists you can sometimes accept it; when one does not, a whole class of parts is simply unauthorable.
Proposed
A
graphicslist — per unit insideunits[], and top-level alongsidepinsfor the single-unit path — reusing the primitive vocabularyset_footprint_graphicsalready defines, so this is the existing concept applied to the other domain rather than a second vocabulary:linestart,end,stroke_width_mmarcstart,mid,end,stroke_width_mmrectstart,end,stroke_width_mm,fillcirclecenter,radius_mm,stroke_width_mm,fillpolypoints,stroke_width_mm,fillPoints as
{ "x": …, "y": … }, coordinates in symbol-local millimetres, exactly as on the footprint side.Emitted into the symbol's
NAME_0_1body — the sub-symbol KiCad uses for geometry common to every unit, which is where the stock libraries put it — beside the pins inNAME_<unit>_1.The automatic body rectangle must be suppressible.
create_symbolcurrently sizes a rectangle to fit the pin names; a caller supplying geometry has drawn the body already, and a box around it is wrong. Suppressing it whenevergraphicsis given for that unit is the obvious rule and needs no extra argument.Not proposed: text primitives, or a
vactrol/transistorglyph. Generic primitives cover both cases above and the next one; another named glyph covers exactly one part.Environment
Konnect v0.11.1 · KiCad 10.0.6 · macOS (Apple Silicon) · driven over stdio.