Import DXF to footprint does not save, KiCAD 4.0.5, bug?

Howdy. Creating a new footprint. I import the DXF component outline, reposition and add drills etc. All looks good. Save to active library. However, when I reload the footprint from the library the silk imported from DXF is no longer there! (The drills I added are there.)

Ideas? Thanks in advance.


OS-X 10.10.5
KiCad ver 4.0.5

No takers on this?

I have managed a workaround. I did the DXF importation in Eagle, loaded the new Eagle library and then made changes in KiCad and saved in KiCad format. The footprints are Fischer SK75 and SK76 heat sinks. Perhaps they are useful to others or even be added to the KiCad heat sink footprint library. (It would be great if someone can take a quick look and tell me if I have the outline in the right layer for KiCad and ref/values done sensibly.)

FISCHER-SK76.kicad_mod (24.2 KB)
FISCHER-SK75.kicad_mod (23.3 KB)

Did you see this?

Maybe we got a bug here…
I edited the title, maybe someone with a 4.0.5 stable install on either MacOSX or Win10 can confirm this?

As per the other thread I tested in one of the more recent nightlies and couldn’t confirm (Win7 64bit though).

I did not. I am using 4.0.5 which is meant to be stable. EDIT: sorry, I now understand your comment (I was mislead by your change to the title i.e. 4.5)

(I’m experiencing all sorts of weird behaviour. Pcbnew duplicated all of my connectors even though the schematic only lists one instance of each. I added 4 heat sink footprints, had them on my board for awhile and then two disappeared… Bermuda triangle-esk spooky.)

stable doesn’t mean bugfree :wink:

Don’t know if there is a unit test for importing dxf data into footprints… I’m no dev :stuck_out_tongue_winking_eye:

Did you select to remove ‘Extra Footprints’ when re-loading the netlist?
Standard it’s deselected.
If I have stuff populated and some layout done I usually do a dry run and see what it wants to change before I commit real sweat and blood :wink:

Hi. See edit above. “someone else with…”

Are you able to take a quick look at one of the mod files above? Do I have stuff on the right layers for use in KiCad, correct designators? If not, I’d rather fix them now than find it causes problems later.

Yep. They still stay there. Each pair has the same ref, value and “sheet path”.

Re the HS footprints…
(please take with bag of salt as I’m not a KiCAD librarian nor do I have read their current state-of-the-art-of-KiCAD-footprints-bible)

  • the dxf silkscreen goes over the copper pads
  • the pads should just use plain numbers, no special symbols like $ in them, exception afaik are BGA footprints for their matrix relation
  • I didn’t check, but make sure the footprint center and orientation is the same as the manufacturer uses in his datasheet (for automated placement)
  • courtyard?
  • if the pads are connected to the same potential you can probably use the same number for them, so they will be automatically on the same net (no dis-ambiguity)
  • I don’t know about the KLC, but personally I’d put the detailed outline on F.Fab and a very simple placement help/outline onto F.Silk
  • the dxf outline is not perfectly symetrical to the center of the footprint (0.03 mm to far left)

The KiCAD Library Convention (the bible for this) can be found on this website (above link):

That’s what one of those would look like for my personal libraries (I define symbols with footprints, i.e. atomic parts, thus the VAL** field is being filled by the symbols VAL field and not populated in the footprint) and I also put the VAL/REF fields onto other layers…

FISCHER-SK75_ver-Joan.kicad_mod (20.7 KB)

Thanks a lot. I’m still very unsure about layer designations e.g. F.Fab versus F.Silk. (I’m used to running a script at the very end of board design to generate the silk from footprint outline’s, names etc.)

