In fact, almost all piston engines do this same thing. What I keep not realizing is that you need to hold the straight part straight or it doesn't work. Not "it doesn't go straight" but not work at all.
Let me show you what I mean
I think the reason I keep forgetting this is that the movement looks so smooth. It doesn't seem like there could be that much friction there, but there must be. The piston is rubbing against the sides. Not (just) because of a tight fit, but out of sheer necessity to make the piston run straight.
There are linkages that have been invented that can convert rotary motion to linear without all the side friction. For instance, here. A 3D version of that linkage is in the Boston Museum of Science. Another picture of Peaucellier is here and the page also calls my "locomotive linkage" a "sewing machine".
Peaucellier isn't very practical because it requires so many parts, which take up space and can fail. Or can it be made simply? Can another practical, mathematically accurate, low-friction linkage be built? In Lego?