Copy a old board layout into KiCAD

There are plenty of tools to convert dxf files to gerber:

And if you load a gerber file in KiCad’s gerbview, you can back-export it to a KiCad PCB.

Another possible path is to take your .pdf (which is probably close to postscript), open it with inkscape, then save it as .svg and import that in KiCad.

But still, as I said before, all sloppy work. I would just re-create the PCB itself in Kicad (start with schematic) so you get a complete PCB with a netlist, footprints, etc.

Great! So if I send you a PDF, you will create a KiCad project for me. Thanks!

In investigating the 3 remaining problems mentioned in my last post, I’ve come up with the following:

  1. It appears that the image becomes flipped when imported into KiCAD. The PDF appears correctly when opened in Inkscape, and I’m assuming that it is still correct when Inkscape saves it to DXF R12. Interestingly enough, Inkscape will save the image as a DXF R12, but will not successfully open or import that very same DXF R12! But yet it does import successfully into KiCAD, except for it being an upside down mirror image. Why I believe this is happening is that in KiCAD, an increasing Y coordinate means a lower position on the screen (a positive Y coordinate is below the X axis, a negative Y coordinate is above the X axis). So I think KiCAD is just (for lack of a better way to explain it) using the Y coordinates directly as-is, without translating them to their proper position with respect to the X axis. As far as I know, there isn’t a standard for this. Out of several pieces of graphic design software that I have (not even counting the new addition of Inkscape), all of them except one have the positive Y coordinates above the X axis, and the one exception to this behaves like KiCAD does (positive Y coordinates are below the X axis).
  2. The unwanted rectangles can be removed by clicking the arrow in the area to the left of the layer list. This then allows each side of the rectangles to be selected, and then hit the delete key.
  3. The unwanted rectangle with labeling in the corner is turned off by clicking the Items tab in the layer manager on the right of the screen, and unchecking the box for worksheet.

Hopefully these observations help anyone else that comes along who is trying to learn this stuff. In getting rid of the rectangles around the imported image, it appears that KiCAD defines the origin placement by the upper edge of the leftmost object in the image. Therefore, to ensure proper registration between layers upon importing, the correct offset from the origin (as KiCAD defines it) must be determined and entered upon importing the different layers. Luckily, the software that I did the board layouts in makes determining the offset very easy! So my next steps are going to be mirroring the image Y axis, figuring out the correct offsets for proper registration between the traces and board edges layers, and get the board edge layer properly imported, aligned, and placed in the correct layer. After that, it will be time to figure out the best way to do the plated through holes (import them as originally drawn, or note the coordinates in the original software and redo them by using KiCAD - I suspect the latter will be easier and quicker in giving the correct result for generating the drill file or drill layer that the board houses demand).

Why, yes! Yes it would be! For such an advanced piece of software, it’s extremely surprising that this functionality is not already built in. It will import a drawing of a schematic and generate a board layout and bill off materials, but yet won’t import an existing board layout in standard vector file types? Vectors are vectors, and this is a program that already works in vector graphics, so one would think it would not be difficult at all to make it accept pretty much any type of vector file format. To me at least, this would seem to be an essential function. And if this topic does come up quite often, that would seem to validate my opinion. But I am certainly not complaining, I’m not a programmer and didn’t write the software, I’m just trying to learn how to use it. :slight_smile: If you can write some sort of plug in or modification that expands KiCAD’s usefulness and functionality, then that is most excellent. I’ll see if I can successfully attach the DXF R12 file to this post. If I am able to offer anything else that may help you in your effort, please let me know. Nope, I tried to upload the file, but I get an error saying that new users cannot upload attachments. I will either have to wait out a time limit or reach a post count, or get the file to you some other way.

