Author Topic: Rotating footprints to enable pick-and-place  (Read 789 times)

0 Members and 2 Guests are viewing this topic.

Offline salfter

  • Contributor
  • Posts: 21
  • Country: us
    • My Blog
Rotating footprints to enable pick-and-place
« on: August 16, 2018, 03:40:04 am »
I did some reading recently on design for manufacture (in particular, https://rheingoldheavy.com/design-assembly-kicad/), and one of the things that came up was that you should have your component footprints oriented the same way as they’re loaded into the tape that gets loaded into the pick-and-place machine. Many KiCad footprints (including those that ship with KiCad) aren’t oriented this way, and even in the new KiCad 5, I don’t see an easy way to rotate an entire footprint. You can rotate a footprint inside a PCB design, but unless I’m missing something, there’s no option within the footprint editor to take all the elements within and rotate them (let alone an option to rotate an individual element, as far as I can see).

I’ve come up with this:

https://gitlab.com/salfter/kicad-footprint-rotator/

It's a sed script that takes a KiCad footprint and rotates it 90° counterclockwise by transforming coordinates, dimensions, and rotation angles within. If you need to rotate 180°, run your footprint through the script twice. To rotate 90° clockwise, run it through three times.

Some screenshots of a footprint that has been processed through the script are up on my blog:

https://alfter.us/wp/2018/08/15/how-to-rotate-kicad-footprints/
 

Offline hermit

  • Frequent Contributor
  • **
  • Posts: 458
  • Country: us
Re: Rotating footprints to enable pick-and-place
« Reply #1 on: August 16, 2018, 04:37:58 am »
You may want to do a 'pull request'? here.
https://github.com/xesscorp/kicad-3rd-party-tools

You may want to discuss the topic further here.  I know the subject has come up before but not an area that I have any interest in at the moment so I can't really tell you more specifics.
https://forum.kicad.info/
 

Offline mikeselectricstuff

  • Super Contributor
  • ***
  • Posts: 11500
  • Country: gb
    • Mike's Electric Stuff
Re: Rotating footprints to enable pick-and-place
« Reply #2 on: August 16, 2018, 04:51:44 am »
The absolute orientation will vary between P&P machines, what is important is that the orientation is consistent with respect to the taping. i.e. zero degrees corresponds to a specific tape orientation with respect to the PCB.
That way any machine-specific rotation can be done globally.
Youtube channel:Taking wierd stuff apart. Very apart.
Mike's Electric Stuff: High voltage, vintage electronics etc.
Day Job: Mostly LEDs
 

Offline salfter

  • Contributor
  • Posts: 21
  • Country: us
    • My Blog
Re: Rotating footprints to enable pick-and-place
« Reply #3 on: August 16, 2018, 05:38:03 am »
Quote
You may want to do a 'pull request'? here.
https://github.com/xesscorp/kicad-3rd-party-tools

Done. :)
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf