主权项 |
1. A method for generating a representation of just an outer layer of a three-dimensional object, the object represented by a plurality of two-dimensional triangles, the method comprising:
receiving the plurality of two-dimensional triangles representing the object; determining a three-dimensional bounding box having dimensions sufficient to encapsulate the object, the bounding box being comprised of a plurality of voxels, wherein each voxel in the bounding box has a state value associated thereto, wherein the state value of each voxel is initially assigned a default value; determining an intersecting set of voxels from the plurality of voxels, wherein each member of the intersecting set of voxels intersects with at least one triangle of the plurality of triangles; changing the state value of the voxels in the intersecting set of voxels from the default value to a first value; determining an outer set of voxels from the intersecting set of voxels, wherein each member of the outer set of voxels shares a face with a voxel that is not a member of the intersecting set of voxels; determining a non-intersecting set of voxels from the plurality of voxels, wherein the state values of the voxels of the non-intersecting set of voxels are equal to the default value after the intersecting set of voxels is determined; for each particular voxel having the first value as the state value:
identifying a neighboring voxel that shares a face with the particular voxel; andchanging the state value of the neighboring voxel to a second value if the state value of the neighboring voxel is determined to be equal to the first value and the neighboring voxel shares a face with at least one voxel in the non-intersecting set of voxels; and isolating the voxels having the second value as the state value and generating the representation of just the outer layer of the three-dimensional objection therefrom. |