  Using $e^+e^-$ annihilation data corresponding to an integrated luminosity of
2.93 fb$^{-1}$ taken at a center-of-mass energy of 3.773 GeV with the BESIII
detector, we report the first measurements of the branching fractions of the
inclusive decays $D^0\to \pi^+\pi^+\pi^-X$ and $D^+\to \pi^+\pi^+\pi^-X$, where
pions from $K^0_S$ decays have been excluded from the $\pi^+\pi^+\pi^-$ system
and $X$ denotes any possible particle combination. The branching fractions of
$D^0(D^+)\to \pi^+\pi^+\pi^-X$ are determined to be ${\mathcal B}(D^0\to
\pi^+\pi^+\pi^-X)=(17.60\pm0.11\pm0.22)\%$ and ${\mathcal B}(D^+\to
\pi^+\pi^+\pi^-X)=(15.25\pm0.09\pm0.18)\%$, where the first uncertainties are
statistical and the second systematic.
