  It is shown how exactly solved edge interaction models on the square lattice,
may be extended onto more general planar graphs, with edges connecting a subset
of next nearest neighbour vertices of $\mathbb{Z}^3$. This is done by using
local deformations of the square lattice, that arise through the use of the
star-triangle relation. Similar to Baxter's Z-invariance property, these local
deformations leave the partition function invariant up to some simple factors
coming from the star-triangle relation. The deformations used here extend the
usual formulation of Z-invariance, by requiring the introduction of oriented
rapidity lines which form directed closed paths in the rapidity graph of the
model. The quasi-classical limit is also considered, in which case the
deformations imply a classical Z-invariance property, as well as a related
local closure relation, for the action functional of a system of classical
discrete Laplace equations.
