We analyze the role of local geometry in the spin and orbital interaction in
transition metal compounds with orbital degeneracy. We stress that the tendency
observed for the most studied case (transition metals in O6 octahedra with
one common oxygen -- common corner of neighboring octahedra and with ∼180∘ metal--oxygen--metal bonds), that ferro-orbital ordering renders
antiferro-spin coupling, and, {\it vice versa}, antiferro-orbitals give
ferro-spin ordering, is not valid in general case, in particular for octahedra
with common edge and with ∼90∘ M--O--M bonds. Special attention is
paid to the ``third case'', neighboring octahedra with common face (three
common oxygens) -- the case practically not considered until now, although
there are many real systems with this geometry. Interestingly enough, the
spin--orbital exchange in this case turns out to be to be simpler and more
symmetric than in the first two cases. We also consider, which form the
effective exchange takes for different geometries in case of strong spin--orbit
coupling.Comment: 31 pages, 9 figures, submitted to JET