Silk over pads: does it matter? Obviously it is ignored at production.
Pads: ok will change name and change to same net (solder pads obviously just their for securing to board)
Center and orientation: not sure I follow this. The centre and orientation is not defined by the manufacturer, but place this heat sink into those two holes, right way around and it will match (close enough) the silk pattern
Courtyard: another name for “keep out” or “restrict”? Could be added but not absolutely necessary. (Up to user to restrict or plastic washer sink off board.) Is courtyard an absolute “no-go” area? (I’m slowly working through the manual)
KLC: will look it up -thanks. Idea is to have realistic looking silk - looks pretty. :wink:
Symmetry: yes, I was unable to select and move with sub 0.1mm accuracy. In KiCad I could not figure out how to select just the silk components (not the holes) and nudge it as a group. I don’t think 0.03mm will both me (nor anyone else) - what matters is that the holes are in the right place and the outline is good enough.

I need to get onto this atomic parts stuff…

I have placed these on board from Pcbnew as didn’t see way to place heatsink or footprints in Eeschema. Is this correct? (I’m used to placing all elements on the schematic - even mounting holes.)

Not all fabs do this. (but you can select subtract mask from silk on export to make sure.)

The fab layer holds documentation information to be used for populating the board.
The silk layer obviously is what is printed onto the pcb.
I have an outline, a pin 1 marker, the reference and the value on f.fab.

I have a duplication of the reference on the silk layer aswell (a text field with %R)
The silk layer also holds a footprint outline and a pin 1 marker. Everything on the silk layer is visible once the board is populated.

No. This is a special layer. It is used to ensure that no two parts come to close to each other.
It should ensure there is enough space for the pick and place machine.
(Currently no automatic check is implemented)

I am not aware of a keep out layer in this version of kicad. (A layer that prohibits copper)
But i think i have read somewhere that it might be included in kicad 5. (but i’m not sure about that)

1 Like

Depends which fab… some will do what you want, some will remove silk over copper and some will halt your job. If you from the start avoid silk over copper you will not have any trouble ever :wink:

Another tip - some Chinese fab houses can’t create arcs/circles on silkscreen… I have only lines on my silkscreens. Same reason KiCAD has a special font, that’s composited out of line segments.

Yeah, for this manual part it doesn’t matter, but for SMD placeable parts where the pcb will be populated by a machine this is important. I interpreted your question as proofreading for not just these but also other footprints you want to share with the planet :wink:

You shouldn’t place any other footprint or have courtyards overlap each other.
There are some over-the-thumb-rules what is considered a good no-go-space for different sized devices.
Again, not really that important for this footprint, more as a hint for the future, as automatic device placement machines need some space around a device to be able to place it (or your soldering iron)…

I saw it, I would be bothered :sunglasses:
If you want to move with 0.01 mm accuracy… here’s how:

  • set grid to 0.01 mm
  • select stuff you want to move by drawing selection bracket from right bottom to left top
  • DO NOT MOVE YOUR MOUSE, but hold your hand on it, be ready to press left mouse button without moving the mouse
  • hit [space]
  • use arrow keys to nudge selection into desired direction
  • use relative coordinate readout at right bottom of window for how much it move(d)
  • left click with mouse
  • DONE
1 Like

Thanks for the tips from both. A lot to digest.

Re Joan’s last point, I’m not using a mouse - don’t own one. I’m using a Wacom tablet and pen. Selecting and then not moving a pen may be more challenging but I will try. However, how do you (in this case) not select the drill holes/pads? Not selected if layers off? I will try

I guess we should revert to the issue of the DXF import not being saved…

I didn’t care… if I was doing it I’d probably note down their coordinates before moving and change them back after moving.
Afaik only the legacy canvas in PCBnew (not the fp editor) atmo has got the option to exclude different things from a selection bracket.

Depends on who you ask really. Many ways led to Rome.
Both EEschema and PCCBnew can create Bills Of Materials for the ‘things’ that they know about.
You can place schematic symbols in EESchema that will not appear in PCBnew.
Same thing for things you place in PCBnew only.

So depending on your workflow and organization a lot is possible (luckily KiCAD isn’t nailed down in that regard and leaves a lot of choices for the user).

Re “atomic parts” and personally vetted libraries… it looks overwhelming at first, but once you wrapped your head around 2-3 things you’re good to run

  1. EESchema and PCBnew handle libraries different at the moment, deal with it. PCBnew’s way is the future, but for EEschema it’s a while away

  2. for atomic parts (symbol + footprint + IDnumber/etc.) you have to run your own libs and maintain them

  3. there are 3rd party scripts that will be able to get you BOMs with prices from the major distributors if you do 1 & 2 right


