Pcbnew doesn't import dxf


#1

Hi,

I’ve tried to import some dxf files in Pcbnew to create a board but nothing appears.

I’ve followed the guidelines in the documentation, saving the files as DXF R12. I’ve tried to use R14, too. And LibreCAD. I’ve used ‘Exlode’, too but nothing still happens.

Can anyone helps me?

Thanks a lot


#2

We need a bit more details here. Any chance you might share your dxf file?
Also: What kicad version are you using?


#3

Sure, I’m sorry…

I’m using 4.0.6 version of Kicad, in win10, 64 bit

Here it is the pattern I should import but I’ve tried with different shapes (a simple rectangular, a circle) and softwares (AutoCAD, LibreCAD), too.
https://drive.google.com/open?id=0B_rloFXcFQduMlJ2aEVyUTJRZzg


#4

I can import your file into a recent nightly build - but it comes out pretty tiny - 0.35" tall (3.8mm x 9.8mm) - is that correct? When I opened it in another app, the zero offset was way off (like which might have some bearing on this. (x offset 2446mm, y=1662mm).


#5

Hi John,

yes, it’s correct…it’s a connector, I need it so small.
With which apps did you open the file? Did you import it in Pcbnew?


#6

I can confirm this. I’m running a nightly build from 10 February on a Win7/64 machine. The file imports into either PCBNew, or the footprint editor . . . . but it is offset up and to the right by approx (3.9, 5.5) inches.

I suggest for you to open this file in a drafting program, shift the location to a point closer to the page origin, then re-save it.

Dale


#7

I’m also on 4.0.6 on Win64. I just tried importing and it worked in both pcbnew and the module editor. For me even though I specified importing the DXF origin to Center of page, it came in attached to my pointer waiting for me to place it. (FWIW, I was importing into one of the yellow layers simply to make it easy to see. I forget which one, but it might have been one of the ECO layers. I’m not sure that made any difference.)

Import into pcbnew:

Import into module editor:

Note that the anchor point is different even though I used the same import settings… Both of these screenshots are before I clicked to place the outline.

Ah, I just realized I was doing those imports in OpenGL. I switched to legacy in the module editor and imported. It didn’t look like anything happened until I zoomed out and found the imported outline way off center.

Import into module editor with legacy canvas:

Note the coordinates of my pointer… This is in inch scale.


#8

I saw, in some videos on youtube, that when you import an DXF the design should appear before you click to place it, as in your screen.
But I can’t visualize the ‘preview’ yet, as you do…

This is what I get after doing ‘Import -> FIle DXF -> position [–.]’


#9

I had a quick check over it in ViaCAD - not free but good value for a 3D design program - not as well featured as FreeCad but slightly easier to get your head around! I imported it in pcbnew (openGL) - I put it in a drawing layer but don’t think it matters which layer. The first screen shot (on the left) was from pcbnew - with the new micrometer tool (nightly special) Open GL seems to attach it to my pointer and Legacy shoves it way over… (confirming @SembazuruCDE and @dchisholm 's observations).


#10

I can see by your screenshot that you are on the legacy view (grid dots instead of grid lines on OpenGL). Try again in the OpenGL canvas.


#11

Even on OpenGL nothing has changed.

Anyway, I visualized the drawing after varying the path of the DXF file, it seems like it was too long. I’m not sure this was the issue.

Now, I have the same problem…but I’m happy to see something, at least :slight_smile:

Thanks to everybody :smiley:


#12

Did the path contain any non-ASCII characters? We’re looking for a few bugs which have not been reported; the effect is that UTF8 strings are being incorrectly interpreted according the the locale setting. For users who typically have the locale set to some variant of English and who do not use non-ASCII characters in paths or file names, this class of bugs would never be noticed.


#13

As a general principle, shouldn’t DXF import report something like the number of verticies found in the file eg on the status line ?
A gold star if it reported the extents of the verticies too,

That would at least alert users something did happen and they can try Zoom scans from there ?


#14

If all characters in this table are ASCII, there isnt’ any non-ASCII character in the path…
http://www.oppo.it/tabelle/tabella_ascii.htm


#15

The genuine ASCII codes only go to 127; everything beyond that can be interpreted in any way. I will see if I can find time to look at the DXF import code and check for bugs in the text code handling.


#16

So, looking at this table http://learn.parallax.com/support/reference/ascii-table-0-127 I saw that ‘à’ isn’t an ASCII character and it was in my path. Once I renamed the folder, the DXF file was imported correctly (in openGL) but I can’t still visualize anything in the legacy view.

I can’t find anything…what feedback should I have if the DXF import was ok?

One last question: is it possible to import filled objects (hatched/solid poligons in AutoCAD) as serigrafia?


#17

There is no feedback about what is imported from DXF and in the Legacy Canvas the items will simply be placed where instructed if the file was successfully processed, so if the scaling is wrong or the drawing has a large offset from the DXF origin it can be difficult to find the imported graphics.

The DXF support is extremely limited at the moment; only lines, arcs, and PolyLines are supported. Filled polygons and other items are ignored. I don’t believe there will be any further development of the DXF importer unless someone can present a good plan for how to map features into kicad; we get occasional requests but they tend to be very specific to what one user wants to do, and it also seems that DXF is not used enough for anyone to spend more time with it.


#18

thank you, anyway…i’ll try to import it as bitmap :slight_smile:


#19

for hatched poligons as serigrafia you can also try


#20

Hi i also have a problem importing this DXF to Kicad. It does not work in Cairo nor in standard render. I am using 4.0.7 PCBnew. Can somebody look at the file? Here is the DXF file https://files.fm/u/jwudd9nn