shibo - @Seve required for full-wave rectifier ...

13 Replies
shibo
shiboOP3w ago
I believe it will important for most circuits
Seve
Seve3w ago
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 😁
shibo
shiboOP3w ago
sg, updated pr: https://github.com/tscircuit/circuit-json/pull/360 @Seve can we use the same existing props:
export interface VoltageProbeProps extends Omit<CommonComponentProps, "name"> {
name?: string
connectsTo: string | string[]
color?: string
}
export interface VoltageProbeProps extends Omit<CommonComponentProps, "name"> {
name?: string
connectsTo: string | string[]
color?: string
}
?
Seve
Seve3w ago
we probably need referenceTo i guess
shibo
shiboOP3w ago
https://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
Seve
Seve3w ago
yep not an issue to use circuit json for circuit json converters
Seve
Seve2w ago
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
shibo
shiboOP2w ago
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
Seve
Seve2w ago
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.
<panel>
{range(10).map(() => <MyBoard />)}
</panel>
<panel>
{range(10).map(() => <MyBoard />)}
</panel>
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 json
shibo
shiboOP2w ago
cool, 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 head
Seve
Seve2w ago
well 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 similarly
shibo
shiboOP2w ago
https://github.com/tscircuit/core/pull/1706 used structuredClone please give me a review or approval

Did you find this page helpful?