flatY = acrossFlat - shaftRadius
flatX = (shaftRadius**2 - flatY**2)**.5
flatVertex = Vec(flatX, flatY)
prongX = flatX * relProngPitch
prongY = flatY + prongRadius
prongCenter = Vec(prongX, prongY)
notchRadius = prongX - prongRadius*(1 - relNotchSize)
notchHypot = prongRadius + notchRadius
notchOffset = (notchHypot**2 - prongX**2)**.5
notchCenter = Vec(0, prongY + notchOffset)
To reduce stress when the prongs are pushed back, their outer "hinge" corners are rounded as much as possible. To avoid any relevant interference, the hinge arc starts at the same position as the flatted corner vertex. The main challenge is to find the center of the arc.
To ensure a smooth transition, the arc must share a tangent with the shaft and the prong. Because the arc lies on a circle, the distance of its center to each tangent must be equal. Therefore, the center must lie on the bisector of the tangents. And because the arc shares a tangent with the shaft at the flat vertex, the arc center must also lie on the diagonal from the shaft center to the flat vertex.
Once the arc centers are established, all that remains is to find their start and end angles. Note that all arcs in DXF are counter-clockwise, so the prong arcs are reversed.