trimesh.comparison

comparison.py

Provide methods for quickly hashing and comparing meshes.

trimesh.comparison.identifier_hash(identifier)

Hash an identifier array in a way that is hand-tuned to be somewhat robust to likely changes.

Parameters:

identifier ((n,) float) – Vector of properties

Returns:

hash – A SHA256 of the identifier vector at hand-tuned precision.

Return type:

(64,) str

trimesh.comparison.identifier_simple(mesh)

Return a basic identifier for a mesh consisting of properties that have been hand tuned to be somewhat robust to rigid transformations and different tessellations.

Parameters:

mesh (trimesh.Trimesh) – Source geometry

Returns:

identifier – Identifying values of the mesh

Return type:

(7,) float