leomcelroy / svg-pcb

Design PCBs in the Browser
https://www.leomcelroy.com/svg-pcb-website
GNU General Public License v3.0
64 stars 9 forks source link

Add snapToPad with reference #10

Closed kr15h closed 1 year ago

kr15h commented 1 year ago

Add snapToPad with referencing a pad when creating new points for a path. It helped to understand the internals of the thing. It could be that the implementation of this could be more elegant if I would understand something from the existing code that I do not know yet, but time will show. Moving to the next challenge is the way I guess.

kr15h commented 1 year ago

I played around with the pad radius there, even though for rect pads it would be better as it was before. The ultimate solution for pad snapping would be checking against their actual shape. Whether it is needed to investigate this at this point, remains an open question...