shibo - @Seve required for full-wave rectifier ...
@Seve required for full-wave rectifier circuit:
https://github.com/tscircuit/ngspice-spice-engine/pull/4
https://github.com/tscircuit/circuit-json/pull/360
13 Replies
I believe it will important for most circuits
left a comment on the circuit-json, lmk what you think
oooh
actually instead of
from_* and to_, we should maybe do reference_input_source_port_id/reference_input_source_net_id and signal_input_source_port_id/signal_input_source_net_id, i think that makes it pretty clear
wdyt? sorry for the delay, in the lab 😁sg, updated pr: https://github.com/tscircuit/circuit-json/pull/360
@Seve can we use the same existing props:
?
we probably need
referenceTo i guesshttps://github.com/tscircuit/props/pull/509
@Seve it's very hard to implement features that aren't implemented in core, also the current pattern does not exist in any other repo: https://github.com/tscircuit/circuit-json-to-spice/pull/25
yep not an issue to use circuit json for circuit json converters
@Seve https://github.com/tscircuit/ngspice-spice-engine/pull/5
https://github.com/tscircuit/docs/pull/359
https://github.com/tscircuit/circuit-json-to-spice/pull/27
wip but please take look, am i going in the right direction? https://github.com/tscircuit/core/pull/1701
Uhh i think its a bit off, will do a deep dive later today
I dont think we should support general subcircuits under panels
Boards are a specific type of subcircuit
A board can be cached via circuit json through prop inspection
https://github.com/tscircuit/docs/pull/361
@Seve https://github.com/tscircuit/core/pull/1703
@Seve we added support for this yesterday, just added to the docs
@Seve important pr: https://github.com/tscircuit/core/pull/1705
@Seve I'm not sure if this is the conventional fix but at least I identified an issue: https://github.com/tscircuit/core/pull/1706
uhhh hold on
what is the "cache"?
oh i think i understand what's happening
use
structuredClone
to be clear, providing circuitJson as a prop isn't the panel board cache thing i was talking about, the panel-board-cache-thing is to identify boards that have the same content then memoize them automatically. It is a tricky implementation
e.g.
No matter how <MyBoard /> is defined, we can do a special sort of analysis to make sure we can cache the circuit json result
HOWEVER it uses all the same inflation stuff
because you basically render the first board then copy it's circuit jsoncool, can I merge this after using
structuredClone then start working on the caching?
how do I infer it worked in my test file? is there a way to verify it was cached? I guess I'd have to figure that out but I thought maybe you know something from the top of your headwell you could try to use render events,
circuit.on("..."
but tbc everything you're doing is good i think- just probably not how a user would use it- but the inflation still works similarlyhttps://github.com/tscircuit/core/pull/1706 used
structuredClone please give me a review or approval