mymesh.rays.PointsInSurf#
- mymesh.rays.PointsInSurf(pts, NodeCoords, SurfConn, ElemNormals=None, Octree='generate', eps=1e-08, rays=None)[source]#
- Test to determine whether points are inside a surface mesh. - Parameters:
- pts (array_like) – 3D coordinates for the points shape=(n,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, NoneType, optional) – Element normal vectors. If None are provided, they will be calculated. 
- Octree (None, str, or tree.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 tree.octreeNode - Octree data structure precomputed using - mymesh.tree.Surface2Octree()
- eps (float, optional) – Small parameter used to determine if a value is sufficiently close to 0, by default 1e-8 
- rays (array_like, optional) – Rays that will be cast to determine whether the points are 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:
 
