Pcbnew import coordinates from DXF file


#1

Dear Kicad community.

This is my first post, just saying ;).

I am working with a graphic illustrating program, called CorelDraw, here I draw layouts for components placement, for pcbnew in Kicad.

Currently I’m using a Github extension to convert the file, so that it is readable for Kicad(pcbnew). Afterwards I Import the layout and use a symbole as a reference, for the component placement In pcbnew. I manually place the components in pcbnew, based on the coordinates which I have from CorelDraw.

So, Is there any option to Import x,y coordinates into pcbnew, and automatically set the .mod footprints to attach to a spesific coordiate, based on the arrangement in the netlist, maybe?

Having such an option would save me a’lot of time, ALOT! I often have several hundreds components for a pcb, therefore this is very timeconsuming.

Regards

David
Electronic developer
Norway


Importing DXF to PCB new creating illegible blobs
#2

Just a couple days ago this was posted:

Then there is the autorouter, which will also autoplace as far as I understood it, while not modifying components that you have locked.
Never used it so far though, but others will surely chime in…


#3

At the moment there is no scheme to do that via DXF. The existing support for DXF is extremely limited and although many people have asked for some feature to be added, in general people don’t give a good idea of what they want implemented and how it can be of general use to other people.

I think to automate your workflow the best option would be to take data from a DXF file and generate a kicad_pcb file without using kicad at all. After that you can open the file in pcbnew and continue the layout (tracks etc).

I have plans for a “PCB API” but no time to implement it (it’s a very big job); if/whenever that’s implemented it will be possible to create plugins to do this kind of work that you describe. But for now the only options are (a) write a stand-alone tool or (b) learn how to use the python scripting interface to implement.


#4

The *.DXF import capability is usable, but “limited” is an understatement of its capabilities. As a start, fix it so the program actually does what the menu selections ask it to do. In the OpenGL canvas the only import mode seems to be “User Defined Position” and “Millimeter” units, regardless of which boxes you check. Even “User Defined Position” is ambiguous, since the imported image will be attached to the mouse cursor until you “Define” the origin by clicking the mouse. This is actually a very useful approach, but it wasn’t at all obvious to me that it would work this way from reading the description beside the check-box.

And even though you select “Inches” for the imported image’s units, it’s going to be interpreted as “Millimeters”. Eventually I discovered that the no-charge version of “CADStd” lets you read a *.DXF file formatted in inches, and save it as a *.DXF in millimeters.

Dale


#5

The “mm/inch” in the DXF import dialog refers to the offset position. The unit of the DXF file itself is taken from the DXF file and if it is absent then mm is assumed. The OpenGL canvas has always behaved differently from the legacy canvas. Maybe some things will be fixed one day but I have no more time for discussions on DXF since they have been an absolute waste of my time in the past.


#6

Thanks for your attention . Those two sentences alone give more information than what I was able to figure out from the Help files and the program’s menus.

Dale


#7

Thanks for the response. I will look into this in the upcoming week.

Thanks


#8

A definitive document on dxf is here http://images.autodesk.com/adsk/files/autocad_2012_pdf_dxf-reference_enu.pdf

There are several versions of dxf

KiCad currently only supports a subset of this


#9

I have started looking into DraftSight for maybe solving this issue. So Does anyone have any experience with Importing coordinates to pcbnew from a excel sheet?.

Maybe I could write a script for it?

Thanks.


#10

In an older post, is a script I did that shows how to move/rotate parts from a table in the same script.
That likely could be expanded to read a CSV file or similar.

Can you give an example of what you try to do in Corel ?

DXF is good for outlines and shapes, but not so good at preserving and associating TEXT
ie DXF is ok for footprint shapes, and drill locations for example.

You may also want to read this thread


which was about importing design info into PCB, from other than KiCad SCH flow.