find_closest_nodes Module
- defines:
nids_close = find_closest_nodes(nodes_xyz, nids, xyz_compare, neq_max, tol)
ieq = find_closest_nodes_index(nodes_xyz, xyz_compare, neq_max, tol)
- pyNastran.bdf.mesh_utils.find_closest_nodes.find_closest_nodes(nodes_xyz: Any, nids: Any, xyz_compare: Any, neq_max: int = 1, tol: float | None = None, msg: str = '') Any[source]
Finds the closest nodes to an arbitrary set of xyz points
- Parameters:
- nodes_xyz(Nnodes, 3) float ndarray
the source points (e.g., xyz_cid0)
- nids(Nnodes, ) int ndarray
the source node ids (e.g.; nid_cp_cid[:, 0])
- xyz_compare(Ncompare, 3) float ndarray
the xyz points to compare to; xyz_to_find
- tolfloat; default=None
the max spherical tolerance None : the whole model
- neq_maxint; default=1
the number of “close” points
- msgstr; default=’’
custom message used for errors
- Returns:
- nids_close: (Ncompare, ) int ndarray
the close node ids
- pyNastran.bdf.mesh_utils.find_closest_nodes.find_closest_nodes_index(nodes_xyz: Any, xyz_compare: Any, neq_max: int, tol: float, msg: str = '')[source]
Finds the closest nodes to an arbitrary set of xyz points
- Parameters:
- nodes_xyz(Nnodes, 3) float ndarray
the source points
- xyz_compare(Ncompare, 3) float ndarray
the xyz points to compare to
- neq_maxint
the number of “close” points (default=4)
- tolfloat
the max spherical tolerance
- msgstr; default=’’
error message
- Returns:
- slots(Ncompare, ) int ndarray
the indices of the close nodes corresponding to nodes_xyz