Skip to content
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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

AkashJana18
Copy link

@AkashJana18 AkashJana18 commented Nov 16, 2024

/claim #122

Before :
image

After:
image

image

Copy link

vercel bot commented Nov 16, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
circuit-to-svg ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 17, 2024 8:29pm

Copy link

algora-pbc bot commented Nov 17, 2024

💵 To receive payouts, sign up on Algora, link your Github account and connect with Stripe.

@seveibar
Copy link
Contributor

we really don't like magic numbers, so this solution probably isn't acceptable

Copy link
Contributor

@seveibar seveibar left a 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?

@AkashJana18
Copy link
Author

we really don't like magic numbers, so this solution probably isn't acceptable

Okay, I will be right back with better solution

@AkashJana18
Copy link
Author

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.
image

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!

@imrishabh18
Copy link
Member

@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.

@AkashJana18
Copy link
Author

Can you @imrishabh18 please tag the file ?

@imrishabh18
Copy link
Member

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.

@AkashJana18
Copy link
Author

So i have to download the inkscape tool to edit the boxresistor.svg and push it right @imrishabh18

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants