I have a complex shaped board layout that requires precise placements of certain components. I created my board outline in a CAD program and used points to mark the locations of the critical components placement. I then imported to Kicad 4.0 as r2013 ASCII DXF but it appears as though the points are ignored or not imported. Can anyone verify this? I have tried other versions of DXF as well. Obviously I can draw X marks or some other indicator in place of points, but seems like that what points are for. Thanks in advance!
Hmm, interesting, KiCad PCB seems to ignore POINT entity, and if I create a zero length 2D line, that does import, but when I query it, it messages
"The start and end points cannot be the same"
Not sure why that would bother a CAD engine, unless it relates to selection etc, but it seems that is why they skip POINT. PcbNew has a 1um database and I can edit the Zero length to 1um, and the message goes away.
I’d suggest you make a polyline with a vertex at each critical components placement, as that is also easier to see.
X marks I would avoid, as PcbNew cannot snap to midpoint or intersection, but you can query for XY on any polyline vertex, and so copy/paste those into your part placement.
Yes, points are ignored - how would we interpret them? KiCad doesn’t even have a point entity.
The DXF support in kicad is rather basic. Part of the problem is that bits and pieces have been implemented to solve specific problems like “I want to import the board outline” and there has been no well-planned scheme for how DXF can be used. For example all Layers are treated the same and the names ignored. Some people want a Drill Layer, Cutout Layer, Outline Layer, etc. but such use of DXF simply isn’t coded at this point in time and no one has proposed a useful scheme.
That’s easy to answer - obvious action on a point entity, is convert them to zero length lines, as I did above.
Kicad does import that, but gives an unexpected warning about the length = 0, but seems happy with 1um line length.
In another post, I have expanded on some simple things that DXF Import can add, to be much more useful.
Another idea, perhaps points could be imported as alignment targets? Although from what I’ve read this may cause more problems. Just a thought.
As for a scheme going forward, perhaps the following: Read in the DXF layers and present them in a list, allow user to select which Kicad layer they want to import to. When Points are encountered, show a selection box to import as zero length (or 1um) or alignment targets.
Layer mapping has already been suggested/requested.
Certainly if a DXF name matches a valid KiCad_pcb layer name, that is a strong indication of what the designer intended. Very little software work would be needed for this.
Unrecognized layers can map to a safe layer
Currently, Targets do not query to give XY locations, so they are not much practical use inside KiCad_pcb
If PcbNew could support Zero Length without spurious messages, then
Dxf.POINT -> KiCad_Pcb.ZeroLengthLine
is the logical import entity. (Some default line width would be needed for DXF entities without width).
PcbNew already supports Pad of Zero length, as a Circle is L=W & the message seems to be edit-hint only, not Load/save critical.