The stock Bafang pedal cranks measure 170 mm on centers between the bottom bracket shaft and the pedal spindle. Having grown accustomed to the 165 mm cranks from Mary’s bike, I got a set of cheap 160 mm cranks to feel if there was any difference:

The bottom crank has a quick-and-dirty adaptation of the magnet mount for the Lekkie Buzz Bar offset cranks, but, of course, the 160 mm cranks have an entirely different profile. They are also heavier and more crudely forged, which is about what you’d (well, I’d) expect.
Also unlike the Lekkie cranks, neither the Bafang nor the Prowheel cranks correct the Bafang motor’s offset, so I’m using the left-side Kneesaver from the old cranks, which turns out to be close enough.
Modeling the profile started with an infrequently used contour gauge:

The black 3D printed mount in the upper right fit the Bafang crank and appears in the top photo.
Transferring the new contour to paper and applying the Chord Equation got the radius of the not-quite circle:

Knowing the size of the magnet and the radius of the circle, drawing the profile in LightBurn was straightforward:

Applying the laser cutter to MDF produced the two successive test-fit pieces in the picture while figuring out how much stickout the magnet needed beyond the inner crank face to reach the sensor. LightBurn’s Node Editor
simplified adjusting the size: drag-select a group of nodes, then move them in precise increments with the arrow keys.
Export the profile from LightBurn as an SVG file, import it into OpenSCAD, and extrude it to the proper length:
module CatEyeMagnet() {
Magnet = [19.0,14.0,8.5];
translate([0,75,0])
linear_extrude(height=Magnet.y)
import("CatEye magnet crank adapter.svg");
}
The translate
puts the profile approximately at the XY origin. The center = true
option moves the profile elsewhere on the XY plane, but does not center it, which may have something to do with the viewport used by LightBurn, the OpenSCAD version I’m using, or something else entirely.
In any event, the 3D printed mount fits the crank and puts the magnet where it will do the most good:

What looks like an obvious curvature mismatch comes from having the tape edge not quite squashed against the crank.
I should poke a channel through it for a cable tie around the crank, but that 3M foam tape is really good stuff and hasn’t failed me yet.
Oh, come on, Ed. Where’s the 3d printed crank, the sand mold, the flame and fire, the molten aluminum pour, and the made for perfection crank? I feel short changed ;-)
Reading those Home Shop Machinist articles about folks who casually make aluminum castings always fills me with longing, but it’s completely unrequited: too many projects boiling along already!