Close

Importing board outlines - tips and tricks

A project log for The KiCAD Central

All you want to know about KiCAD. Whether you're a starter or a power user, there should be something for everyone here shortly.

ArsenijsArsenijs 12/16/2016 at 07:471 Comment

Say, you have a vector drawing in your favourite drawing software. You need that to become your board outline. For that, you need a DXF drawing. What are other requirements?

  1. Proper dimensioning is a must. - it'll be hard (if not impossible at all) to scale the outline once it's imported, even more so if you want to have precise dimensions. When using online vector-to-DXF converters, know that they can omit/change the dimensions of the output, leaving you with a tiny or huge outline.
  2. KiCad requires specific DXF format with limited set of features used. When exporting drawings from your vector drawing software, you might need to use another tool to prepare your DXF before exporting (or not - it all depends on the way your drawing was created)

Say, you have a Chrismas tree vector in Inkscape.

It's correctly dimensioned and you export it in DXF, then import in KiCad:

Spooky. Somebody stole our Christmas tree along the way, leaving only a stump. Let's bring the Christmas tree back!We've got a DXF. Let's download and install LibreCAD. It's free, cross-platform and has a horrible learning curve if you don't use a tutorial - in short, a typical open-source project. I'll skip the "opening the DXF in LibreCAD" part, let's just look at it:

Something becomes clear - it's exported in a bad way from Inkscape, and importing only makes it worse. What we need to do is select all the image that we've imported - however, you can't do Ctrl+A and you never know how a heavily-customized UI like this one will respond to your clicks and, even worse, keyboard shortcuts. What you need to do is just select it using a mouse, by "drag and select" or how it's called - hopefully, you understand what I'm talking about.

Once selected, do Tools->Modify->Explode . You'll get your image divided into smaller segments and you can now delete only the offending ones.

Should be good now! Do File->Save as... the output format you'll want is R12 DXF. Saved, let's import it:

Wonderful!


Just for reference:

My Inkscape DXF export settings:

Resources used:

Tutorial metadata: KiCad 4.0.4-stable, Inkscape 0.91, LibreCAD 2.1.3, tutorial done on 16.12.2016

Discussions

ThantiK wrote 01/23/2019 at 17:25 point

By the way, you don't need LibreCAD for this.  In inkscape, choose the node editor tool, select all of your points, and on the far left of the interface, above the left toolbar, you'll see a "insert new nodes into selected segments".  Hit this until you have a dense set of points, then along that same toolbar, closer to the right hand side there's an option to "make selected points lines".  Click that, and then export the DXF.

This saves you from having to use LibreCAD at all.

  Are you sure? yes | no