Board outline, edge cut, dxf-import

This is my board outline. Width 96,00 mm, height 173,5 mm. Cross on left-top is origin, in mechanic cad it is just 0,0,0 and drawing is 2D. (circle-cross is only reason of clarify…). Dxf-format not problem: My mechanic cad can export from R12 to 2014 (all format between this, not 2015 reason it is older cad). I use metric design, of course.

I import this to kicad:
image

  • “placement” 1000 x 700 mm, I test this many times and found right and good position
  • Import scale must be 0,039370. Kicad does not understand metric dxf-file. Only possibility is import file using scale 1/25,4. Stupid… but “this is”. Kicad cannot import metric, so on.

And this is Kicad import result:


(Scale is right, so this “0,039…” work, size is right)

All circles import as it is, just right. But all lines nothing- only one line. Of course answer is "my dxf is 3D and it contain also Z components, but not: all items are “Z=0”. And, of course, reason of real cad, lines are lines, not polylines.

So: problem is not “wrong autocad version”- of course it is possible, but I cannot use newer version as 2014. Any ideas?

Only R12 is supported by KiCad.

Which version of KiCAD are you using ? (please click on help->about kicad->copy version and paste the result here),

Version (5.1.4)-1, release build. Windows 10 pro FI, 64 bit.

(look it is no difference R12 and 2014- my cad can export R12 to 2014. Between this versiosn in my cad is about all year versions… and, kicad can import as R12 as 2014. If not, I cannot understand why kicad can import 2014… in real life…)

do you not understand the difference between “doesn’t crash” and “supported”?

have you tried R12? If so and it doesn’t work, post the dxf file here.

1 Like

I never looked too deep into the .DXF format but I’ve gotten the impression that it is a quite bodged together format with lots of inconsistencies and version differences. Some software developers also seem to ignore standards, bodge together some code until they think “it works for me” and then try to commercialize it and get rich. This sort of behaviour has lead to a long history of problems with gerber files that still are not solved. Not because of the standard, but because of “other issues”

With .DXF I’ve sometimes had success by loading the file into either FreeCAD or LibreCAD and then save it again.

[Edit] I just discovered that bCNC can also both import from .DXF and export to .DXF. Wich I found both weird and interesting enough for some more experiments. I loaded some G-code into bCNC (It is a CNC control program, so that is it’s thing) Exported the G-code to an .dxf file and opened that in FreeCAD. And it works. The 3D contours are flattened into the X-Y plane. It also looks like it only put the contours with feedrate into the .dxf file and skips the G0 rapids.
I can also open the .dxf file generated by bCNC in KiCad.

bCNC can also work with .st. and .svg files. there may be some intersting possibilities there.


bCNC is also written in Python. If it’s file import chokes on some particular thing in your .dxf file it MAY be relatively easy to fix in the bCNC code. If you’re out of luck however, it just calls some compiled library function for reading .dxf files. (Which likely would be another open source project)

The problem is, as paulvdh already said, the export format of the CAD software you use for drawing the outline.

To find the problem, first create a simplified outline drawing . The best is just a box with one circle inside. Then try to import it and see the result. If this does not work, then your CAD application exports an
incompatible dxf format.

If this works well, check your complicated outline at the highest zoom factor for gaps.
All lines need to form closed shapes. Often the corners of rectangles are not closed by a
extremely tiny gap.

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