6. For the frustum $O_{1} O_{2}$ with upper and lower base radii $r_{1}$ and $r_{2}$, and height $h$, the cone with $O_{1}$ as the vertex and the lower base of the frustum as the base is denoted as $V_{1}$, and the cone with $O_{2}$ as the vertex and the upper base of the frustum as the base is denoted as $V_{2}$. The volume of the part of the frustum $O_{1} O_{2}$ that is outside both cones $V_{1}$ and $V_{2}$ is $\qquad$
6. Solution: As shown in the figure, let $A_{1} A_{2}$ be a generatrix of the frustum, and let the intersection of $O_{1} A_{2}$ and $O_{2} A_{1}$ be $E$. Then, the required solid is formed by rotating $\triangle E A_{1} A_{2}$ around the line $O_{1} O_{2}$, so its volume should be
$$
V=V_{0}-V_{1}-V_{2}+V_{3}
$$

where $V_{0}$ is the volume of the frustum, and $V_{3}$ is the volume of the solid formed by rotating $\triangle E O_{1} O_{2}$ around the line $O_{1} O_{2}$.

It is easy to know that $V_{0}=\frac{\pi h}{3}\left(r_{1}^{2}+r_{1} r_{2}+r_{2}^{2}\right), V_{1}=\frac{\pi h}{3} r_{2}^{2}, V_{2}=$ $\frac{\pi h}{3} r_{1}^{2}$. Draw $E F \perp O_{1} O_{2}$, with foot $F$, then it is easy to calculate $E F=$ $\frac{r_{1} r_{2}}{r_{1}+r_{2}}$, thus $V_{3}=\frac{\pi h}{3}\left(\frac{r_{1} r_{2}}{r_{1}+r_{2}}\right)^{2}$, so $V=\frac{\pi h}{3} r_{1} r_{2}+$ $\frac{\pi h}{3}\left(\frac{r_{1} r_{2}}{r_{1}+r_{2}}\right)^{2}=\frac{\pi h}{3} \frac{r_{1} r_{2}\left(r_{1}^{2}+3 r_{1} r_{2}+r_{2}^{2}\right)}{\left(r_{1}+r_{2}\right)}$