mymesh.octree.Octree2Voxel#

mymesh.octree.Octree2Voxel(root, mode='sparse')[source]#

Convert an octree to a voxel mesh

Parameters:
  • root (octree.OctreeNode) – Octree node from which the mesh will be generated.

  • mode (str, optional) – Determines voxelization mode. If “sparse”, only leaf nodes that contain data will be included, otherwise both leaf and empty nodes will be include, by default ‘sparse’.

Returns:

  • VoxelCoords (np.ndarray) – Node coordinates of the voxel mesh.

  • VoxelConn (np.ndarray) – Node connectivity of the hexahedral voxel mesh.