I know this has been discussed a few times on the forum, but looking through previous posts I’m afraid I’ve not been able to find a solution to my particular problem yet.
I’m trying to import a DXF file from AutoCAD into PCBNew, to guide my placement of components. The board is designed to sit behind a control panel, so the placement of the LEDs is critical. However, when I import the DXF, only a random part of the file appears in PCBNew - sometimes it’s some of the edges and a couple of cutouts, other times it’s a completely different drawing.
I’ve tried exporting to different versions of DXF from AutoCAD, ranging from 2013 and 2010 to the old R12 (as mentioned elsewhere on the forum), and tried different exporting methods too. Unfortunately I’m at a loss now, and was hoping if someone could help me diagnose the problem
Thanks for the reply - aye, after posting this topic someone here pointed out to me that I’d dun goofed, and left most of my layers off - leaving loads of unwanted crap in the exported DXF.
Removing all that solved the problem, so I’ve flagged the topic for removal - a classic PEBKAC on my part!
So after my PEBKAC, I though I’d solved the problem… well, sort of… The problem is now reoccurring, and I’ve no clue why!! I had a version of the DXF that worked, but I tried (perhaps foolishly) removing some of the excess lines… then it stopped working. I made a copy, and rolled my change back, and it worked again… eh??
These are the two files - the original, functioning drawing, and the “new and improved”, and well and truly broken, drawing… LED cutouts - Problem.dxf (180.0 KB) LED cutouts.dxf (187.0 KB)
Precicely xD they’re literally identical in every possible way, except on the “new” one I removed excess lines on the “Engraving” layer, to leave only the cutouts which are of interest to me… wurt da whit?
OK, new update. I have solved, it seems, the problem, so this is what caused it for future reference:
A combination of two factors caused the problems:
The blocks I was interested in were at around 2000,0 on the coordinate system, not at 0,0. Therefore when I tried to insert them into KiCAD, they did insert properly, just about “2m” off to the right, so I never saw them until I zoomed riiiight out and panned right. Moving the blocks to a “home” position at 0,0 solved this particular problem.
I had a large number of unused blocks still in the drawing - thats what the “problem” photo was, a mish mash of all the unused blocks, being inserted at 0,0. Purging these blocks from the drawing resulted in these artefacts no longer importing into KiCAD.
Hopefully this will all help someone in the future… a combination of a massive PEBKAC on my part by drawing at 2000,0, and a strange artefact of KiCAD’s DXF import tool
Thanks to @maui for the bug report. The original file should notnow import correctly in 5.1.5RC1. Please test tomorrow’s nightly when you get a chance to verify it works for you.