A crude method is to determine whether a given point is inside or outside based on how close it is to the nearest point in the given cloud. I'll illustrate with your example.
pts1 = RandomPointConfiguration[PoissonPointProcess[.6, 3],
Ball[{0, 0, 0}, 5]];
pts2 = RandomPointConfiguration[PoissonPointProcess[.6, 3],
Ball[{0, 10, 0}, 5]];
pts = Union[pts1["Points"], pts2["Points"]];
pltpts = Table[Point[pts[[i]]], {i, 1, Length[pts]}];
plt1 = Graphics3D[pltpts];
Define our "inside-outside" predicate based on a given epsilon.
nf = Nearest[pts -> "Distance"];
inside[pt : {_Real ..}, eps_] := nf[pt][[1]] <= eps
I'll choose epsilon as the mean of the all-closest-neighbors for the point cloud.
distances = nf[pts, 2][[All, 2]];
eps = Mean[distances]
(* Out[298]= 0.925333 *)
Now we can numerically integrate over the enclosing rectangle (if we did not know it, we could find it using MinMax on all point coordinates).
bnd = 5;
NIntegrate[
Boole[inside[{x, y, z}, eps]], {x, -bnd, bnd}, {y, -bnd,
3*bnd}, {z, -bnd, bnd}]
(* During evaluation of In[302]:= NIntegrate::slwcon: Numerical integration converging too slowly; suspect one of the following: singularity, value of the integration is 0, highly oscillatory integrand, or WorkingPrecision too small.
During evaluation of In[302]:= NIntegrate::eincr: The global error of the strategy GlobalAdaptive has increased more than 2000 times. The global error is expected to decrease monotonically after a number of integrand evaluations. Suspect one of the following: the working precision is insufficient for the specified precision goal; the integrand is highly oscillatory or it is not a (piecewise) smooth function; or the true value of the integral is 0. Increasing the value of the GlobalAdaptive option MaxErrorIncreases might lead to a convergent numerical integration. NIntegrate obtained 1007.5785551881089and 56.87577978459358 for the integral and error estimates. *)
(* Out[303]= 1007.58 *)
I will remark that his method is quite sensitive to the choice of the epsilon, and it will work poorly if the cloud is not in some sense dense. That it gave a viable result in this instance is mostly coincidence-- it really requires a thicker cloud.
ConcaveHullMesh, which is new in version 13, or theNonConvexHullMeshresource function from the Wolfram function repository? – MarcoB Apr 14 '22 at 02:12ConcaveHullMeshcan not construct a solid here since there some defect in such surface. – cvgmt Apr 14 '22 at 09:42