  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 O$_6$ octahedra with
one common oxygen -- common corner of neighboring octahedra and with $\sim
180^{\circ}$ 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 $\sim 90^{\circ}$ 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.
