DXF Outlines - grouped line segments


I am working on a complex board outline (and some complex pad shapes) and am importing them as DXF files in pcbnew. I am currently using ViaCad Pro as my drawing program. Files are being exported as DXF, R12 format.

I can import the files with no problem, however despite grouping them in ViaCad before export, they do not remain grouped - i.e. grabbing the outline to (M)ove it only grabs the immediate underlying line segment. Similarly, when I am trying to modify a composite line and, for instance move it to another layer, I have to move each individual line segment one at a time.

Is this expected behaviour or is this a defect in my export format?

I have attached an example outline. Is it possible to group the whole DXF? Happy to try and use FreeCad but would need a few pointers!

EMI_mini.dxf (9.9 KB)


FreeCAD? Or KiCad?–


I was kinda assuming my DXF format was at fault. If there is something I can do in KiCad rather than an external application to tweak the DXF appropriately, that would be preferable. :slight_smile:


When I did that I first worked out where my DXF import would land directly out of the CAD program in KiCAD.
And then move the KiCAD stuff into that area, so that if I needed to change anything on the CAD derived outline, I’d just delete the outline layer and re-import an adjusted version from CAD again.
No need to tweak the outline in KiCAD.


KiCad has no support for groupings of any kind. So no wonder this dxf feature is ignored.


Thanks @Rene_Poschl that makes it clear. I don’t know much about the DXF format so thought this might have been supported .


KiCad just converts as much as it can to its own graphics. At the moment straight lines, circles and arcs (part of circle) are supported IIRC. In the future bezier curves, too. At the moment KiCad converts curves to bunch of straight lines. Each line is separate. You can’t even select lines and change their properties together in KiCad. We are waiting for the property system and better graphics tools for 6.0.


Thanks @eelik - I had noticed that I couldn’t select more than one segment at a time and move them together onto another layer. Addressing that would be a significant bonus.


You can see the preview of the property system and graphics tools in action here: https://www.youtube.com/watch?v=uhcMGQ32Xw0


ATM you can convert your antenna into a closed polyline, discretizing it.
This can automatically done by StepUp footprint exporter:

and the files:
RF-antenna-v5.FCStd (7.0 KB)
RF-antenna-v5.kicad_mod (12.0 KB)


Ha! I thought that if there was a way to do it, @maui would be the one to know! Many thanks both for the guide and for converting my outline too. I will try that out.


Yes, as mention, KiCad explodes DXF’s.

There is a existing ‘U’ command in KiCad that could be useful, if only they had allowed it to work on a line-segment.

eg if you import your lines onto a copper layer as segments, you can select one segment, and then U selects all, allowing all to be moved as a group.
‘D’ even allows connected stretch (but does seem to insist on adding 45’ to one end ?)
Seems it would not be complex to allow existing ‘U’ and ‘D’ code to be applicable to line items ?

ie code now take selected item, and searches for other selected items that touch, continuing until a sweep finds no new items.
It is likely removing some code that prevents layers other than F.Cu, B.Cu and greys out the menus


A bit late for this post but complex edge cuts I need more than once, I usually put into a footprint. Together with all mounting holes, connector pins, transparent 3d-models etc.
So the complete case is only one footprint. This also has the advantage that the connector pin numbering corresponds to the final numbering in the device handbook.