Error in importing autocad dxf file [toroidal inductor]

Hello,

Before trying with KiCad I tried to import this (https://imgur.com/a/Ue4AcMU) in Altium Designer which resulted in the same type of error. After following the import procedure, instead of all the turns of a toroidal inductor I end up with just one turn in KiCad, while in AD I was able to import everything, but the turns were not rotated depending on their positions in polar grid.

Has anyone done something similar or have experience in importing such shapes?

Toroid (bottom).dxf (375.8 KB)
toroid (top).dxf (408.6 KB)

Regards,

Girish

I experimented a bit with your drawing.
Opened toroid_top in Librecad and saved it in dxf 2007 format.
File shrunk to 24kB, and after closing LibreCAD it can still read it.
Imported it in Pcbnew, and I see a single pie shape.
Also imported the original in FreeCAD, and it looks like the picture posted at imgur.
After saving it, It also gets read badly by Pcbnew.

Also tried opening it in Inkscape, but it also makes a mess of it.

FreeCAD has a plugin called “stepup” which is designed especially to interact with KiCad. That might work to get it from FreeCAD to KiCad.

I also had some success with importing the dxf as a single slice in Pcbnew, and then rotating it as an array with 40 pieces. Trouble is that graphics is not KiCad’s strong point and you have to get the rotation point for the array correct.
During import you can set a location. A location of (0,-20) seems to work, and then draw a circular array with 40 or so pieces. Outside diameter becomes then about 57mm.

Edit addition:
It’s also a fairly simple drawing which can be drawn within KiCad itself with 4 line segments and a circular array. Just type over some coordinates form your DXF.

2 Likes

Hello,

Thank you for checking out the files. I see that you had some success in placing them in an array (outside diameters that you got is approximately equal to the values I chose). But how to select the rotation point? When I use that option, my turns are placed at some weird radius with undesired rotation.

Reply to your edit:

That is amazing. The problem is I also have a bottom layer that needs to be aligned properly with the top layer and I don’t know if it can be done in KiCad. It was fairly simple in Autocad but the error in importing the files is the problem.

KiCad’s drawing abilities are a subject for improvement :slight_smile:
KiCad seems to default wants to rotate about (0.0), so upon insertion I saw some boxes for entering coordinates for the insertion point, and using (0.-20) seemed to be the rigt location to get a nice array.

After that you have to select the whole thing and move it as a block, which is quite a nusance, but it is a hack which enables you to continue.
If you also want it on the bottom, you can copy all the objects first, and while they are selected press “f” to flip them to the bottom. In KiCad you can look “through” the PCB, which makes alignment easy.

1 Like

Hi,

just explode your dxf file and then import it in KiCad

toroid (top)-exploded.dxf (56.0 KB)

1 Like

Hey! How did you explode all the objects? Someone suggested me this but autocad gave me this error. Did you also use autocad to explode?

https://www.google.com/search?client=firefox-b-d&q=librecad+explode

Thank you. I was able to import it after exploding.

1 Like

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