-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Fix] : Left and right side port of resistor #131
base: main
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
💵 To receive payouts, sign up on Algora, link your Github account and connect with Stripe. |
lib/sch/svg-object-fns/create-svg-objects-from-sch-component-with-symbol.ts
Outdated
Show resolved
Hide resolved
we really don't like magic numbers, so this solution probably isn't acceptable |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no magic numbers allowed. What is the underlying cause of the offset on only one side?
…ith-symbol.ts Co-authored-by: Severin Ibarluzea <[email protected]>
Okay, I will be right back with better solution |
Hey @seveibar , After investigating the issue, I’ve identified that the root cause lies in the asymmetry of the port positions defined in the symbol itself. The slight misalignment in the coordinates causes the observed offset. I haven’t applied any fixes yet, but addressing this at the source (by ensuring symmetrical and consistent port positions in the symbol definition) would be the cleanest solution, avoiding the need for workarounds or hacks in the code. Looking forward to your feedback on this approach! |
@AkashJana18 Great! I had this hunch that probably it will be on the symbol alignment but great that you showed the coordinates to prove it. It would be great if you can fix this in the schematic symbols. |
Can you @imrishabh18 please tag the file ? |
https://github.com/tscircuit/schematic-symbols/blob/main/assets/symbols/boxresistor.svg This is the file which you can edit in inkscape tool, and align the two ports. You can then see the documentation on how to generate the files after you have edited and preview. |
So i have to download the inkscape tool to edit the boxresistor.svg and push it right @imrishabh18 |
/claim #122
Before :

After:
