[kinda solved] KiCAD 4.0.3 PCBnew: making a footprint array - Page 1
Forum section: electronics / general

author: Watth
author_rank: Frequent Contributor
timestamp: September 19, 2016, 02:33:55 pm
content: 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-clickClick Create Footprint ArraySet 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

author: Wilksey
author_rank: Super Contributor
timestamp: September 19, 2016, 05:21:03 pm
content: 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?

author: Watth
author_rank: Frequent Contributor
timestamp: September 19, 2016, 05:35:34 pm
content: Quote from: Wilksey on September 19, 2016, 05:21:03 pmThe problem is indeed that all the footprints are referenced as D1, while I would like them to be automatically numbered D1 to D64.

author: ElektroQuark
author_rank: Unknown
timestamp: September 19, 2016, 05:39:01 pm
content: 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.

author: Watth
author_rank: Frequent Contributor
timestamp: September 19, 2016, 06:01:50 pm
content: Quote from: EdoNork on September 19, 2016, 05:39:01 pmYes, 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.

author: langwadt
author_rank: Super Contributor
timestamp: September 19, 2016, 06:37:05 pm
content: Quote from: Watth on September 19, 2016, 05:35:34 pmin pcb delete all but D1 and try creating an array again

author: PCB.Wiz
author_rank: Super Contributor
timestamp: September 20, 2016, 01:27:37 am
content: Quote from: Watth on September 19, 2016, 06:01:50 pmThat menu seems borrowed from pad-array inside footprints, and seems to not manage part renumber.I'd say that feature 'needs work'...Quote from: Watth on September 19, 2016, 06:01:50 pmIf 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:import sysfrom 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), FromMils(RefY))) # Update XYnPart.SetOrientationDegrees (RefOri) # Update Rotif RefSide!= nPart.IsFlipped(): # Current Side <> Reqd Side ? then flipnPart.Flip (nPart.GetPosition())print('Finished Place XYRS, Press F11 to refresh display')

author: langwadt
author_rank: Super Contributor
timestamp: September 20, 2016, 08:15:35 pm
content: Quote from: Watth on September 19, 2016, 06:01:50 pmit 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

author: firewalker
author_rank: Super Contributor
timestamp: September 20, 2016, 09:27:14 pm
content: Please, fill a bug report.https://bugs.launchpad.net/kicad

author: firewalker
author_rank: Super Contributor
timestamp: September 21, 2016, 07:47:04 am
content: I filled a bug report.https://bugs.launchpad.net/kicad/+bug/1625964Alexander.

author: Watth
author_rank: Frequent Contributor
timestamp: September 21, 2016, 01:01:30 pm
content: YES, definitely a 4.0.3 & 4.0.4 issue. I reinstalled 4.0.2 and it worked.Thanks everyone.

author: langwadt
author_rank: Super Contributor
timestamp: September 22, 2016, 06:57:38 pm
content: and now it is "won't fix"so it was changed from something that could work to something that is guaranteed to not work...

author: firewalker
author_rank: Super Contributor
timestamp: September 22, 2016, 07:04:54 pm
content: Yes. I really didn't understand the explanation.Alexander.

author: bson
author_rank: Unknown
timestamp: September 22, 2016, 08:02:56 pm
content: 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.

author: Watth
author_rank: Frequent Contributor
timestamp: September 22, 2016, 10:18:01 pm
content: I guess theyreallydon't want people to use this sofware.

author: firewalker
author_rank: Super Contributor
timestamp: September 23, 2016, 10:23:56 am
content: I think commit 18f07d8efb66328a147c500a10644d2fa9050de7 did the change.Alexander.