1. A non-transitory computer-readable recording medium storing a voxelization program that causes a computer to execute a process for extracting a free space in a product based on three-dimensional shape data of the product, the three-dimensional shape data being created by a three-dimensional CAD (Computer Aided Design) and received by the computer, the process comprising: voxelizing the three-dimensional shape data to generate a first voxel structure corresponding to the three-dimensional shape data; specifying, in a case where lines perpendicular to respective faces of a cube or a cuboid containing the generated first voxel structure are extended from the respective faces toward inside the cube or the cuboid until the lines hit the first voxel structure, a region outside an outer periphery of the first voxel structure according to whether at least lines extended from three faces orthogonal to each other intersect; setting the specified region as a second voxel structure, and obtaining a third voxel structure by adding the first voxel structure and the second voxel structure; and performing an inversion where, in the third voxel structure obtained, a region set as a voxel structure is set as a non-voxel structure and a region not set as a voxel structure is set as a fourth voxel structure, and specifying first regions as a fifth voxel structure through which a sphere or cube of a specific size is allowed to continuously pass in a region set as the fourth voxel structure resulting from the inversion, the fifth voxel structure corresponding to the free space.