Graph Mismatch on Import DXF file to Kicad

Hello

I tried to import a DXF file to Kicad, but I found the imported graph is not the same as the original graph. There are two parts in the original graph, but after the DXF file has been imported to Kicad, it became to one parts. The two parts are overlapped together.
Does anyone know the possible reason ?

The original graph :

Imported graph in Kicad :

Kicad version:

Thanks
Yuning

Maybe share the dxf file as well.

here is the dxf file. thanks

I pasted in the actual pictures instead of the links, it’s easier to see this way.

It looks like that some kind of rotation and translation is applied to “blocks” in the original DXF and which is not supported by the DXF library KiCad uses.

And what about those hatched area’s in the first picture?

The simplest workaround is probably to explode the blocks before the export, so they are just simple lines.

Thanks.
the hatched area are the copper area.
If I explode the blocks and import to kicad, can I make the block to solid in Kicad ? sorry , I just new to Kicad.

Thanks

DXF files are a nuisance, there are a lot of different variants. LibreCAD can read your DXF though. I exported it again in the dxf 2007 variant.

Testing… No, can’t import that in KiCad.
Also tried some other variants (R12, R14, 2000) but none of them can be imported properly in KiCad.

Yes, if you only have lines for the outline, you can convert them to a copper zone inside kicad by making a selection and then right clicking and: Create from Selection / Create Zone from Selection

The geometry seems too big. Make sure you’re exporting the DXF with correct units.

That’s not a requirement of the DXF format even though it’s annoying. Lol.

It seems the intended units are mils/thous here.

I used a scale factor of 0.01 and millimeters during the import into KiCad, with the above result. which implies a total size of 6256 units. (I added the measurement). But rotation and relative placement is still wrong, so I did not mention it earlier.

Thank you guys, Yes, I have to modify the scale when importing the DXF, but I think that’s not the problem.
Actually, the original layout file was drawn in ADS (Advanced Design System), I exported to GDSII format, and use KLayout to transfer to DXF format. Then imported to Kicad.

There’s an issue applying the rotation transform in DXF_IMPORT_PLUGIN::addInsert The objects are blocks that are horizontal until the insert is supposed to rotate them.

I also attached the original GDS file which was exported from ADS. it’s a 3 layer layout. and the one I mentioned is in the middle layer.

Thanks

Yes, I guess the transformation is just 1-level deep.

I didn’t exactly forsee a tool exporting a block made of blocks. Lol

After:

  1. Opening In LibreCAD
  2. LibreCAD / Tools / Modify / Explode
  3. Save as asdf.dxf
  4. Import in KiCad at scale 0.01

I get:

So all the objects are now shown twice in KiCad.
asdf.dxf (42.9 KB)

Thanks a lot,
But do you know why it showed twice ?

No. I assume it’s a bug in KiCad, but that’s a pretty wild guess.

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