get_ignore_inds

giant.ray_tracer.kdtree:

giant.ray_tracer.kdtree.get_ignore_inds(node, vertex_id)

This python/C helper function can be used to transverse a tree and find the ignore indices that should be used to ignore all facets sharing a particular vertex.

This is primarily used for coverage analysis when we are tracing starting at a vertex of a shape and want to make sure that the vertex doesn’t shadow itself. Essentially we transverse the tree and identify the unique ID for any geometry primitives that contain the supplied vertex. This is not super fast unfortunately.

Parameters:
  • node (KDNode) – the current node we are looking through

  • vertex_id (int) – The row index of the vertex we are looking for in the original vertices array

Returns:

A numpy array containing the ID for each geometry primitive that uses the supplied vertex. This can be passed as the Rays.ignore attribute for a ray to ignore that primitive when tracing