4. In Rt $\triangle A B C$, $\angle A C B=90^{\circ}$, on the hypotenuse $A B$ respectively intercept $A D=$
$$
A C, B E=B C, D E=6 \text{, }
$$
$O$ is the circumcenter of $\triangle C D E$, as shown in Figure 2. Then the sum of the distances from $O$ to the three sides of $\triangle A B C$ is . $\qquad$
4.9.

As shown in Figure 8, connect
$$
O A, O B, O C, O D \text {, and }
$$
$O E$.
Since $O C=O D$,

we know that point $O$ lies on the perpendicular bisector of segment $C D$.
Also, $A D=A C$, so $O A$ bisects $\angle C A D$.
Similarly, $O B$ bisects $\angle C B D$.
Therefore, $O$ is the incenter of $\triangle A B C$.
Thus, the distances from point $O$ to the three sides of $\triangle A B C$ are all equal to the radius of the incircle of the right triangle $\triangle A B C$. This radius is
$$
\begin{array}{l}
\frac{1}{2}(A C+B C-A B) \\
=\frac{1}{2}(A D+B E-A B)=\frac{1}{2} D E=3 .
\end{array}
$$

Therefore, the required sum is $3 \times 3=9$.