摘要: There are many scenarios where a 3D shape is represented by a voxel occupancy grid. Oftentimes it is desirable to convert data from this format to a triangulated mesh that represents the surface of the volume described by the occupied voxels. Algorithms such as Marching Cubes [8] or Dual Contouring [6] can be applied, or each square voxel face could be converted to two triangles directly [9]. Unfortunately, each of these approaches has their drawbacks. The input voxel grid describes a discretized surface. If this surface represents a flat region that is not axis-aligned, the discretization will result in a zig-zag pattern along the boundary voxels. Such artifacts remain in the output of the above traditional approaches, even though it is typically undesirable. Additionally, these approaches always output elements of uniform size. The output mesh uses many triangles to model flat regions, even though such a region could be modeled just as accurately with a few large elements. These downsides dramatically affect models that are piece-wise planar. This project proposes an alternate approach. Given a voxelized representation of a volume, the algorithm described below will fit a piece-wise planar surface to these voxels, then form a mesh on each planar regions with proportionally-sized triangles. The result is a watertight reconstruction which accurately represents the underlying shape with sharp features and far fewer elements.