mymesh.rays.PointInBoundary#
- mymesh.rays.PointInBoundary(pt, NodeCoords, BoundaryConn, eps=1e-08, ray=None)[source]#
Test to determine whether a point is inside a boundary mesh. By default, this test assumes a 2D mesh parallel to the xy plane. For a boundary mesh in another plane, the ray argument should be modified.
- Parameters:
pt (array_like) – 3D coordinates for point shape=(3,).
NodeCoords (array_like) – List of node coordinates of the surface
BoundaryConn (array_like) – Node connectivity of elements. This function is only valid for triangular surface meshes.
ElemNormals (array_like) – Element normal vectors
eps (float, optional) – Small parameter used to determine if a value is sufficiently close to 0, by default 1e-8
ray (array_like, optional) – Ray that will be cast to determine whether the point is inside or outside the boundary, by default a random unit vector parallel to the xy plane will be used. For a closed boundary, the choice of ray shouldn’t matter as long as the ray is in the same plane as the boundary.
- Returns:
inside – True if the point is inside the surface, otherwise False.
- Return type:
bool