Yeah, this is a pretty long question.
I am doing a project with a curvy enclosure. The vendor, hammond, did not provide a board outline file, and the 2d drawing was not fully-defined, but with a pair of calipers and two pairs of reading glasses, I got started. However, matching the curved edge seemed tricky to do manually, especially since I don’t see any sort of kicad spline/bezier tool for drawing on the edge cut layer.
So I got the vendor step file, opened it in solidworks, found that it was a complete assembly down to the screws, and even had a pcb hidden inside (an easter egg with remarkable timing). I saved it as an assembly, and then opened the pcb part file, extracted the pcb outline and saved it as dxf. Whew. Anyway, that had nothing to do with kicad, but now I have a dxf outline for kicad import.
I started my kicad project and imported the dxf file to the User-1 layer, so I can measure/verify it, add centerlines and hole centers:
Then I also copied it to the edge cut layer and trimmed that down to a proper closed shape:
Now if I just want to add a ground plane it is easy to plop a polygon around it and set a design constraint to set copper-to-edge-clearance as needed:
Which finally brings me to my question, how can I get a trace (or inner polygon that effectively becomes a trace) that snuggles up to the edge?
The application is for an esd ring, which frankly is a great idea and easy thing to implement for your next design, whatever it may be. The top and bottom layers have this ring, which only connects at one point to battery negative or chassis ground. ESD events that get through the enclosure seam and hit the pcb ring get shunted to the safest potential in the circuit. All net-protection tvs parts dump into this ring, connector shells, and sometimes cable shield, connect to the esd ring. Sensitive stuff in the middle is safe as no high currents are running through their return paths, creating damaging delta-volts. Anyway, that’s the theory as I understand it. I have a product that will be going through testing including bung-puckering 16-kV contact discharge esd zaps, so I need every trick.
On a rectangular board, it is easy to draw traces for the esd ring, and have the ground plane just inside that. Below, the three-hole lego-technic thing is a gnd-tie to the main ground – the only spot the “chassis-gnd” esd ring gets connected to ground. D1 is a tvs diode dumping into it, and the usb shell is on the ring. It goes around the whole board on top and bottom layers, and connects to other connectors and tvs parts.
So how can I create an esd ring on a curved edge?