Change a 3D plane to XY plane I have a 3D cloud of points from witch I determine an "average" plane.

The plane equation is Ax + By + Cz + D =0;

I would like to re-compute all the points to obtain their new position considering that "average" plane is the new XY plane.

I suppose I have to do first a Z translation of -D/C and then a rotation. 

Can someone give me the [3*3] rotation matrix?
Thank you Aretino for your answer.

I test your solution but I have a problem in some cases.  In my test, I first do a Z translation of –d/c to obtain a plan eq of ax + by + cz = 0 form then I do the 3D rotation provided in your answer.

It seems that, in some cases, I need to invert the sign of all my a/b/c/d plane coef. I can't understand the need of that inversion.

For example if I use the 3 following points:

P1[-18.17;-15.97;26.33]

P2[-42.52;10.93;19.09]

P3[7.84;10.59;46.09]

The plane eq is: 0.013586 x + 0.005496 y -0.025271 z + 1.000000 = 0

The compute matrix WITHOUT plane coefficients’ inversion is:

-0.602725  -0.648415   -0.465060

-0.648415  0.737670    -0.188150

0.465060   0.188150    -0.865054

The WRONG resulted points are (WITHOUT plane coefficients’ inversion):

-9.341623  -12.398300  -68.463539

-8.740604  24.596144   -68.463539

-51.429983 -13.388881  68.463539

The compute matrix WITH plane coefficients’ inversion (a=-a, b=-b...) is:

-0.602725  -0.648415   -0.465060

-0.648415  0.737670    -0.188150

0.465060   0.188150    -0.865054

The GOOD resulted points are (WITH plane coefficients’ inversion):

15.334650   -2.415010   68.463539

-10.820679 23.754607   68.463539

46.271901  26.138410   68.463539

You can find a 3D view of the result in the image provided.

Another question / remark: why the Z coordinates are not null after the transformation?
$\vec{n}=(A,B,C)$ is a vector perpendicular to your average plane, forming an angle $\theta$ with the $z$-axis. 
Consider the vector 
$\vec{n}'=(B,-A,0)$, which is perpendicular to the plane formed by $\vec{n}$ and $z$-axis: a rotation of angle $\theta$ around $\vec{n}'$ will carry $\vec{n}$ along the $z$-axis and is thus what you are looking for. The rotation matrix is then:
$$
\left(
\begin{array}{ccc}
 \frac{B^2}{A^2+B^2}+\frac{\left(1-\frac{B^2}{A^2+B^2}\right) C}{\sqrt{A^2+B^2+C^2}} &amp;
   -\frac{A B \left(1-\frac{C}{\sqrt{A^2+B^2+C^2}}\right)}{A^2+B^2} &amp;
   -\frac{A}{\sqrt{A^2+B^2+C^2}} \\
 -\frac{A B \left(1-\frac{C}{\sqrt{A^2+B^2+C^2}}\right)}{A^2+B^2} &amp;
   \frac{A^2}{A^2+B^2}+\frac{\left(1-\frac{A^2}{A^2+B^2}\right) C}{\sqrt{A^2+B^2+C^2}}
   &amp; -\frac{B}{\sqrt{A^2+B^2+C^2}} \\
 \frac{A}{\sqrt{A^2+B^2+C^2}} &amp; \frac{B}{\sqrt{A^2+B^2+C^2}} &amp;
   \frac{C}{\sqrt{A^2+B^2+C^2}}
\end{array}
\right)
$$