You need to use EasyEDA editor to create some projects before publishing
A script for moving components onto the grid in PCB layout?
2165 12
Guest 9 years ago
Hi All, There does not seem to be an easy way to snap components to the grid. Perhaps there is but I have not found it! Setting the snap grid (to say 100 mil) does not necessarily align the pads or through holes with the grid. Currently I edit (round) the component X and Y coordinates. Is there a better way or does someone have a script. Regards AlanC
Comments
support 9 years ago
Hi, Try https://easyeda.com/Doc/Tutorial/API.htm#EasyEDA-API-Plug out.
Reply
Guest 9 years ago
Hi, I was rather hoping not to have to write my own! I guess that is the way it is going to be. Regards AlanC
Reply
andyfierman 9 years ago
@AlanC, I have no problem snapping PCB footprints and traces to whatever I set my snap distance to. Works for me in Chrome and Firefox using EasyEDA version 3.5.7. * Are you sure that you have got the grid snap turned on? ![enter image description here][1] [1]: /editor/20160530/574bfd8576030.png
Reply
Guest 9 years ago
Hi Andy, Yes the Grid Snap is on and I have set the Snap Size to 100mil. This is what I get (and it is not always consistent between components). ![Off_Center][1] I can fix it here: ![Off Centre Fix][2] But this is a pain. So what am I doing wrong? I can write code but it takes time to come up to speed with the language, I am hoping its a setting or something similar.I am not lazy to write code but I want to get the interface and work flow under control first. Regards AlanC [1]: /editor/20160530/574c1d47c7203.png [2]: /editor/20160530/574c1d75cd699.png
Reply
andyfierman 9 years ago
Is this a problem with all or just some of the footprints? If just some, can you post which parts you are seeing this problem with?
Reply
Guest 9 years ago
Hi, No it is a problem with all parts (footprints). Basically I create the PCB and when I place the parts they are off grid (even with the snap on). Let me delete the PCB and double check that it is still happening - It may be the classic new user bug! AlanC
Reply
Guest 9 years ago
Hi Andy, Okay found the problem. If I select a group of components (to place them on the board) and rotate them I get the problem (small off grid offset). If I select only one component then it is fine. Playing around with group rotations I find that the label (U1, R1 etc) is used in the centre of rotation calculation. If I move it towards the centre (away from the boundary) the group rotation works. For single components the label is not being used. That explains why the offset is not the same for all components (as I did not select all components in one hit). It also tell me that it is not a setting problem (it is a coding bug) and I will need to write a script to fix it OR don't do group rotations. Regards Alan
Reply
dillon 9 years ago
Hi, This is maybe not a code bug. When group select, the center point is the group parts, not the every part , so after group rotation will cause such problem. The center is changed.
Reply
Guest 9 years ago
Hi Dillon Yes understood. But the label is not used for a single part for determining the centre of rotation. But labels are used for a group for determining the centre of rotation. This is easy to test by moving the label and then rotation the part or parts. So the code is inconsistent. I can understand why the programmer did not use the part label for single part rotations, it would have been identified immediately as a "bug". Really, the label should not be used for group rotations. As this will changes with the part number/id so it will generate varying offsets. If the label is not used, then (mostly - I understand that there will be cases that will fail) the grid alignment would work or at least be only 1/2 a grid off (as the parts are place on the grid initially). A cheat (not really suggested) would be to round the group centre to say 1/2 a grid. Anyway, its only a suggestion - I can work around the problem now that I understand it. Regards AlanC
Reply
dillon 9 years ago
Thanks, BTW, you https://easyeda.com/AlanC/R6502B-5j3XQKqWe is nice
Reply
Guest 9 years ago
@dillon Thanks - Still working on it. Having a horrible time at the moment. Can't get the Nets working (in the Design Manager). Two (out of three 74LS00) of the IC power supplies just won't clear (yes I found unhide hidden pins). I also noted that a number of my nets are GND even though they are not?! Deleting them and redoing them does not help. Currently replacing all the IC with with something similar but different (perhaps it's a bad IC). Somehow I shifted my nets by a small offset (less than 1/10 of a mil) but the ICs were fine(?) and now I need to reconnect them. (It may have been the global moves I did to recentre the design - possible numeric precission error?). I am thinking it may be better to restart from scratch. Regards Alan
Reply
Guest 9 years ago
Hi Dillan, I think I worked out how I moved everything off grid. I ran a label hard up against the top edge of the canvas (during a global move). Regards AlanC
Reply
Login or Register to add a comment
goToTop
你现在访问的是EasyEDA海外版,建议访问速度更快的国内版 https://lceda.cn(需要重新注册)
如果需要转移工程请在个人中心 - 工程 - 工程高级设置 - 下载工程,下载后在https://lceda.cn/editor 打开保存即可。
联系我们:https://docs.lceda.cn/cn/FAQ/Contact-Us/index.html不再提醒
svg-battery svg-battery-wifi svg-books svg-more svg-paste svg-pencil svg-plant svg-ruler svg-share svg-user svg-logo-cn svg-double-arrow -mockplus- -mockplus- -mockplus- -mockplus- -mockplus- -mockplus- -mockplus- -mockplus-@1x -mockplus-

Cookie Notice

Our website uses essential cookies to help us ensure that it is working as expected, and uses optional analytics cookies to offer you a better browsing experience. To find out more, read our Cookie Notice