Repetitive layout, how?

Since through this amazing forum you can solve many problems in the use of Kicad, I take this opportunity again
I have a group of components (connectors, resistors, LEDs) that must be repeated identical, with all connections (PADS and Piste etc.): of course I speak of the PCB, derived from eeSchematic connected. How to do? I have already placed the fingerprints of all the components at the correct and identical distances, repetitions for the 16 groups, I have done all the connecting tracks of the first group, but if I go to duplicate they keep me connected to the first group, and it is not possible to do otherwise.
Some idea? How do you do in these cases?
Thank you

Select a block containing all the tracks.
Now, rightclick Select->filter selection and select only tracks (and maybe vias). OK and rightclick again, duplicate.
Now, move the selection the exact distance needed.

Tip1: hit spacebar to set the relative (0,0)
Tip 2: select a grid that allows you move the tracks the exact distance.

The duplicated tracks will capture the net of the new pads they are connected to.

I tried, but if I do so (itā€™s more or less like I did before, individually track to track though) the ratsnest keep me connected to the starting block ā€¦

Unfortunately this is as good as it gets at the moment.

If you copy blocks in PCBnew it copies all information, netlist/pin assignments inclusive. Thatā€™s why the rats nest is still connected.

EEschema has some start to this in the form of hierarchical sheets, where you reference a sheet more than once, so you get blocks of sorts, but this kind of information (the repetitiveness) is not being able to be communicated with PCBnew yet, so that you have to do the layout only once as well.
Maybe a dev sees this (I changed the title) or you have a stroll over to the mailing list/bugtracker and see if there is any info on things like that?

I have tested it with v5.0.1 (and done many times with version 4) with hierarchical sheets.

I must say I have tested it with each block belonging to a ā€œtwinā€ hierarchical sheet.
I asumed you had made the schematic with each block in a different hierarchical sheet, with hierarchical sheets sharing the same file.

Hm, so we can now create ā€˜block layoutsā€™ from one hierarchical sheet and copy that to the other components for the other hierarchical sheets?

Unfortunately, not. Footprints must be placed manually or with a script. Then, copy block of tracks works fine.
There is somewhere, I think a read it in this forum, a script that manages everything, not only footprints and tracks.

Yep, written by fellow forum member @MitjaN. See his github repository for the script called replicate layout:

I, personally, havenā€™t used it yet. But the demonstrations he has in the readme.md for his repository looks good.

2 Likes

I found that you can copy the ā€™ Tracks and Vias ā€™ footprint ,
place that on the new part numbers
and then re-import the netlist.

that resets the nets of all tracks to the pin it is connected to.

But for this you have to place all the other repetitive footprints manually in that same pattern, from where the tracks&vias came from, right?

Yes, painful
but for the last 3 hours, it is completed.
I have copied 7 units across a PCB , very painful
but all praise to the programmers, KC5 is an excellent set of programs.
maybe V6, guys ?

Not only that, but you must re-name them so they track the same re-name-on-duplicate rules that the SCH side uses.

A duplicate of selected group can clone placements ok, but that duplicate has no inbuilt rename (yet), so the user needs to rename manually, or use on of the scripts that handles this.

The program (also excellent) is called KI-CAD so some relevance with CAD software must have it, or not? But we are very far from Autocad, just to make a super-known name: making a copy of any group or object or block is very simple, in all versions! Could not you do something like that? It would be enough to have the COPY command improved instead of using the DUPLICATE, perhaps it would be a solution.
However, I did everything by hand, placing some reference lines with the various measures ā€¦ a few hours lost, moreover.:face_with_raised_eyebrow::face_with_raised_eyebrow::tired_face:

Yes, that would be nice.

Meanwhile, did you not try the nice Script that exists already here ? (mentioned above already)

That appears to use a fixed rule for the re-number, of the fairly common convention of R20xx R30xx, R40xx for the duplicates.
You need to have the SCH use the same increment rule as the script. to keep things in sync.

2 Likes

Depending on the situation one possible solution could be to create a user defined grid with as large x and y values as possible so that the footprints can snap to their relative places. If this is possible, each section may take tens of seconds instead of minutes.

EDIT: Then draw tracks for one section.

Copy the group of tracks and paste them into an empty space. When selecting, use RMB->Select->Filter if thereā€™s need. Duplicate that new track group and put it on top of the footprints, they get the correct nets. Copying and then pasting on top of footprints doesnā€™t seem to work, the tracks donā€™t get new nets.

Note: Iā€™m using the latest code when Iā€™m now trying this, but did this in this or very similar way with a pre-5 version for a real board.

Look, I already lost with the update to the latest version of KICAD, that I still find the bugs, if then I also start to insert scripts etc. (that I do not even know where and how to do it) I know that Iā€™m going to make things worse ā€¦

If you keep backups of your data (which you should in any case and not just for KiCAD) there is no real danger in loosing anything - except maybe time - by tinkering with stuff that doesnā€™t work.

1 Like

Of course, all new-tool learning is a trade of, between the known-but-longer path, and the learn something new, but take far less time path.

With any scripts, it only takes a few minutes to first run a test case, and see if you and the tools can co-operate. That has no risk of lost work.

In doing block duplicates, of course all designers will back up their work often, as those are significant changes that can be hard to partially undo :wink:

3 Likes

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.