Seve - The traces arent correctly routing in th...
The traces arent correctly routing in this doc with assignable vias, can someone take a look? The traces are missing segments (cc mention ) https://docs.tscircuit.com/guides/tscircuit essentials/using viagrid prefabricated vias with autorouter
The traces arent correctly routing in this doc with assignable vias, can someone take a look? The traces are missing segments (cc <@809856037376491570> ) https://docs.tscircuit.com/guides/tscircuit-essentials/using-viagrid-prefabricated-vias-with-autorouter
<@809856037376491570> I managed to repro in eval and this should fix the issue in kicad to circuit json https://github.com/tscircuit/kicad-to-circuit-json/pull/150
Abse
but not sure if we can push the kicad mod code to our repo ?
Abse
maybe copyrighted, I can remove it after u take a look
Abse
<@809856037376491570> wehn u got time plz take a look
R
Rishabh
Taking a look
R
Rishabh
After you merge the kicad-mod-cache migration PR, also run the test Ci in eval after that
Abse
OK
Abse
can we merge the kicad mode code or I should remove it ?
R
Rishabh
Remove it I guess
Abse
k
Abse
<@809856037376491570> can I get another review on this so we can merge https://github.com/tscircuit/kicad-mod-cache/pull/24
<@809856037376491570> so the text is bigger now for kicad Ref
In kicad-to-circuit-json, the footprint text path does:
const fontSize = kicadFontSize * KICAD_TEXT_HEIGHT_TO_CIRCUIT_JSON_FONT_SIZE
`The old kicad-component-converter used the KiCad font size directly:
font_size: fp_text.effects?.font?.size[0] ?? 1`
So a KiCad silkscreen ref text with size 1 used to become font_size: 1, but now becomes font_size: 1.5.
The reason in the new converter is documented in its comment: it is trying to be inverse-compatible with circuit-json-to-kicad, which apparently divides by 1.5 when going the other direction.
should we change kicd to circuit json to use the kicad font size or keep the current 1.5 ?
R
Rishabh
I think we should keep the size to be inverse compatible. Not so sure.
<@757706909351411845> ?
Seve
Hmm, i dont really know whats reasonable here but if you convert kicad to circuit json it should be the right size in the snapshot (after unit conversions)
Seve
Anything else is strange no?
Abse
<@809856037376491570> I think I should just make the font as it was before ( that looks better imo)
R
Rishabh
but also figure out why the conversion scale is not 1.5 times, this might become an annoying bug
Scaling text makes sense for the schematic's cause what we see in our schematic viewer and what we see in the schematic's in the A3 size or something then it does needs scaling
Abse
I see so will this create bugs later for sch ?
R
Rishabh
I am not sure, run tests
Abse
we have another issue <@809856037376491570>
Some KiCad cache requests return 500 Internal Server Error during footprint conversion.
Example failing URLs:
https://kicad-mod-cache.tscircuit.com/Package_TO_SOT_SMD.pretty/SOT-23-3.circuit.json
https://kicad-mod-cache.tscircuit.com/Package_SO.pretty/SOIC-8_3.9x4.9mm_P1.27mm.circuit.json
should we Update kicad-to-circuit-json so fp_poly parsing does not require uuid or tstamp. If both are missing, generate a deterministic fallback id from the polygon data, Then update the cache service to use the fixed converter ?
R
Rishabh
Yeah, repro this inside `kicad-to-circuit-json` and then create a fix for it
<@809856037376491570> <@757706909351411845>
I checked the difference between the old `tscircuit/kicad-component-converter` and the current `kicad-to-circuit-json` parsing for KiCad reference text.
The old converter had special handling for the font size of `property "Reference"` text. Instead of using the property’s own KiCad font size, it looked at `fp_text` entries:
- Prefer reference-like `fp_text` on `F.SilkS`
- If not found, fall back to reference-like `fp_text` on `F.Fab`
- Use that `fp_text.effects.font.size` as the font size for the emitted `pcb_silkscreen_text`
That matters for footprints like `R_0402_1005Metric`, where KiCad has:
- `property "Reference" "REF**"` on `F.SilkS` with `(size 1 1)`
- `fp_text user "${REFERENCE}"` on `F.Fab` with `(size 0.26 0.26)`
The old converter would use `0.26` from the `${REFERENCE}` `fp_text` fallback.
The current `kicad-to-circuit-json` preserves the `property "Reference"` font size directly, so it emits `pcb_silkscreen_text` with `font_size: 1`.
Then `@tscircuit/core` consumes that footprint text and adds `+0.2` via `_footprinterFontSize = elm.font_size + 0.2`, making the rendered refdes `1.2mm`. That’s why example 18’s `R1` is much larger now.
So the core behavior difference is:
Old converter:
`property Reference` font size came from small reference-like `fp_text`, often `0.26`.
New converter:
`property Reference` font size comes from the KiCad property itself, often `1`.
This is why the ref text changed size after moving to `kicad-to-circuit-json`.
Abse
should we change kicad to circuit json to do the same ?