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.

1 Like

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

1 Like

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.

4 Likes

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

2 Likes

Hi,
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)

5 Likes

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.

2 Likes

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

2 Likes

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.

Cheers,
Robert

1 Like

KiCad has ways of grouping things and keeping them separated.
First, it’s got a bunch of layers, and you could for example use one of the 4 “user” layers.

Another way of “grouping” custom graphics in KiCad is to simpy dump your graphichs into a footprint and use your footprint as the “grouping” mechanism.

You can simply drag a box around the objects you want to select, but I agree that the selectrion methods in KiCad are very limited.

You left the critical part out from the quote. You can’t select and do something to them all. Tracks and vias have had such a dedicated feature with group selection Properties dialog. Why not graphic items? Well, the upcoming property system should address that anyways.

@John_Pateman: I have recently used easyw’s neat little python script for moving graphic items from one layer to another: https://github.com/easyw/kicad-action-plugins/blob/master/README.md. It works very well.

1 Like

That’s one way. Too bad KiCad lets you select the footprint quite often by accident because it uses the empty space inside the outlines (the original post was about board edges) to select the footprint even when you don’t see it. I’ve filed a bug report about that, see https://bugs.launchpad.net/kicad/+bug/1832986.

2 Likes

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