Hi Zhen,

Since you are interested in the void size distribution, you want to identify the individual voids in the material and determine their sizes, right?

Yes, in principle you can do this by taking the triangle mesh generated by the Construct Surface Mesh modifier, decompose it into disconnected components, one component (polyhedron) per void. For each mesh component, you would then have to calculate the volume it encloses. That is probably the hardest part, because the voids may be non-convex, and calculating the volume of a general non-convex polyhedron is not trivial.

The

SurfaceMesh class of the OVITO 3.0 Python interface gives you programmatic access to the vertices and triangles of the surface mesh. From here on you are on your own though. OVITO doesn't provide any built-in functions for calculating the volumes, and I am not working on any such functionality at the moment.

Best regards,

-Alex