Mustafa7 - @Seve for this issue: https://github...
@Seve for this issue: https://github.com/tscircuit/tscircuit/issues/789
I did some research in
schematic-symbols
repo and this is the output:
the blue lines/traces connects to the port center, that is why there is a gap.
So where do you think the issue is?(in core
or circuit-to-svg
or in the symbols repo)GitHub
Fix minor "offsets" in schematic svgs · Issue #789 · tscircuit/ts...
May be due to schematic-symbols repo or the integration into tscircuit/core Probably NOT an issue with circuit-to-svg (probably) /bounty $100

65 Replies
I still don't understand
the port center seems like a totally ok place to connect
the red dot is the port center no?
yes
is that not aligned with the black line?
the black line ends at the starting of the red square
great find
wait no
that's right right?
the black line ends at the red square
yea but the blue line should not start from the black line?
can you go to excalidraw.com and make an exaggerated diagram
use a red square, a blue line and a black line
the red square, the end of the black line, and the start of the blue line should all be the same
afaik
I guess what he is trying to say is that, the port which used to be there a circle generally. The trace is starting from the center of it, while the port (black line) ends at the left end of the circle/port
so the issue has to do with the circle radius?
@Mustafa7 Draw a circle inplace of the red square. Cause the port used to be that before we removed it. It can give a better picture
Yes
which one of these is currently the state of the issue?

if it's v2 then it's a schematic-symbols bug
if it's v1 i don't think there should be any issues
i think it's probably v2
in which case, we should throw an error if a port center is ever not exactly at the end of a line
I think this is what he mean't

A v3
yes this one

We could add an offset to either the port pinLenght for this to fix, or the other way to the trace start point
@Rishabh Could you please check it once? I'm doing the same thing — just adding the offset for this. what do you think ?
https://github.com/tscircuit/core/pull/1366
GitHub
Align schematic trace anchors with symbol pins by nailoo · Pull ...
/claim tscircuit/tscircuit#789
@nailoo your fix is very complicated when i think @Mustafa7 might have identified a data issue in the schematic-symbols repo
we don't want to have custom logic unless it's absolutely necessary, in this case i'm not sure it is
@Seve what do you think? where should it be fixed? in the symbols or core?
please create the exaggerated excalidraw of the issue
i still don't know what the issue is
you could temporarliy replace the red block with a thin cross to demonstrate
i suspect it's a data issue, but i haven't seen any proof, so i can't help because i don't know what the issue is
@Seve ig it looks right for the
icled_right
svg but there is gaps in capacitor and resistor svgs.
Is this the correct visualization?


@Rishabh
It looks like the port position is incorrect in the svg's
yea let's fix those port positions
the cross is even better than the square, we should switch to the cross
it's very clear now
@Mustafa7 i think you should programmatically error in the test that generates all the snapshots if a port center is not exactly at the end of a line with a chip. I think what happened is people haphazardly dragged these things on the svg and now we are going to have these issues all over the place unless we test for it
it'll also give you all the relevant symbols to fix
@Seve @Rishabh
These are all the symbols that needs to be fixed
should i proceed to fix?
we just have to fix the data in the json files right?
Yes i think so if the issue is those offsets
@Seve This is how it should be right, just to let you know

Also should i remove the red square and make it cross?
i think it's a good idea to use a cross instead of the red square permanently yes
yes that looks right
@Seve @Rishabh https://github.com/tscircuit/schematic-symbols/pull/367
GitHub
Fix the offsets at the port center for symbols and add cross in pla...
ref tscircuit/tscircuit#789
this is a big pr. is this fine or should i do it in small parts?
LGTM! let's see what Seve has to say
@Seve can you check this
@Seve after updating the
schematic-symbols
symbols other than the chip
does not have offsets. So why is the chip
has offsets? is it because the chip symbol is implemented in the core
itself?
The dimensions for the chip is being constructed in
core
but the pinLength is being constructed in circuit-to-svg
for the chip. Is this your question?
You might have to look into the circuit-to-svg
for fixing the gap for chips regarding thisOk i'll update the rest in core and look for chip in circuit-to-svg
i could be wrong but it might be a core bug. It really depends on the exact coordinates the chip is drawn with. Rishabh is right that it could be circuit to svg
GitHub
Update the symbols dep to fix the offset issue by MustafaMulla29 ·...
ref tscircuit/tscircuit#789
ill look for chip and fix it in the next pr
and then claim it
@Seve can we merge this
GitHub
Fix the chip offsets by MustafaMulla29 · Pull Request #329 · tsci...
/claim tscircuit/tscircuit#789
After this, I'll then update the deps in core, eval and tscircuit
@Seve
@Seve this pr is not been counted on contribution-tracker for me🥲
That was the main pr for the issue🥲
probably too big, yes seems like a contribution tracker bug or something
Ok
@Seve can you check this, also if you could mark it higher that would be helpful 🥲https://github.com/tscircuit/circuit-to-svg/pull/329
GitHub
Fix the chip offsets by MustafaMulla29 · Pull Request #329 · tsci...
/claim tscircuit/tscircuit#789
@Seve addressed the review
GitHub
Fix the chip offsets by MustafaMulla29 · Pull Request #329 · tsci...
/claim tscircuit/tscircuit#789
@Seve @Rishabh can you please merge this
https://github.com/tscircuit/core/pull/1405
GitHub
Fix the offsets by updating the circuti-to-svg by MustafaMulla29 ·...
ref tscircuit/tscircuit#789
@Seve merge req
https://github.com/tscircuit/eval/pull/1118
GitHub
Update the core version to fix the offsets by MustafaMulla29 · Pul...
ref tscircuit/tscircuit#789
@Rishabh
It has merge conflicts
Oh ok, i think the dep update is already merged
I'll close it
@Rishabh can you merge this:
https://github.com/tscircuit/tscircuit/pull/808
@Seve
Iiuc you also need to make sure runframe and tscircuit.com have the updated schematic symbols
I'll do that
@Seve https://github.com/tscircuit/tscircuit/pull/808
on runframe
eval
is already updated, so i updated the runframe as in the tscircuitafter this i'll update it on tscircuit.com
@Seve
hehe you know for dep updates you can tag any maintainer
is it possible to have a multi-user tag with discord
i've added @anyreviewer