The dot product is given by:
\[
\vec{a} \cdot \vec{b} = |\vec{a}||\vec{b}|\cos\theta.
\]
The cross product magnitude is:
\[
|\vec{a} \times \vec{b}| = |\vec{a}||\vec{b}|\sin\theta.
\]
Given that \( |\vec{a} \cdot \vec{b}| = |\vec{a} \times \vec{b}| \), we equate:
\[
|\vec{a}||\vec{b}|\cos\theta = |\vec{a}||\vec{b}|\sin\theta.
\]
Dividing both sides by \( |\vec{a}||\vec{b}| \) (assuming nonzero vectors),
\[
\cos\theta = \sin\theta.
\]
Solving \( \tan\theta = 1 \), we get:
\[
\theta = 45^\circ \text{ or } \frac{\pi}{4}.
\]