Adding Part Footprint Causes Malformed Outline

I have a board outline that appears to work in 3Dviewer until I put an Amphenol SMA connector on it. Doesn’t matter where I put the connector, the 3D view says the board is malformed.


Then I add the SMA connector:
board-SMA
Neither the USB nor the MMCX did that. Why can adding the SMA connector tell me the board is malformed? It was fine until the SMA connector was added.

Where is the “faulty” footprint coming from? 3rd party website?
Why no to use Amphenol SMA footprints from KiCAD library? There are some available. If they are exactly what you need, you can modify one of the existing ones.

2 Likes

guess: the SMA footprint contains some elements on the edge.cuts layer and therefore adds to the total edge.cuts outline. As greg points out: source of the footprint?

But note: A exact answer can only be given if the project files are available for investigation. So please read this link for new members: New Member Information
If you follow the hints and instructions you could level-up yourself to a “basic forum member”. As such you are allowed to attach files in your thread, for instance the complete project: use “Archive project” from the kicad main manager. (maybe delete all backup files from the resulting zip file).

also note: it’s always a good idea to inform the readers about the used software version, as answers my be different for different kicad version.

  1. Run DRC in the PCB editor, it gives you more info about the malformed outline.
  2. Load the footprint in the footprint editor, and check anything that is on the Edge.Cuts layer.
  3. Post the footprint, or a link to where it can be obtained if the above is not enough, so we can have a look.

The KiCAD version is 8.0.3 release build. The SMA footprint that causes the error is in the default library under Connector_Coaxial->SMA_Amphenol_901-143_Horizontal. I’ve used it before. I think I had KiCAD 3 or 4 when I first used it, and it didn’t do this.
The design rule check gave me this output:


But how could those be a problem if they weren’t a problem when the SMA connector was not on the board?
The next image shows where the five errors are coming from:

But why do those only show up when the SMA connector gets put on the board? It didn’t have this problem with just the USB and MMCX.
It’s telling me the shape is not closed. I used LibreCAD to draw it, and FreeCAD to ensure it was a closed shape. Perhaps there’s an additional step I have to take in FreeCAD before exporting it to KiCAD?

The 5th error seems to be the one near the middle of the board. My guess is that the SMA connector footprint has a stray line segment on EdgeCuts way outside of the normal boundary. Try fixing that error first.

3 Likes

I can confirm that. Same behaviour here.
The footprint has a line which is on Edge.Cuts layer (the one I selected, just above “2” pads).
That line should be on User.Drawing or Fab layer.

For now, move that line to a different layer or remove completely and it will work.
It should be fixed in later versions.

@W_Kyle_Gilbertson : use the solution given by @greg_m : remove the single edge.cuts line from the footprint.

from greg: The footprint has a line which is on Edge.Cuts layer (the one I selected, just above “2” pads). That line should be on User.Drawing or Fab layer.

That depends. The usecase for a line-segment on the edge.cuts layer:

  • the footprint in question is a horizontal type footprint
  • these footprints are normally mounted exactly on the board edge
  • with a “edge.cuts” line segment it’s possible to draw the board outline exactly with snapping edge.cuts lines to the already existing edge.cuts segment in the footprint

I admit that there are usecases and users who doesn’t like that behaviour, but there where also many gitlab reqests to add such a solution (edge.cuts segments inside the footprint definition) to the footprint editor.

I’ve used it (SMA footprint) before. I think I had KiCAD 3 or 4 when I first used it, and it didn’t do this.

The feature “edge.cuts segments inside footprint definition” was added in kicad v6 (or v7?). The updating of the footprints to take advantage of this feature needed probably also some time. Therefore you saw this problem only now.

1 Like

I understand. Not sure what KLC says about it, but I think that doesn’t give us, PCB designers any flexibility. I’ve used many connectors (pretty sure they were from the KiCAD library) and they had a line usually on Fab layer with a note “PCB EDGE”, so you understand what it is, can move it half a mm one way or the other if this is what you need. Also if the connector can be fitted on the rounded PCB edge and a straight line on Edge.Cuts wouldn’t work.
The fact we can add a line on Edge.Cuts in a footprint is great! TBH I didn’t know about that feature until today. However it may confuse some people. Perhaps we can at least add PCB EDGE text on the FAB layer., so everyone will it straight away what’s going on.
That’s my view.

1 Like

Being able to add edge_cuts layer to a footprint was intended for closed outlines like the “windows” you need for a mouse optical sensor or an RF power transistor sat in a slot.
It strikes me that this SMA is using the line as an alignment aid. Joining it to an existing edge would require getting grids consistent etc, so I would but it on a Fab layer and just position the connector over the board outline so that the lines were on top of each other.

1 Like

The “Segment has null or very small length” is probably also easy to fix. Just zoom in on the arrows, delete those small segments (2nm to 62nm) and then extend some other line to close the outline again. (You may have to turn snappng for graphic items on).

You can click in the errors in the DRC window to show which it is. And vice versa, when double clicking on an arrow it opens the DRC window and shows which error generated it.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.