warp.mesh_query_point_sign_winding_number#

warp.mesh_query_point_sign_winding_number(
id: uint64,
point: vec3f,
max_dist: float32,
accuracy: float32,
threshold: float32,
) MeshQueryPoint#
  • Kernel

  • Differentiable

Compute the closest point on the warp.Mesh with identifier id to the given point in space.

Identifies the sign using the winding number of the mesh relative to the query point. This method of sign determination is robust for poorly conditioned meshes and provides a smooth approximation to sign even when the mesh is not watertight. This method is the most robust and accurate of the sign determination meshes but also the most expensive.

Note

The warp.Mesh object must be constructed with support_winding_number=True for this method to return correct results.

Parameters:
  • id – The mesh identifier

  • point – The point in space to query

  • max_dist – Mesh faces above this distance will not be considered by the query

  • accuracy – Accuracy for computing the winding number with fast winding number method utilizing second-order dipole approximation, default 2.0

  • threshold – The threshold of the winding number to be considered inside, default 0.5.