Martensitic transformations, viewed as continuous mappings between triply periodic minimal surfaces (TPMSs), as suggested by Hyde and Andersson (Z. Kristallogr. 1986, 174, 225-236), are extended to include paths between the initial and final phases. Reversible transformations, which correspond to shape-memory materials, occur only if lattice points remain at flat points on a TPMS throughout a continuous transformation. For the shape-memory material NiTi, the density functional calculations by Hatcher et al. [Phys. Rev. B 2009, 80, 144203] yield irreversible and reversible paths with and without energy barriers, respectively, in agreement with our theory. Although there are TPMSs for face-centered and body-centered cubic crystals for iron, the deformation between them is not reversible, in agreement with the non-vanishing energy barriers obtained from the density functional calculations of Zhang et al. (RSC Advances 2021, 11, 3043-3048).