Author Topic: [kinda solved] KiCAD 4.0.3 PCBnew: making a footprint array  (Read 10205 times)

0 Members and 1 Guest are viewing this topic.

Offline WatthTopic starter

  • Regular Contributor
  • *
  • Posts: 241
  • Country: fr
[kinda solved] KiCAD 4.0.3 PCBnew: making a footprint array
« on: September 19, 2016, 02:33:55 pm »
Hi,

Does any of you know a reliable way to have a nice layout of several occurences of the same footprint ?

In my case I am making a 8x8 LED matrix display, so I have  bunch of identical footprints that needs to be spread in a regular fashion.
In this example it goes from D1 to D64.
They are all in PCBnew, since the were in the netlist that was read. They are roughly spread with "Global Spread and Place".

Here's what I tried then:

  • Select D1 with right-click
  • Click Create Footprint Array
  • Set paramateres as shown in screen capture
  • ...
  • Have a result with the footprint array, in which all have the same reference. (see second screen capture)

Am I doing something wrong ?
Is there another way ?
Is it yet another feature that is impossible in KiCAD ?

Thank you for your attention.

Edit: updated subject
« Last Edit: September 21, 2016, 01:02:44 pm by Watth »
Because "Matth" was already taken.
 

Offline Wilksey

  • Super Contributor
  • ***
  • Posts: 1329
Re: KiCAD 4.0.3 PCBnew: making a footprint array
« Reply #1 on: September 19, 2016, 05:21:03 pm »
Are you trying to create an array all with the same reference as "D1" or are you having issues trying to get KiCAD to number your footprints from 1 - 64?
 

Offline WatthTopic starter

  • Regular Contributor
  • *
  • Posts: 241
  • Country: fr
Re: KiCAD 4.0.3 PCBnew: making a footprint array
« Reply #2 on: September 19, 2016, 05:35:34 pm »
Are you trying to create an array all with the same reference as "D1" or are you having issues trying to get KiCAD to number your footprints from 1 - 64?

The problem is indeed that all the footprints are referenced as D1, while I would like them to be automatically numbered D1 to D64.
Because "Matth" was already taken.
 

Offline ElektroQuark

  • Supporter
  • ****
  • Posts: 1244
  • Country: es
    • ElektroQuark
Re: KiCAD 4.0.3 PCBnew: making a footprint array
« Reply #3 on: September 19, 2016, 05:39:01 pm »
Did you create the schematic in Eeschema? There you can automagically change the name of the instances and that will translate to Pcbnew in the net list.

Offline WatthTopic starter

  • Regular Contributor
  • *
  • Posts: 241
  • Country: fr
Re: KiCAD 4.0.3 PCBnew: making a footprint array
« Reply #4 on: September 19, 2016, 06:01:50 pm »
Did you create the schematic in Eeschema? There you can automagically change the name of the instances and that will translate to Pcbnew in the net list.

Yes, they are all in eeschema, and imported through the netlist.
They all appear in PCBnew, of course.
What I'm trying to do: have them neatly arranged in an array.
So I tried the "Create Footprint Array" feature.
"BUT," you might say, "if there are LED footprints D1 to 64, you will make duplicates!" To this I'd answer that I tried doing so, having beforehand deleted D2 to D64 beforehand. (And I also tried without removing them).

My problem is that the footprints generated by the "Create Footprint Array" tool all have the same reference.
Because "Matth" was already taken.
 

Offline langwadt

  • Super Contributor
  • ***
  • Posts: 4427
  • Country: dk
Re: KiCAD 4.0.3 PCBnew: making a footprint array
« Reply #5 on: September 19, 2016, 06:37:05 pm »
Are you trying to create an array all with the same reference as "D1" or are you having issues trying to get KiCAD to number your footprints from 1 - 64?

The problem is indeed that all the footprints are referenced as D1, while I would like them to be automatically numbered D1 to D64.

in pcb delete all but D1 and try creating an array again


 

Online PCB.Wiz

  • Super Contributor
  • ***
  • Posts: 1544
  • Country: au
Re: KiCAD 4.0.3 PCBnew: making a footprint array
« Reply #6 on: September 20, 2016, 01:27:37 am »
So I tried the "Create Footprint Array" feature.
"BUT," you might say, "if there are LED footprints D1 to 64, you will make duplicates!" To this I'd answer that I tried doing so, having beforehand deleted D2 to D64 beforehand. (And I also tried without removing them).

That menu seems borrowed from pad-array inside footprints, and seems to not manage part renumber.
I'd say that feature 'needs work'...



Yes, they are all in eeschema, and imported through the netlist.
They all appear in PCBnew, of course.
What I'm trying to do: have them neatly arranged in an array.
..
My problem is that the footprints generated by the "Create Footprint Array" tool all have the same reference.
If you have them already imported, then best approach is probably to use a script to place them.
The Python code below uses a array of Ref/X/Y/R/S to place a group of parts in a specific way.
You probably do not need Rotate or Side info, but you get the idea....

Code: [Select]
import sys
from pcbnew import *
pcb = GetBoard()
RefNm   = ['C1','C2','C3','C4','C5','C6','C7','C8','C9','C10','D1','D2',
'J1','Q1','R1','R2','R5','R6','R7','U1','U2','U3','U4','U5','U6','U7','X1','Y1']
RefX    = [ 1150, 500, 1950, 700, 700, 1950, 400, 2100, 2100, 1150, 3535, 3465,
 1575, 3100, 2050, 2050, 400, 3675, 3675, 1400, 1400, 2050, 2050, 750, 750, 650, 2600, 400]
