mymesh.rays.RayBoundaryIntersection#
- mymesh.rays.RayBoundaryIntersection(pt, ray, NodeCoords, BoundaryConn, eps=0)[source]#
Identify intersections between a ray and a boundary mesh of line elements. This is generally intended for 2D boundary meshes, though it will work in 3D as well.
- Parameters:
pt (array_like) – 3D point coordinate (shape = (3,))
ray (array_like) – 3D vector (shape = (3,))
NodeCoords (array_like) – nx3 list of node coordinates
BoundaryConn (array_like) – List of line element connectivities. This should have shape = (n,2)
eps (float, optional) – Small tolerance parameter, by default 1e-14
- Returns:
intersections (np.ndarray) – Indices of line segment elements that are intersected by ray.
distances (np.ndarray) – Distances between the point and the intersection points.
intersectionPts (np.ndarray) – Coordinates of intersection points for each intersection.