For a gas confined between surfaces held at different temperatures the velocity distribution shows a significant deviation from the Maxwell distribution when the mean free path of the molecules is comparable to or larger than the channel dimensions. If one of the surfaces is suitably structured, this nonequilibrium distribution can be exploited for momentum transfer in a tangential direction between the two surfaces. This opens up the possibility to extract work from the system which operates as a heat engine. Since both surfaces are held at constant temperatures, the mode of momentum transfer is different from the thermal creep flow that has gained more attention so far. This situation is studied in the limit of free-molecular flow for the case that an unstructured surface is allowed to move tangentially with respect to a structured surface. Parameter studies are conducted, and configurations with maximum thermodynamic efficiency are identified. Overall, it is shown that significant efficiencies can be obtained by tangential momentum transfer between structured surfaces.