mymesh.rays.SurfSelfIntersection#

mymesh.rays.SurfSelfIntersection(NodeCoords, SurfConn, Octree='generate', eps=1e-14, return_pts=False)[source]#

Identify self intersections in a mesh

Parameters:
  • NodeCoords (array_like) – Node coordinates

  • SurfConn (array_like) – Node connectivity of a triangular surface mesh

  • Octree (str, octree.OctreeNode, optional) – Octree node (generated by octree.Surf2Octree), ‘generate’, or None, by default ‘generate’.

  • eps (float, optional) – Small tolerance parameter, by default 1e-14

  • return_pts (bool, optional) – If true, return the coordinates of intersections, by default False

Returns:

  • IntersectionPairs (np.ndarray) – Array of indices indicating pairs of elements that interesect each other

  • IntersectionPoints (np.ndarray, optional) – Coordinates of intersections, returned if return_pts=True. Intersection points are given for each intersection pair in a 3d (n,m,3) array where n = len(IntersectionPairs) and the second axis is padded with np.nan to ensure a rectangular array.