When I open Gerber files in Kicad and after that when I choose option Export to PCB from file menu PCB file is generated. Now when I open that PCB generated from Gerber file at that time a via gets juxtaposed on each pad, even if it was made previously from PCB designed in Kicad.
In this 1st image is of actual PCB layout made in Kicad.
2nd Image is of PCB generated from gerber files
.kicad_pcb and gerbers are different file formats for different purposes. KiCad -> gerber is the normal workflow. Data is lost when the layout file is plotted to gerber and it’s can’t be recovered. On the other hand the backwards conversion could be better in some respects.
Why is this problem for you - what you want to achieve? Why do you need to convert the gerbers to .kicad_pcb? If you can tell what you actually need we may be able to help you with alternative workflows.
That’s how it is currently designed to work. ie It’s simple, and fairly low IQ, but quite OK for many uses.
There are other threads on this, and some suggestions to add a couple of options, but I’m not sure of the release status of improvements.
eg they could use the drill info, to decide SMD/Drilled and use the drill info to seed the padstack info.
We however have to admit that the current approach of KiCad is at best suboptimal. There has also not really been any improvement made since i follow KiCad so i guess it is very low on the dev teams priority list. Might need a dedicated person willing to take this on.
I could have used better gerber -> kicad conversion myself. Indeed the whole gerbview seems to be low on the list.
But the amount of work to get useful conversion would be large, I think. It would be relatively easy if it was for KiCad -> gerber -> KiCad conversion only, but I’m afraid most of the really useful use cases would be for other (maybe ancient) EDA packages -> gerber -> KiCad. And it would involve many different kinds of gerbers, non-optimal and possibly made against recommendations, if not even non-standard. It would involve much guesswork and would require the user choosing between many difficult to understand options.
It would already help if KiCad -> gerber -> KiCad would give reasonable results. Not to go that route but because if that route works than it is likely that also gerbers exported by other tools give you reasonable results (not perfect but better than now). The reason i would suggest to start with KiCad -> gerber -> KiCad is because that way one has a clearly specified path where all systems are under the devs control.
I found one related bug link I had commented in, and some comments suggest some improvement work was underway May 2019.
Maybe the OP can try a nightly, and report back ?
*Seth Hillbrand (sethh) wrote on 2019-05-05: * Didn’t notice this was already in the tracker. I have a few parts of this that are in progress and this is is generally a good baseline. Changed in kicad: assignee: nobody → Seth Hillbrand (sethh) status: New → In Progress
Many times during development & modification work when tiny PCBs or small number of PCB are made ordering them individually becomes impractical considering minimum panel size (A4 typically) of CNC PCB making machines.
Hence it becomes necessary to put together a couple of PCB in one gerber file since there PCBs are made by different engineers and different files, putting them together in gerber format is done. (we use gerber viewer to do this)
Now check whether resultant gerber file is OK, we import to kicad & check PCB when above problem of Vias on each pad occurs.
The current supported version is 5.1.5_3, so please consider updating to fix many bugs.
Bug reports from outdated versions are less useful top the developers as nobody runs outdated versions to confirm the error.
Gerber viewer in Kicad only enables preview for views only but doesn’t allow the final gerber file to be saved. Then how do you send the final gerber file to PCB maker?
Use the plot action. From the dropdown or from plotter icon. Then zip up the files and upload on the order form. Which is why it helps to output the Gerbers to their own directory. And consult your fab’s requirements for options they want. They often have a tute, with screenshots too.