Is there a true parallel between Gibbs' phase rule and Euler's polyhedral formula?

The "$2$" in the "phase rule" conventionally written as $F=C-P+2$, where $F$ is the degrees of freedom, $C$ is the number of components and $P$ is the number of phases, refers to the temperature and pressure that are the usual intensive parameters in chemical equilibrium of several phases and components. But this equation is only a special case of a more general one where there are other intensive parameters representing other than thermal and mechanical interactions, such as magnetic or electric fields. In fact, if the number of possible non-chemical interactions is denoted by $N$ then the phase rule is $F=C-P+N$ where now we can count the temperature for thermal and pressure for volumetric mechanical among the possible non-chemical interactions, if any. $C$ can be viewed as representing the number of chemical interactions, if you wish. (I think the connection between the formulas of Euler and Gibbs are as deep or shallow as that two assassinated Presidents Lincoln and Kennedy both had VPs named Johnson...)