Can you calculate the common volume on excel using Boolean Operation I would like to calculate the common volume of a solid like the one below but at different angles. I can achieve this using ANSYS Design but I was wondering whether it is possible to calculate this on excel or could I program the Boolean Operation into fortran at all? 
How does the Boolean operation work on ANSYS to calculate the common volume?
Thank you for your help!!

 A: Essentially, the calculation required is:
$$
||\Omega|| := \iiint\limits_{\Omega} 1\,\text{d}x\,\text{d}y\,\text{d}z
$$
with:
$$
\Omega := 
\left\{
(x,\,y,\,z) \in \mathbb{R}^3 : 
\begin{aligned}
& x^2+y^2+z^2 - \frac{\left(l_1\,x+m_1\,y+n_1\,z\right)^2}{l_1^2+m_1^2+n_1^2} \le R_1^2\,, \\
& x^2+y^2+z^2 - \frac{\left(l_2\,x+m_2\,y+n_2\,z\right)^2}{l_2^2+m_2^2+n_2^2} \le R_2^2\,, \\
& x^2+y^2+z^2 - \frac{\left(l_3\,x+m_3\,y+n_3\,z\right)^2}{l_3^2+m_3^2+n_3^2} \le R_3^2
\end{aligned}
\right\}
$$
where the integration domain consists of the intersection of three cylinders with axis passing through the origin, of direction $(l_i,\,m_i,\,n_i) \ne (0,\,0,\,0)$ and of radius $R_i > 0$, with $i = 1,\,2,\,3$.
Now, using Wolfram Mathematica 12.0, defining:
{l1, m1, n1, R1} = {1, 0, 0, 1};
{l2, m2, n2, R2} = {0, 1, 0, 1};
{l3, m3, n3, R3} = {0, 0, 1, 1};

cyl1 = (x^2 + y^2 + z^2) - (l1 x + m1 y + n1 z)^2 / (l1^2 + m1^2 + n1^2) - R1^2;
cyl2 = (x^2 + y^2 + z^2) - (l2 x + m2 y + n2 z)^2 / (l2^2 + m2^2 + n2^2) - R2^2;
cyl3 = (x^2 + y^2 + z^2) - (l3 x + m3 y + n3 z)^2 / (l3^2 + m3^2 + n3^2) - R3^2;

Ω = ImplicitRegion[cyl1 <= 0 && cyl2 <= 0 && cyl3 <= 0, {x, y, z}];

and writing:
ContourPlot3D[{cyl1 == 0, cyl2 == 0, cyl3 == 0}, {x, -2, 2}, {y, -2, 2}, {z, -2, 2}]
RegionPlot3D[cyl1 <= 0 && cyl2 <= 0 && cyl3 <= 0, {x, -1, 1}, {y, -1, 1}, {z, -1, 1}]

we can get an idea about the layout of the cylinders and the shape of $\Omega$:



while writing:
Integrate[1, {x, y, z} ∈ Ω]
NIntegrate[1, {x, y, z} ∈ Ω, PrecisionGoal -> 10, WorkingPrecision -> 10]

it's possible to calculate the $\Omega$ measure:

8 (2 - √2)
4.686291501

where the exact result can only be obtained in very particular cases such as the one shown in this example. Having understood all this, the rest comes by itself, as it's very simple both to change the angles and radii of each cylinder and to add any other cylinders.
That said, right now I would have no idea how to write an algorithm to be implemented, for example, in VBA in Microsoft Excel, so as to calculate the volume numerically.
