I am using eagle cad to design a clock with smd leds .There are 60 leds and i'll place those leds on a circle pattern which like an analog clock is there any way i can do this easily like a script or can i export components coordinates and angle data to a file then i can change them with a vim macro then import again ?
1 Answer
Yes, it is possible to place a bunch of parts in some regular pattern by using a script. That is exactly how I do this sort of thing when it comes up.
Use whatever your favorite programming language is to write the script. This should be little more than a bunch of MOVE commands that you execute in the board editor.
I use programs to write Eagle scripts enough that I have a library of routines that write out common elements of Eagle scripts and other related useful operations. For example, I have routines that open a script file, write coordinates in Eagle format after a 2D transformation, various layered ways to adjust the 2D transform like rotation and scaling, writing characters, strings, floating point numbers, write MOVE commands, convert between coordinate systems, etc.
Don't think you'll only do this once, so take a few minutes up front to write the subroutines. That will make this even easier the next time you need to automatically generate a Eagle script.