6. (10 points) Fill the circles in the figure with $1,2,3,4,5,6,7,8,9$, with each circle containing exactly one number, satisfying the following conditions:
(1) The sum of the numbers on each side of the equilateral triangle is equal;
(2) The sum of the squares of the numbers on each side of the equilateral triangle, when divided by 3, leaves the same remainder.
How many different ways are there to fill in the numbers?
(Note: Arrangements that are the same after rotation or reflection are considered the same method.)
【Analysis】First, represent the numbers at each position, list the sum of the numbers, express the square relationship, and finally enumerate and discuss according to the remainder when divided by 3.

【Solution】According to the problem, we set the letters as shown in the figure:
$$
\begin{array}{l}
a+b+c+d=d+e+f+g=g+h+i+a=P . \\
a^{2}+b^{2}+c^{2}+d^{2}=d^{2}+e^{2}+f^{2}+g^{2}=g^{2}+h^{2}+i^{2}+a^{2}=Q(\bmod 3) \\
\text { From } 3 P=a+b+c+d+d+e+f+g+g+h+i+a=45+a+d+g
\end{array}
$$

We get $a+d+g=0(\bmod 3)(3)$
$$
3 Q=a^{2}+b^{2}+c^{2}+d^{2}+d^{2} e^{2}+f^{2}+g^{2}+g^{2}+h^{2}+i^{2}+a^{2}=285+a^{2}+d^{2}+g^{2} \text {. }
$$

We get: $a^{2}+d^{2}+g^{2}=0(\bmod 3)(4)$
From (3) and (4), we get $a=d=g=0 (\bmod 3)$.
Classify by remainder: $3,6,9$ have a remainder of $0, 1,4,7$ have a remainder of $1, 2,5,8$ have a remainder of 2.
First, set $a=1, d=4, g=7$.
Then $b+c+e+f+h+i=45-12=33$.
So $b+c+e+f+h+i=3(b+c)-6-3, b+c=14$.
(1) $, b+c=9+5, e+f=2+6, h+i=8+3$ Since the middle numbers on both sides can be swapped, there are $2^{3}=8$ cases.
(2) $, b+c=8+6, e+f=3+5, h+i=9+2$, which is another 8 cases.

For $a=2, d=5, g=8$ and $a=3, d=6, g=9$, there are 16 cases each. Therefore, there are a total of 48 cases.
In summary, there are 48 cases.