You see a sculptor take a chisel to a block of stone and knock off the first few chips, then declare his work as sloppy. It is much better to judge a piece of work when it is finished, not when the work has only just begun. I don’t intend for anything to be sloppy. I want all my layers in the correct places, all the holes where they should be, all the files configured exactly as per spec. Why would I want a result that could possibly screw up my order and have my boards come back being incorrect? I’m only just starting to learn how to do this gerber file stuff, rest assured that I’m going to make sure that I learn how to do it correctly. Many times there is more than one way to arrive at the correct result to a problem. One step at a time. I am obviously not the only person in this thread who is attempting to learn something. You might be an expert guru in gerber files and use of this software, I will very readily admit that I am not. Please have some patience with a noob who is trying to learn. :slight_smile: I would much appreciate having your advice and judgement later in the process, since you would seem to know what would bring everything perfectly into spec for the desired end result.


To me it looks like you’re attacking a piece of stone with a chainsaw, instead of with a mallet and chisel. You will probably get some chips of, but it will be a tedious effort to get to an “acceptable” result.

KiCad has aspirations of becoming a truly professional PCB design program, and it’s getting close, but there are still some “holes” in it. Some (possible) workflows are just not well supported yet. There is rudimentary import of some vector graphics formats, but those are not well suited to be used for the layout of tracks.

The “normal” way of using KiCad, (and therefore the best supported path) is to first make a schematic, and assign footprints in Eeschema, then put the netlist and meta information into Pcbnew, and then place the footprints and lay out the tracks.

One of the strong points of KiCad (euhm any PCB program) is that it is designed around helping with laying tracks on the PCB that need to be made, and prevent tracks from being laid that result in faulty connections, and it has a lot of built-in tools to do that, and more. For example you normally set one (or more) distances in the configuration, and KiCad then automatically ensure that that distance is used as a clearance between tracks from different nets. KiCad also had built in checks to verify that all connections on the PCB match with the schematic.

But to be able to do such things it needs to know some things about your designs. It needs to know what pads are, where your footprints are, and a list of connections of which pads need to be connected to which other pads. And this is information you create when you draw the schematic.

If all you wanted to do is tho create gerber files from a .dxf file, then you could try some of the many programs that pop up with:
… but in your first post you already wrote you want to make plated through holes, and this already implies you want more.

KiCad is so much build around working with a schematic (and netlist) that even for PCB’s as simple as an adapter board between two connectors it is useful to first make a schematic, and then port the netlist to Pcbnew before making the PCB itself.

There will be some learning curve for you to get used to KiCad, especially because the workflow is very different from drawing some tracks that resemble a PCB in a mechanical CAD program. If you try to use KiCad in the same way as you did your mechanical CAD program, then KiCad will actively fight you and it will be an unpleasant experience. If, however, you decide to first invest some time to learn what KiCad is, and how it works, and then use KiCad as it is intended to be used, then the many build int tools in KiCad will help to to design better PCB’s faster.

It is up to you whether you want to work with KiCad or against it.

All the above advice is pretty generic. If you post a schematic and your .DXF then we have a much better idea of the sort of complexity of the PCB you want to make. For now I’m guessing it’s a pretty simple PCB with maybe up to 20 parts.

I don’t know how complex your projects are or how many you need to convert but I suspect that you have invested heavily in your time to generate the DXF layouts. Keeping track of connections would have required a great deal of work and concentration and I can understand why you are keen to keep the layouts that you have made. The thing is that EDA software makes the bookkeeping of connections very easy and very flexible. Most people here would agree that most of the time designing a layout is spent optimising the footprint placement and the routing is generally less of an issue. This will probably not have been your experience doing it the ‘hard way’. I think @paulvdh is right - you really should work through a tutorial on how to go from a very simple schematic to layout using the ‘normal’ workflow. This needn’t be complicated - an LED and a resistor would be adequate.You will then have a feel for how the software is used conventionally and be more familiar with the program. Plenty of people do use KiCad to reverse engineer old boards but this is usually to faithfully replicate a design and it is never an easy workflow in any EDA software; you may well find that starting from scratch but using your layouts to guide component placement results in a more satisfactory result.

I didn’t used ballpoint ink. I only used ballpaint refill with the ball removed and paint pulled up with a syringe. I read somewhere what kind of paint is good for it. It was paint used to paint shoes - I didn’t know previously that such kind of paint exists.

When I was a child, here in Poland, you were not only not able to get a permanent marker but even standard (not permanent) marker. I also don’t remember any kind of adhesive tape other than paper one.

