Line to shape convert

I am using kicad 6.0.4. I have imported a DXF file to my PCB editor. I am working on the edge cut ( outline of the PCB) layer. It is giving me the outline in the form of individual lines and not in the form of shape. How can i convert the line to shape or polygon?

select all elements you want to combine. RMB-click → contect-menu → Create from selection → Create polygon from selection.


  • The newly created polygone gets the layer from the currently active layer at the layer-panel.
  • the original elements must form a closed polygon without gaps

Thank you for the reply…we tried this but it is not working…The shape is also closed without gaps.

Is there any other method to do this?

Is there any other method to do this?


we tried this but it is not working…The shape is also closed without gaps.

Try to first play with these feature to get a feeling how it works and only in a second step try the advanced option tasks (this should be always the order: learn to use a feature with easy tasks, than improve, than 10 minutes later you are the master of that feature…).
Try to play with lines and create-tool:

  • change active layer to f.silkscreen
  • draw 4 single but concatenated lines on f.silkscreen
  • select these 4 lines
  • change active layer to edge cuts
  • RMB-click → context-menu–>Create from selection → Create polygon from selection.
  • observe the result: the original 4 lines on f.silkscreen are still there (the conversion doesn’t deletes the original), a new polygon on F.edgecuts should be created
  • try to move two of the lines-endpoints so that you get two gaps (or more) between the lines
  • retry the “create polygon from selection” with these gapped lines → should create unreliable polygones
  • so this shows that for the “create polygon”-tool all elements should really exactly placed on top of each other (each endpoint == startpoint of next element)

To get help with your actual case you could try to upload the dxf.

It works for me, just as @mf_ibfeew describes.

Did you select all the individual lines??
Are you sure your lines form a completely enclosed shape??

it is working properly for square or rectangle shape but not for the curved shapes.

there are 2 possibilities:

  • bug in the conversion routine (I found multiple issues during the early v5.99-development-stages, but the last 3 month every conversion went well)
  • bad dxf data

Currently I assume the latter so again if you want help please show the dxf-file. (as attachement, not as *.png).
And if you are already uploading something you could upload the current project-archive as well. This would show if your dxf-import was succesful or if the error was already at the import-stage.

Works with curves also.

You seem to be using a very fine grid. Are you absolutely certain your shape is fully enclosed?
There are no little squares or circles to show you have unconnected lines when using graphics.

Thank you so much for the reply…but i don’t know where i am doing wrong because it is not working for curved shapes. I am attaching my dxf file. Please correct me if i am wrong.
test.dxf (46.6 KB)

The dxf is not very good for use with Kicad:

  1. The dxf consists of two shapes directly side by side (see zoomed picture from cad-program).
  2. Kicad can import these double lines. But you can’t select all shapes and convert the whole chunk into two polygons - the conversion-algorithm can’t tell which element belongs to which polygon. So as a rule: draw only a single shape as outline-contour
  3. the dxf seems to be saved in inch-units. This is a bad idea as this can lead to scaling/rounding issues (not always, but sometimes).
  4. even with one of the outlines removed (see point 1) the dxf contains far too many short lines. These are maybe a cause for bad/buggy polygon-conversion. But a engineer should not use the highest possible resolution for a drawing, but a useful resultion. Finally the pcb-production is also not able to produce a pcb with 0.0001mm outline-resolution.

So you should go back to the CAD-program and create a good outline shape. Look at my advice above - start with an simple CAD-drawing (rounded rectangle for instance).

1 Like

thank you so much…I will try this.

Now it is working properly…thank you so much.

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