I’m trying to approximate any geometry by voxels. Afterwards, I’d like to join all voxels into one solid. The end result I need are the joined (non-pixelated) surfaces of these resulting solids, which approximate my input geometry.
I keep running into a problem with the Solid Union component; for some geometry it is unable to join all the voxels into one solid. I’ve included the script I’m currently working on;
- The inputs are two breps which are rotated into random orientations.
- First it extracts the union bounding box to get the dimensions for the voxel grid.
- Second, it performs an inclusion test on these points, and culls the rest.
- Third, it creates voxels with these points as centers.
- Fourth, it tries to perform a solid union for these voxels; for the first set of voxels it works. For the second set it fails with the following error: Boolean Union Set is empty.
- Finally, I offset the faces to join them into single surfaces, to finally join them into one solid (this part may be unnecessary; other suggestions are welcome. I’m trying to get the resulting joined surfaces of this one combined solid.
Any idea’s as to why the Solid Union doesn’t perform as expected on some sets of voxels?