I am using KiCad since 3 years and I’m sure I didn’t learn yet how to fully use its (V5.1.x) capabilities and soon V6 will be available. I suppose until I will learn how to fully use it the V7 will be :slight_smile:
To make a simple board you need only to read:

I think.

Well, it seems I already did some work with a dxf import script

1 Like

Ok, so I seem to have gotten the traces imported, and gotten them moved into the correct position (one corner with the correct offset from the origin, so that the corner of the board outline can be placed at the origin and registration between layers will be correct). Figured out how to draw a rectangle on the Edge.Cuts layer. But have now discovered two problems, before being able to proceed further:

  1. The resolution of mouse movement or positioning on the screen is a very coarse .050". Is there a way to change it to .001"? Or am I stuck with only being able to move and position things in increments that are 50 times less resolution then the standards of the original design?
  2. The size of my traces layer has been altered upon importing from DXF R12. I have not been able to find a way to resize anything. In any other software, objects can be selected and resized according to either dimensions or a percentage. How is this done in KiCAD?

The documentation / help / tutorial pages make no mention of either of these things, that I could find. If I can do these two things, then I will be able to move onward to the holes layer.

  1. Grid size is easily adjusted with Pcbnew / View / Grid Settings or with the toolbar at the top of Pcbnew.

  2. Scaling does not make much sense in a program like KiCad. No matter how many times you solder a TO220 or how hard you hit it with a hammer, it may break, but it won’t stretch nor shrink.

At the moment you’re still struggling against the flow of KiCad. The best thing you can do at this moment is probably to set this project aside, and then draw a few simple schematics (on the level of a NE555 oscillator) and make some simple PCB’s, and do it in the way that KiCad is intended to be used.

1 Like

Resizing of the graphic can be done only at import time:


That’s what I was afraid of! I did see that option before you made your post, and wasn’t able to find a better one. Unfortunately, the scaling was off by different amounts for the X and Y axis, X and Y required a different scaling factor! So I had to go back into the original files where I could easily resize X and Y by separate factors, then go through all the exporting and importing again. After that, the scaling was still off by a wee little bit, but was much closer. So I readjusted the scaling factors accordingly, and went through it all again. This time, it was right on. The scaling factors have been noted, and I’ll see if they hold up with equal accuracy when I do the next board (this is the first of 3).

So now I was able to move the traces to the desired offset from the origin, so that the corner of the board outline would lie at the origin. Then it was a simple matter to draw in the correctly sized rectangle for the board outline on the Edge.Cuts layer, because I could directly transfer the coordinates from the original design software.

Excellent, thanks! This is actually a very useful feature of the software, which doesn’t exist in any other piece of software that I have. I was able to then change the setting from .001" to .01", which made it much easier to get the positioning correct for the corners of the board outline. And then change it back again afterwards. I don’t know how easy it would be to adjust the position of a point (or corner, or any other given point on any given shape) after the fact, and given my experience so far, I didn’t want to have to find out! :slight_smile:

So, I’ve got the traces correctly on the F.Cu layer. I’ve got the board outline correctly on the Edge.Cuts layer. Next is going to be dropping the plated through holes onto the right positions. Position-wise, this will be easy because I can just use the coordinates for the hole centers as they are in the original software. Figuring out how to drop the holes into the correct positions with the correct size shouldn’t be difficult, since this is part of KiCAD’s originally intended workflow. Should just be a matter of figuring out how the holes are positioned and sized with the “place via” tool. But before I start that process, which layer is the correct one to put the plated through holes onto? I don’t see a “drill” or “holes” layer, or anything else that looks like a logical place.

Via can connect for example top layer with first internal layer, or can connect all layers so if conception of “holes” layers will be used in KiCad then all possible combinations of connected by via layers should have their own “holes” layer. In KiCad you can have up to 32 copper layers so imagine how many “holes” layers you would need (internal layers also can be connected without holes seen at top or bottom of PCB).
And - do you want vias or pads?
Via is normally placed during routing with having 2 layers selected for current work. When you place via the via connecting these layers is placed. Standard via is covered by solder mask so you can’t solder to it. Probably it is possible to not cover them but I never used it.
Pads are normally part of footprint. You can have a footprint containing only one pad and there have to be such footprints in KiCad library (I don’t use KiCad libraries so don’t know the names used).

I searched a photo to show what ‘precision’ I could reach that way:

1 Like

It’s not the normal workflow to drop individual holes in place. You would probably do better by dropping the footprints that you need and try to line them up with the tracks you have laid down. At least the footprints would be internally consistent. This is all completely orthogonal to the normal workflow and you lose virtually all of the advantages of using KiCad.


I agree with John_Pateman and some others. It’s fascinating to try to find new use cases for KiCad and broaden its scope and I’m not against any of this, but it’s not very useful to try to use an EDA package as a simple converter between graphics formats (image or vector graphics to gerber). I would do that only if I already knew how to do it with KiCad and wouldn’t want to learn new programs or if nothing better existed (but paulvdh linked to dxf to gerber converters). And even then I would probably use the old design only as a guideline, except if speed would be important.

Notice the “would”. It may imply “I would if you would pay me”… :smirk:

Trying to figure out what layer to put the plated through holes on has prompted more questions, that don’t appear to have any clear answers:

  1. The documentation says that a pair of layers needs to be selected for placement of vias. Since the first layer is obviously going to be F.Cu, that strongly implies that the other layer should be B.Cu. A later question would have been if the B.Cu layer is necessary for proper gerber file formatting, or if it can safely be assumed. Again, the implication here is that the B.Cu layer is necessary. Is this correct?

  2. If the B.Cu layer is necessary, does that mean it is also necessary to draw the board outline to represent the copper surface on the rear of the board? Or is this information already defined by the Edge.Cuts layer, unless the rear of the board contains traces rather than just a groundplane of the board’s dimensions?

  3. If it is necessary to duplicate the board outline again on the B.Cu layer, what is the best way to do this? Obviously it can be drawn in as another rectangle, the same way that was done on the Edge.Cuts layer. But can it also be done by the “duplicate” function? Will the “duplicate” function allow something to be duplicated on a different layer? Or do I have to copy, switch layers, and then paste? Is there a way to move something from one layer to another? Again, none of this is intuitive in the software, and the documentation provides no answers.

  4. Obviously the place via tool is going to be how to drop in the plated through holes. But what about holes that are not plated through? How is a regular non plated through hole sized and placed? There isn’t a “hole” or “drill here” tool, and again, this doesn’t seem to be mentioned in the documentation at all.

So while I wait for any responses to these questions, I’ll start with the other two boards, and bring them to this same stage of having the F.Cu and Edge.Cuts layers done and ready for holes. But that then prompts another question:
5. One board has a rectangular cutout area in the middle. Do I simply draw the cutout as a second rectangle on the Edge.Cuts layer? Or is there more to it than that?

I won’t be using a solder mask or markings on my boards. Some of the plated through holes actually are intended to be soldered to, since they are placed underneath of a surface mount component or it’s ground tab, and are used to provide a small amount of heat sinking capability in addition to a ground connection.

From what the documentation says on using the “place vias” tool, it appears to be very much so part of the normally intended workflow. “Footprints” are already laid down as part of the traces. Everything is already perfectly consistent. A lot of this is completely orthogonal to my normal workflow and I lose the advantage of physically making the boards myself because of those plated through holes.

It’s a fascinating program. The scope of this use case is definately worth broadening (see below).

From my understanding, given the nature of the gerber files formatting, a “simple converter” isn’t possible because there is additional information not contained in a graphics file (even in vector file types). Given that vectors are vectors, there really shouldn’t be too much more to it than “load layer > load layer > load layer > export gerber file” in the ideal world. The reality is that a hybrid approach is necessary, using the “old design” as a guide to add the “new” information, as you said. So learning a new program becomes necessary, and here I am, doing just that. Before landing here, I had already performed those same searches for a “simple converter”. It doesn’t seem to exist. Anything out there is either command line stuff (which I really don’t want to mess with, I’m not a programmer, might as well just learn another piece of software), is questionable as to if it produces “correct” gerber files (isn’t “sloppy”), costs an arm and a leg, or is some combination of these things. In performing those searches, I did discover that I’m not the only one out there who prefers this particular workflow, that there is very much so a need for a practical way to go from a manually created board layout to properly formatted gerber files. Some people can’t drive a manual transmission, or refuse to learn because the automatic transmission is easier. Others prefer a manual transmission. No matter how you prefer to get there, being able to do so is the important thing. So yes, broadening that scope of use cases can only make KiCAD more useful to more people.

