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

0 Members and 1 Guest are viewing this topic.

Offline Watth

  • Regular Contributor
  • *
  • Posts: 99
  • Country: fr
[kinda solved] KiCAD 4.0.3 PCBnew: making a footprint array
« on: September 20, 2016, 12:33:55 am »
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, 11:02:44 pm by Watth »
Because "Matth" was already taken.
 

Offline Wilksey

  • Super Contributor
  • ***
  • Posts: 1149
Re: KiCAD 4.0.3 PCBnew: making a footprint array
« Reply #1 on: September 20, 2016, 03:21:03 am »
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 Watth

  • Regular Contributor
  • *
  • Posts: 99
  • Country: fr
Re: KiCAD 4.0.3 PCBnew: making a footprint array
« Reply #2 on: September 20, 2016, 03:35:34 am »
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: 1207
  • Country: es
    • ElektroQuark
Re: KiCAD 4.0.3 PCBnew: making a footprint array
« Reply #3 on: September 20, 2016, 03:39:01 am »
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 Watth

  • Regular Contributor
  • *
  • Posts: 99
  • Country: fr
Re: KiCAD 4.0.3 PCBnew: making a footprint array
« Reply #4 on: September 20, 2016, 04:01:50 am »
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: 1219
  • Country: dk
Re: KiCAD 4.0.3 PCBnew: making a footprint array
« Reply #5 on: September 20, 2016, 04:37:05 am »
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


 

Offline PCB.Wiz

  • Frequent Contributor
  • **
  • Posts: 298
  • Country: au
Re: KiCAD 4.0.3 PCBnew: making a footprint array
« Reply #6 on: September 20, 2016, 11: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: 1219
  • Country: dk
Re: KiCAD 4.0.3 PCBnew: making a footprint array
« Reply #7 on: September 21, 2016, 06:15:35 am »
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: 2314
  • Country: gr
Re: KiCAD 4.0.3 PCBnew: making a footprint array
« Reply #8 on: September 21, 2016, 07:27:14 am »
Please, fill a bug report.

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

 

Offline firewalker

  • Super Contributor
  • ***
  • Posts: 2314
  • Country: gr
Re: KiCAD 4.0.3 PCBnew: making a footprint array
« Reply #9 on: September 21, 2016, 05:47:04 pm »
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 Watth

  • Regular Contributor
  • *
  • Posts: 99
  • Country: fr
Re: KiCAD 4.0.3 PCBnew: making a footprint array
« Reply #10 on: September 21, 2016, 11: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: 1219
  • Country: dk
Re: [kinda solved] KiCAD 4.0.3 PCBnew: making a footprint array
« Reply #11 on: September 23, 2016, 04:57:38 am »
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: 2314
  • Country: gr
Re: [kinda solved] KiCAD 4.0.3 PCBnew: making a footprint array
« Reply #12 on: September 23, 2016, 05:04:54 am »
Yes. I really didn't understand the explanation.

Alexander.
Become a realist, stay a dreamer.

 

Offline bson

  • Supporter
  • ****
  • Posts: 1507
  • Country: us
Re: [kinda solved] KiCAD 4.0.3 PCBnew: making a footprint array
« Reply #13 on: September 23, 2016, 06:02:56 am »
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 Watth

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

Offline firewalker

  • Super Contributor
  • ***
  • Posts: 2314
  • Country: gr
Re: [kinda solved] KiCAD 4.0.3 PCBnew: making a footprint array
« Reply #15 on: September 23, 2016, 08:23:56 pm »
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