tscircuit / builder

11 stars 7 forks source link

feat: trace_width option added #94

Closed imrishabh18 closed 3 months ago

imrishabh18 commented 3 months ago

Didn't add the screenshot because the soup-to-svg is not parsing the source_net yet.

Closes - https://github.com/tscircuit/tscircuit/issues/264

imrishabh18 commented 3 months ago

@seveibar Why does the pcb don't render anything for the net-builder-1 test https://debug.tscircuit.com/soup_group/builder:%20net%20builder%201#%7B%22selected_engine%22%3A%22pcb%22%2C%22selected_layout_index%22%3A0%7D

seveibar commented 3 months ago

@imrishabh18 yep thats fine

imrishabh18 commented 3 months ago

The snapshot generated is also blank, like you can see in the debug view. So didn't add it to the pr

seveibar commented 3 months ago

@imrishabh18 might be a good idea to create a new test that has output.

Btw I have no idea why you're getting those type errors- I would make sure that @tscircuit/soup is a peerDependency and dependency in circuit-to-svg and circuit-to-png. I think if it's listed as a devDependecy OR isn't listed as a dependency then it can be accidentally bundled.

CC @andrii-balitskyi and I discussed linting that ensured that tscircuit dependencies don't get accidentally bundled

imrishabh18 commented 3 months ago

Yeah, fixed it now. Added it as a peerDependency

seveibar commented 3 months ago

Oh @imrishabh18 sorry I read your comments to quick, I'm not sure why it's not outputing but it definitely seems like an issue we should investigate.

This is also making me think we need to add automatic scaling and transformation-matrix to circuit-to-svg because in this case the circuit is incredibly small (less than 5mm) so it needs to autoscale to fit the view like pcb-viewer. We should use transformation-matrix which makes this scaling really easy, you just do transform.applyToPoint and it will make each point in the correct location

imrishabh18 commented 3 months ago

Okay, will take a look into transformation-matrix