mymesh.tree.Edges2Quadtree#
- mymesh.tree.Edges2Quadtree(NodeCoords, LineConn, minsize=None, maxdepth=5)[source]#
Generate an octree representation of a line mesh. The quad will be refined until each node contains only one line or the maximum depth or minimum size criteria are met. Each node contains a list of element ids corresponding to the elements that are contained within that node in the OctreeNode.data field.
- Parameters:
NodeCoords (array_like) – Node coordinates of the line mesh
LineConn (array_like) – Node connectivity of the line mesh. This must have shape (n,2) array or list.
minsize (float, optional) – Minimum size for an octree node, by default None. If supplied, octree nodes will not be divided to be smaller than this size.
maxdepth (int, optional) – Maximum depth of the octree, by default 5
- Returns:
root – Root node of the generate quadtree
- Return type: