top | item 40177806

(no title)

tmitchel2 | 1 year ago

Awesome work, I've developed my own projects which are fairly similar to this. I would say that the auto router is the most important aspect for this to work well, and unfortunately one of the most complex areas :)

The only minor complaint is that the wires / nets / traces are also components themselves. JSX can only build tree structures but wires turn circuits into graphs, so for those I would have used plain js classes or hooks like useWire and then pass the + and - into the components. That gives you the added benefit of warning when you haven't wired up a component fully. Also allows for required and optional wire inputs on components.

discuss

order

seveibar|1 year ago

useWire and other type-safe routing features are coming soon! You are 100% correct that the way it’s currently being done can’t leverage the type system. I also agree that autorouting and auto-layout are critical (in the same way flex is important for web!!)

clord|1 year ago

I like the idea of autolayout like flex for routing wires. There needs to be things like busses etc., feels like there is something there that could be flexed. Problem is the multiple dimensions of connections, so maybe something inspired by grid layout and grid template area?

tmitchel2|1 year ago

Also checkout projects like spinalhdl, it's not really for PCBs and doesnt have JSX but the concepts are similar. Has things like wire bundles which is where the payback from these approaches really kick in.