Reminds me of some of my own construction projects from that same era! :slight_smile:

It makes all the sense in the world to have an absolutely necessary feature like scaling. Sure, a TO220 is a TO220, but not every component is like that. For instance, my parts stash contains perhaps half a dozen .47uh RF chokes. Some of them are the size and form factor of a 1/16w resistor. Some of them are the size and form factor of a 1/2w resistor. Others have the form factor of various sizes of electrolytic capacitors. Sometimes you substitute an EBC lead configuration for an ECB, depending on what you happen to have on hand. Sometimes a one size fits all approach doesn’t work, and it is necessary to adjust things in various ways, especially if you use surplus or salvaged components in your construction. Doing the board layout manually can have quite a few advantages if you are doing it to fit the parts that you happen to have on hand, or are deviating from a published schematic.

Yes, you place vias using this tool, in order to stitch planes together or to swap a track from one layer to another. If you place a component, for instance a DIL8 package you place a footprint of 8 holes and pads. You don’t need to futz with placing 8 individual vias to do this. Try adding a footprint to your layout and then move it around to line up with the tracks.

In other questions, you only need the edge on the edge cuts layer.
The other questions are again because you are insisting on working against the tool rather than with it. I reckon you could have learned how to place and route a proper KiCad version of your board by now and then the subsequent ones will be progressively easier.

[EDIT] Trimmed quote down. We still know nothing about your boards or your manufaturing process but if you are using all through hole components, you can use the component lead itself as a ‘via’ - you just have to solder it on both sides of the board to be sure that it connects to both front and back copper.

In KiCAD, the Edge.Cuts define the outline of the board, the boards have always at minimum one Front Copper layer and a Back Copper layer. (F.Cu and B.Cu), if you don’t need one of them (because maybe your are planing to make a single sided board) you should just leave it empty.

Here is a link to the PCBNew documentation, maybe it will clarify some stuff, but at minimum it will help with the general idea.

You can define PADS as plated (Through-hole) or not plated (NPTH) but I do not believe that you can define vias like that, after all the purpose is to connect the front and back of the board, through their body, the plated part.

You can insert a pad footprint (Add footprints->SolderWirePad and double click on it), once it is inserted, you can modify it as you see fit (diameter, plated, non plated, drill size, etc.)


You can place some of them in your board, change the properties to your liking and then copy and paste them wherever you need them.

If the CAD tool can convert your design into an eagle file, that can be imported into KiCAD. If you have the PDF, you can re-enter the schematic onto the tool.

Gerber is a file describing only one layer - don’t cares of other layers.

Via’s task is to connect some layers. You can’t connect layers if you have only one.

Board outline is the board outline (how the board is cut out). It has close to nothing to represent copper.

Edge cuts only defines the edge cuts. You will not have a copper if you not add it yourself.
You really should do the simple example - the PCB with two resistors on it connected paralel, but KiCad way and not your way. Then you can check your results by View - 3D Viewer.
And then come back here.

In footprint definition you can specify for each hole you have there if it is plated or not.
Not plated via simply doesn’t exist as via is to connect layers and not let air flow through PCB.

In PCBs there are planty holes being a part of footprint or via and typically only few used for mechanical purposes. There is no special tool for that purpose - you can do special footprint having one pad with hole and that way you add holes the same way as other elements.
I always place holes also in the corner of my schematic to avoid them being deleted when synchronizing PCB with schematic after doing some changes in schematic.

Yes and not.
Rectangle at edge cut inside main pcb rectangle means it is cutout. But you probably don’t wont manufacturer to prepare a special tool for your PCB to cut it using press. You should specify it to be doable (rounded corners according to used cutter - I typically assume 2mm diameter cutter).