Volumetric Booleans in Report
This example shows how to create volumetric boolean operations between volumetric datasets.
# Get inputs, in this case the entities that will have they volumes computed
entityA = vf.input_entity("entityA", "Select Entity A", vf.type.voxel_generator | vf.type.voxel_terrain | vf.type.voxel_mesh)
entityB = vf.input_entity("entityB", "Select Entity B", vf.type.voxel_generator | vf.type.voxel_terrain | vf.type.voxel_mesh)
# Next, we will request to load voxel data for the entity
# We are only interested in volume, we will request no other attributes for voxels
voxelsA = vf.load_voxels(entityA, vf.attribute.volume, None)
voxelsB = vf.load_voxels(entityB, vf.attribute.volume, None)
voxels_union = vf.voxels_union(voxelsA, voxelsB, vf.attribute.volume, None)
voxels_intersection = vf.voxels_intersection(voxelsA, voxelsB, vf.attribute.volume, None)
voxels_complementAB = vf.voxels_complement(voxelsA, voxelsB, vf.attribute.volume, None)
voxels_complementBA = vf.voxels_complement(voxelsB, voxelsA, vf.attribute.volume, None)