Seve, currently we know the export usually has the default three files: PCB, schematic, and 3D/project output.
But with multi-sheet schematics, we don’t know ahead of time how many .kicad_sch files will be generated. tscircuit.com/cli handles zipping separately right now, and it seems to assume the default three-file output.
How should we handle schematic sheets here? Should we expose CircuitJsonToKicadProConverter as the main API that returns all generated KiCad files, so consumers don’t need to guess how many schematic files exist?
https://github.com/tscircuit/tscircuit.com/blob/main/src/lib/download-fns/download-kicad-files.ts
mohan-bee
maybe can we expose schematic files like this "resolveAndLoadKicad3dModelFiles" ??
`import {
CircuitJsonToKicadPcbConverter,
CircuitJsonToKicadSchConverter,
CircuitJsonToKicadProConverter,
resolveAndLoadKicad3dModelFiles,
} from "circuit-json-to-kicad"
import { AnyCircuitElement } from "circuit-json"
import JSZip from "jszip"`
Seve
It sounds like CircuitJsonToKicadSchConverter needs to be adapted to be able to output multiple files or something. You may want to rename it etc.- set up the STRUCTURE/TYPES in a separate PR before implementation- when you have a proposal we can discuss more in that pr
<@757706909351411845> I changed the converter to expand via endpoints into the full board span first.
e.g inner1 -> bottom becomes inner1, inner2, bottom on a 4-layer board.
https://github.com/tscircuit/circuit-json-to-kicad/pull/356 i hope this works !
mohan-bee
<@757706909351411845>
KiCad only wants the start and end of that span in the file, it is storing that as endpoint layers , but the converter still expands the full span internally , in the final kicad_pcb it should contain the first and last kicad layes
(via
...
(layers In1.Cu B.Cu)
)
<@757706909351411845> can you review this ? https://github.com/tscircuit/circuit-json-to-kicad/pull/356
mohan-bee
<@757706909351411845> ig <@1079361271687807026> already having a clean fix here https://github.com/tscircuit/circuit-json-to-kicad/pull/357 so i don't want to have a conflict there. i am closing this.
Want to add to the conversation?
Reply in Discord so your notes stay connected to the source.