JoshDragon
JoshDragon

Reputation: 33

How to calculate the thickness of a mesh

I have models of some helmets that were laser scanned inside and out to create a full representation. I would like to create a texture for the mesh of each that represents the thickness of the helmet, somewhat like a 'heatmap' for thickness. I realize the calculation of thickness is not straightforward, but what I'm looking to calculate is the thickness of the metal of the helmet.

Can anyone please recommend a software/workflow which can be used to achieve this? Open source preferred, currently using Blender, Meshlab, and Slice 3D, but will use whatever is necessary.

Upvotes: 3

Views: 1968

Answers (2)

Fedor
Fedor

Reputation: 21317

There are at least two methods how to measure the thickness of an object with boundary given as a mesh as explained in "Shrinking sphere: A parallel algorithm for computing the thickness of 3D objects" article:

  1. Ray method, which casts a ray inside the mesh and measures the distance where it encounters with a triangle from the opposite side.

  2. Maximal inscribed sphere method, which in each point finds the sphere fully located inside the object and touching it in that point in some other point.

Here is an example of their results on Dragon mesh (red - small thickness, green - large thickness).

Ray method:

Ray method

Maximal inscribed sphere method:

Maximal inscribed sphere method

As you can see Ray method always returns same or a larger value than Maximal inscribed sphere method, but Ray method is faster to compute.

Can anyone please recommend a software/workflow which can be used to achieve this? Open source preferred, currently using Blender, Meshlab, and Slice 3D, but will use whatever is necessary.

Both methods can be found e.g. in MeshInspector software, and open source MeshLib library (see MeshLib/source/MRMesh/MRMeshThickness.h) in its foundation, in which I had pleasure to contribute.

Upvotes: 0

ALoopingIcon
ALoopingIcon

Reputation: 2368

MeshLab has the Shape Diameter Function that computes what is a good generic definition of the thickness of a mesh. For an example of its usage, follow this example inside MeshLab (each line one filter):

  • create a sphere (subdiv lev 2)
  • apply random displacement to vertexes (displacement 2%)
  • apply loop subdivision (3 iter) to get a smooth wavy sphere)
  • create another smaller smooth sphere (radius 0.9, subdiv 5)
  • invert this sphere
  • flatten the two layers into a single mesh (at this point you have a single mesh composed by two concentric spheres, one inside, perfectly round and one outside wavy)
  • apply Shape Diameter function (256 sample, 60 degree cone radius)
  • apply Colorize by vertex quality

The result is encoded in quality and here you see it mapped into color; you can see how thicker regions correctly correspond to larger quality values.

enter image description here

Upvotes: 1

Related Questions