RefY    = [-1000,-1000,-1550,-1700,-1350,-900,-1550,-400,-1800,-1650,-1565,-565,
-375,-1200,-550,-1200,-1700,-925,-1275,-800,-1450,-800,-1450,-1600,-1250,-800,-600,-1400]
RefOri  = [ 180, 180, 180, 180, 180, 180, 180, 0, 0, 180, 45, 315,
 0, 90, 0, 0, 0, 255, 105, 0, 0, 0, 0, 0, 0, 0, 0, 90]
RefSide = [True,True,True,True,True,True,True,False,False,True,False,False,
True,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False]

print('Start Place XYRS')
for Idx,Rn in enumerate(RefNm):
  nPart = pcb.FindModuleByReference(Rn)
  nPart.SetPosition(wxPoint(FromMils(RefX[Idx]), FromMils(RefY[Idx])))  # Update XY
  nPart.SetOrientationDegrees (RefOri[Idx])                             # Update Rot
  if RefSide[Idx]!= nPart.IsFlipped():                                  # Current Side <> Reqd Side ? then flip
        nPart.Flip (nPart.GetPosition())
print('Finished Place XYRS, Press F11 to refresh display')
 
The following users thanked this post: Watth

Offline langwadt

  • Super Contributor
  • ***
  • Posts: 4427
  • Country: dk
Re: KiCAD 4.0.3 PCBnew: making a footprint array
« Reply #7 on: September 20, 2016, 08:15:35 pm »
Did you create the schematic in Eeschema? There you can automagically change the name of the instances and that will translate to Pcbnew in the net list.

Yes, they are all in eeschema, and imported through the netlist.
They all appear in PCBnew, of course.
What I'm trying to do: have them neatly arranged in an array.
So I tried the "Create Footprint Array" feature.
"BUT," you might say, "if there are LED footprints D1 to 64, you will make duplicates!" To this I'd answer that I tried doing so, having beforehand deleted D2 to D64 beforehand. (And I also tried without removing them).

My problem is that the footprints generated by the "Create Footprint Array" tool all have the same reference.

it seems they broke that feature, I tried in 4.0.2 and it worked as expected, in 4.0.4 they all get the same reference



 
The following users thanked this post: Watth

Offline firewalker

  • Super Contributor
  • ***
  • Posts: 2450
  • Country: gr
Re: KiCAD 4.0.3 PCBnew: making a footprint array
« Reply #8 on: September 20, 2016, 09:27:14 pm »
Please, fill a bug report.

https://bugs.launchpad.net/kicad
Become a realist, stay a dreamer.

 

Offline firewalker

  • Super Contributor
  • ***
  • Posts: 2450
  • Country: gr
Re: KiCAD 4.0.3 PCBnew: making a footprint array
« Reply #9 on: September 21, 2016, 07:47:04 am »
I filled a bug report.

https://bugs.launchpad.net/kicad/+bug/1625964

Alexander.
Become a realist, stay a dreamer.

 
The following users thanked this post: Watth, PCB.Wiz

Offline WatthTopic starter

  • Regular Contributor
  • *
  • Posts: 241
  • Country: fr
Re: KiCAD 4.0.3 PCBnew: making a footprint array
« Reply #10 on: September 21, 2016, 01:01:30 pm »
YES, definitely a 4.0.3 & 4.0.4 issue. I reinstalled 4.0.2 and it worked.
Thanks everyone.
Because "Matth" was already taken.
 

Offline langwadt

  • Super Contributor
  • ***
  • Posts: 4427
  • Country: dk
Re: [kinda solved] KiCAD 4.0.3 PCBnew: making a footprint array
« Reply #11 on: September 22, 2016, 06:57:38 pm »
and now it is "won't fix"

so it was changed from something that could work to something that is guaranteed to not work...
 

Offline firewalker

  • Super Contributor
  • ***
  • Posts: 2450
  • Country: gr
Re: [kinda solved] KiCAD 4.0.3 PCBnew: making a footprint array
« Reply #12 on: September 22, 2016, 07:04:54 pm »
Yes. I really didn't understand the explanation.

Alexander.
Become a realist, stay a dreamer.

 

Offline bson

  • Supporter
  • ****
  • Posts: 2270
  • Country: us
Re: [kinda solved] KiCAD 4.0.3 PCBnew: making a footprint array
« Reply #13 on: September 22, 2016, 08:02:56 pm »
I understand the explanation, but I don't think the writer understands the problem.  If this is the level of attention of the engineers working on KiCAD, then we're all in trouble.
 

Offline WatthTopic starter

  • Regular Contributor
  • *
  • Posts: 241
  • Country: fr
Re: [kinda solved] KiCAD 4.0.3 PCBnew: making a footprint array
« Reply #14 on: September 22, 2016, 10:18:01 pm »
I guess they really don't want people to use this sofware.  :-//
Because "Matth" was already taken.
 

Offline firewalker

  • Super Contributor
  • ***
  • Posts: 2450
  • Country: gr
Re: [kinda solved] KiCAD 4.0.3 PCBnew: making a footprint array
« Reply #15 on: September 23, 2016, 10:23:56 am »
I think commit 18f07d8efb66328a147c500a10644d2fa9050de7 did the change.

Alexander.
Become a realist, stay a dreamer.

 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf