STEP export "Cannot determine the board outline"


My outline is kind of funky, converted from a dxf with square corners then added a bunch of arcs to round the edges. Had a similar error during that process but by tweaking the endpoints got it to stop complaining.

However, when I try to export STEP I get this error - 3D viewer shows the outline correctly, and VRML export seems to work - anything I can do besides tweak the endpoints more?


Check also that you don’t have any extra line segments. Both endpoints of each line (straight line segment or an arc) must be attached to another line’s end point. Each line must belong to a closed continous non-intersecting outline. No “free floating” segments or arcs.


You can also give the pcb line with the outline here. I’m interested because I’m going to make a tutorial video for drawing outlines and other graphics in KiCad.


Can you prove me your board outline gerber so I can try on my macro that convert to soildworks to see if it work :-).


shield-Edge.Cuts.gbr (2.7 KB)

Seems like my issue is I was sloppy with joining the ends, I’ll have to edit the numbers directly to line them up i guess.


Thanks, your scripts look interesting. I tried replacing my outline with a simple rectangle and got an export, but have another issue because some of my part models are VRML, not STEP. So I will give your program a try.


Thank for interesting - for the full assembly - you need to have a 3D BOM, and I do not have a script, or instruction at this time to show u how to do it. But in the pass, I manaully create 3D BOM for only part that I actually interesting only (like big part). I will try to at least add instruction for the 3D BOM header, or example when I got another free time - May try this holidays.


You may consider also to have a look at kicad Stepup.
The tool is also useful for bi directional mechanical collaboration.
Still you will need all the 3d models as step for a full conversion.



This is the kind of tool that is missing from the current versions of KiCAD - snapping to an endpoint, finding a tangent, creating an arc from two endpoints, etc. The developers at CERN have teased us with the suggestion they may be included in KiCAD 6.0.0. (probably 2 years away). In the meantime, many of us do outlines in external CAD tools and import the result as a *.DXF file. I have not yet been brave enough to try 3D drafting and modeling (something about old dogs and new tricks :wink: ) but in about half a day I learned enough about the no-cost tool " LibreCAD " to efficiently create moderately complex outlines that could be imported to KiCAD.



here the pcb file with the edge fixed (using FreeCAD & StepUp edge fixing tools)
(I obtained the kicad_pcb from the gerber file and then I fixed it)
shield-Edge.Cuts.kicad_pcb (5.6 KB)

and the STEP file generated
shield-Edge.Cuts.step (53.6 KB)


Dale, I desperately want dimensions for that outline!


Yeah, I was a little proud of that when it turned out so nice!

(For the record: It fits a Takachi Takachi WH145-33-M3 . All of those crosses mark points of particular interest for my project - locations of the enclosure’s screw towers, mounting holes, switches, etc.)

I’ll have to look through some old backup files and see how many dimensions I have, beyond the basic circumscribed rectangle. For the corner notches I started with Takachi’s *.DXF file of the enclosure interior; then told LibreCAD to make a circle with radius 0.8mm larger than the screw towers holding the case together; then created tangential lines from the 90 edge points to the rectangular outline. Most of the arcs were generated by telling LibreCAD to convert a corner to a radius; the two diagonal lines near the center of the board were created by telling LibreCAD to find a tangential line.

Like a lot of us say, if a KiCAD outline goes beyond a basic rectangle with rounded corners (and maybe a simple notch or two), you need to use another CAD program to define the outline. We hope that in the future KiCAD will include some of those more sophisticated drawing tools.



The look of gerber file should work with the solidworks macro. If not, it solidwork will tell you the problem, and it may be the open end, or some overlap drawing… I don’t have access to solidworks at this time to check it out yet!


Thank you for your answer, this is very helpful to me, really thank you.


The *.pdf file is a KiCAD plot of the dimensioned outline. The *.zip archive contains a complete KiCAD project with the dimensioned outline.

Outline_Example_RevA.pdf (105.3 KB) (236.7 KB)

(This is gonna be a magnet attracting comments and grading by every retired High School drafting teacher in the world!)



Thank you the file, it help me fix 2 issues:

  • EOL of unix file in your gerber file.
  • Fix arc code.

Here is a little screen capture run with your gerber file: show_error


And finally I can add a video demo on my gitlab now:

Demo Video

KiCAD/FreeCAD mechanical collaboration