Hi there,
I can confirm this on Win7 x64. I tried to import a .dxf generated with DS-Mechanical. I can import the dxf and use it as a template, but the importet lines do disappear when saved to the librarie and the footprint is loaded again. The Layer on which the dxf was imported to does not seem to change anything (tried F.silkS and F.crtYD).
Is there any workaround or something that i missed when reading the posts above?
Thanks in foreward

Can you attach the dxf file in question or load it somewhere, so we can try it too?
KiCAD version/OS would be helpful as well.

My own test…

3x2_test.dxf (289.2 KB)

imported into a new footprint at different positions and layers (resulting kicad_mod to the right):

KiCAD version (nightly):

Application: kicad
Version: (2017-05-12 revision b823d0b78)-makepkg, release build
Libraries: wxWidgets 3.0.2
libcurl/7.52.1 OpenSSL/1.0.2k zlib/1.2.11 libssh2/1.8.0 nghttp2/1.19.0 librtmp/2.3
Platform: Windows 7 (build 7601, Service Pack 1), 64-bit edition, 64 bit, Little endian, wxMSW

  • Build Info -
    wxWidgets: 3.0.2 (wchar_t,wx containers,compatible with 2.8)
    Boost: 1.60.0
    Curl: 7.52.1
    KiCad - Compiler: GCC 6.3.0 with C++ ABI 1010
1 Like

I downloaded the .stp file from here:
then coverted it with DS-Mechanical to STEP-WE-CMB-XS-top.dxf (1.1 MB)

I then opened the PCB-Footprinteditor and created a “new Footprint” and then imported the .dxf file, added the pads and saved it to CBM-XS.kicad_mod (188.3 KB). The from the .dxf generated lines are then vanished.

I can import the .dxf without problems, i see the drawing but once the footprint is saved and reloaded, they are gone.
Thanks for you looking into it!

Application: kicad
Version: 4.0.6 release build
wxWidgets: Version 3.0.2 (debug,wchar_t,compiler with C++ ABI 1010,GCC 6.3.0,wx containers,compatible with 2.8)
Platform: Windows 7 (build 7601, Service Pack 1), 64-bit edition, 64 bit, Little endian, wxMSW
Boost version: 1.60.0
Curl version: libcurl/7.52.1 OpenSSL/1.0.2k zlib/1.2.11 libssh2/1.8.0 nghttp2/1.19.0 librtmp/2.3

I was playing with DXF recently and am fairly sure this is a bug in stable series (4.0.6 here). The DXF appears to import correctly, it displays and can be moved around. When the file is saved, all the coordinates are set to the same wrong coordinate, so although the line segments are there, they are not displayed.

Here is what I get with 3x2_test.dxf

(module test_dxf2 (layer F.Cu) (tedit 594E236F)
  (fp_text reference REF** (at 0 0.5) (layer F.SilkS)
    (effects (font (size 1 1) (thickness 0.15)))
  (fp_text value test (at 0 -0.5) (layer F.Fab)
    (effects (font (size 1 1) (thickness 0.15)))
  (fp_circle (center -151 -99.8) (end -151 -99.8) (layer F.SilkS) (width 0.1))
  (fp_line (start -151 -99.8) (end -151 -99.8) (layer F.SilkS) (width 0.1))
  (fp_line (start -151 -99.8) (end -151 -99.8) (layer F.SilkS) (width 0.1))
  (fp_line (start -151 -99.8) (end -151 -99.8) (layer F.SilkS) (width 0.1))
  (fp_line (start -151 -99.8) (end -151 -99.8) (layer F.SilkS) (width 0.1))

It doesn’t appear to be in the bug tracker, but the issue appears to be fixed in dev builds, I hadn’t got round to testing that yet.

1 Like

@Detzi I have just promoted you to Basic level, you should be able to upload now

1 Like