Hi,
my Kicad learnings continue! I would like to know how you go about establishing the origin for your cut or copy command? It seems to me that whenever I do a cut or copy and then try to paste, a start point that happened to be closest to the mouse when I opted to cut or copy becomes the origin. I appear to have no control over this. When I have used other CAD packages in the past, I am able to first select what I want to cut/copy, and then I select an origin. That way, when I paste, my mouse is anchored to the origin (or reference point) and I can place with precision, the selected objects exactly where I want them to be (or even rotate, flip or mirror the objects about the origin).
Perhaps there is a different workflow in Kicad, but I have not found it. So how am I supposed to do this?
Which program?
KiCad is a collection of some 5+ programs, and they work similar but not the same.
In the PCB Editor, you can select some stuff, and then right click and use Special Tools / Move with Reference. If you want to combine it with Copy & Paste, then first paste it into some empty area, and then do the “Move with Reference” shuffle.
If I first do a cut/copy/move into an empty space, then by definition I have lost my reference! I need to be able to select a reference that may or may not be part of the objects currently being cut/copy/moved. For example, let’s say I have a PCB with 4 mounting holes, and I have placed some tracks and/or components with precision around a given mounting hole. Something changes in our design, and I have to move all of those parts, and relocate them around another mounting hole. The easiest method would be to first select all the parts, then select my mounting hole center as my origin, cut, then paste (with all my parts moving relative to the origin I have selected) the parts located at the alternative mounting hole by selecting it’s dead center. Job done. I can’t seem to do that in Kicad, but this is the way of Altium
OK, thanks, Move with Reference (found under the “Special Tools” menu options) provides 95% of what I need, thanks!
The remaining 5% of the problem is how to flip or mirror. Two problems if I use the “F” (flip) shortcut is that it also changes layers for the objects selected. Maybe there’s a mirror command. Also, Kicad doesn’t appear to flip around the reference point I have selected, as all my parts end up “off in the weeds” if I try to flip them.
I’ll explain my dilemma by way of example:
See the attached image. I have highlighted some lines and a circle that I wish to mirror inside the rest of the footprint. Their locations should be mirrored such that their locations are exactly the same, but referenced from lets say the top left hand mounting pad/hole versus the right hand mounting hole. In this instance I have screwed up and been laying out the internals of my component from a bottom up view of the CAD drawing, instead of the top down (plan view) I should have followed. It should however be easy enough to flip/mirror the selected items accordingly.
This approaches what I am trying to achieve, however note the line layers have been flipped (I want the mirrored items to stay on the same layer) and also I have no proper reference (I would like to use the respective mounting hole in this case, as my origin). Using the “Move with Reference” and a flip is the closest I get, which is what you see below.
In summary, the move and flip has resulted in purple lines (moved to a different layer, which is not what I want) and not properly aligned (no reference!)
I have also tried the X and Y mirror (alleged hotkeys or shortcuts as per kicad help) however the move immediately exits and does not mirror anything using these shortcut keys.
I did consider that, but that is a bit of a ridiculous workaround for what should otherwise be a straightforward mirror operation. Is that what you are expected to do in Kicad? What if I had many objects to mirror? That wold cost a lot of time and would be prone to errors!
KiCad is a PCB design suite and not a mechanical CAD program.
Real physical parts can not be mirrored, so mirroring is not a high priority for KiCad.
Now go try design a PCB and do both ERC and DRC checks in a mechanical CAD program, or Gerber file creation or one of the gazillion other things KiCad does well.
This is not a complex mechanical design tool requirement. It’s fundamental and found in various other ECAD packages, including Protel99 and Altium which I used for many years. (If I remember even Tango back in the 90’s had some facility for this too, but now I am really stretching my memory banks…)
These are just fundamental tools needed in a PCB layout program, and I consider them a lot simpler than the more complex programming tasks such as handling netlist classes or DRC.
Oh dear Lord! I see that after all this, there IS A FEATURE TO MIRROR IN KICAD. Shouting at myself here! At least in Kicad 6 (I’m not sure if this is a new feature). It’s still not the most convenient process, as for whatever reason I can’t find the mirror option anywhere in the menu or hotkey options, but the critical tool here is the mirror icon found in the top toolbar:
So basically, my procedure for moving (by fixed reference) and mirroring the selected objects properly is as follows:
Select objects to mirror
Right click → Special Tools → Move with Reference
Select reference or “origin” as I have been calling it (In my case this was the top right hand mounting hole center)
Move mouse up to the “Mirror” icon as seen above. Ignore the fact that the pcb/footprint view is scrolling off into the weeds.
with the parts appropriately mirrored, go back to the desired new origin (for me this was the top left-hand mounting hole) and click.
Voila, all objects are both mirrored and correctly moved! Note the temporary horizontal line I had to draw between centers for my mounting holes. I had to do this, as when I was attempting to click on the center of the left-hand mounting hole, Kicad refused to snap to it for some reason (even though it was snap happy when selecting the original reference point which was the top right-hand mounting hole). Not to worry, this line can be deleted afterwards.
A very handy fix wold be if the X and Y hotkeys worked as expected (IE do the job of the mirror icon already mentioned) while in a cut/copy/move operation. This would not require any new code at all, as it’s all already there. Also, please fix the minor irritation of having to draw the line to ensure I have a suitable snap point for the parts while being moved. It snapped the reference selection just fine, but not the final “snap and move with reference to the mounting hole” operation. I trust that makes sense.
Sounds worse than in V5. In V5 I have copied some track sets few times (row of relays connected to terminal blocks exactly the same way). After celecting all tracks and calling copy I was asked to set the reference and when pasted the mouse was at that reference so I had no problem to paste exactly as I wanted. What was better in KiCad V5 relative to my old Protel 3 was that tracks during paste got the right new nets (In Protel the were no-net and I had to deal with it later).
It does work, but you have to un-assign [Ctrl + c] for the normal copy.
I assume that when a key combination is assigned to multiple functions, then either the function in Hotkeys / Common takes precedence, or it is based on the moon phase and planet alignment.
The Schematic editor does not have a Copy with Reference (yet), so if you un-assign [Ctrl + C] from the normal copy, to assign it to Copy with Reference, then you have no copy to clipboard function in the Schematic Editor (and probably footprint editor, schematic symbol ediotr, page layout editor. It still works in Schematic Editor / Tools / Edit Symbol Fields though. I’m guessing that text copy & paste works separately from graphics copy & paste.
But I don’t share your opinion about its uselessness in PCB Editor. Why do you think other EDA tools implement it ? As others have mentioned there is a usecase for mirroring track layouts for example.
These tools either just move footprints to their mirrored positions without mirroring the footprints themselves or just omit footprints.
Personally, I can’t see much point in mirroring tracks. They will no longer match footprints so will have to be moved all the way over to the other side of the footprints or deleted or whatever else… just a big mess.
I can see the point in the FP Editor. That function will be used before the footprint is finalized.
Also a bit weird that the Footprint Editor can only mirror in the Y-axis.
I can see some benefit of having a mirroring function in the PCB Editor for graphics.
Sometimes the parts of stereo audio amplifiers are also sort of mirrored.
Mirroring footprints themselves is useless of course because they are representations of physical parts that can’t be mirrored, but starting with mirroring tracks and then “solve” the issues to make the footprints fit again has some merit.