mymesh.rays.PointInSurf#
- mymesh.rays.PointInSurf(pt, NodeCoords, SurfConn, ElemNormals=None, Octree=None, eps=1e-08, ray=array([0.08451039, 0.1199149, 0.47645033]))[source]#
Test to determine whether a point is inside a surface mesh.
- Parameters:
pt (array_like) – 3D coordinates for point shape=(3,).
NodeCoords (array_like) – List of node coordinates of the surface
SurfConn (array_like) – Node connectivity of elements. This function is only valid for triangular surface meshes.
ElemNormals (array_like) – Element normal vectors
Octree (None, str, or octree.octreeNode, optional) – Determines whether to use/generate an octree data structure for acceleration of the intersection testing, by default None. ‘generate’ - Will generate an octree structure of the surface None - Will not use an octree structure octree.octreeNode - Octree data structure precomputed using
mymesh.octree.Surface2Octree()
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 surface, by default np.random.rand(3). For a closed, manifold surface, the choice of ray shouldn’t matter.
- Returns:
inside – True if the point is inside the surface, otherwise False.
- Return type:
bool