Skip to content

Distance between meshes #2817

Answered by Fedr
oscalbert asked this question in Q&A
Discussion options

You must be logged in to vote

MeshLib has several functions for distance computation.

If we are talking about findSignedDistance:

/**
 * \brief computes minimal distance between two meshes
 * \param rigidB2A rigid transformation from B-mesh space to A mesh space, nullptr considered as identity transformation
 * \param upDistLimitSq upper limit on the positive distance in question, if the real distance is larger than the function exists returning upDistLimitSq and no valid points
 */
MRMESH_API MeshSignedDistanceResult findSignedDistance( const MeshPart & a, const MeshPart & b,
    const AffineXf3f* rigidB2A = nullptr, float upDistLimitSq = FLT_MAX );

then yes, if two bodies do not intersect, it will return the smalle…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by oscalbert
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants