Model.voxel_lattice_hex_mesh_add_volume#
- Model.voxel_lattice_hex_mesh_add_volume(x, y, z)#
Adds a volume surrounding a given point to the voxel domain. The volume is determined by the elements that are part of the domain when this function is run. This must be preceded by a call to
Model.voxel_lattice_hex_mesh_init()and must be followed by a call toModel.voxel_lattice_hex_mesh_create().- Parameters:
x (double) – The x-coordinate of the point inside the volume.
y (double) – The y-coordinate of the point inside the volume.
z (double) – The z-coordinate of the point inside the volume.
Example#
Create voxels of size 10.0 to include components with IDs 100 - 110 and volume surround ( 50,50,50 )#import hm import hm.entities as ent model = hm.Model() # Creating a collection that contains the components to be included filter_in_components = hm.FilterByEnumeration(ent.Component, list(range(100, 111))) in_component_collection = hm.Collection(model, filter_in_components) model.voxel_lattice_hex_mesh_init(voxel_size=10.0) model.voxel_lattice_hex_mesh_add_entities(collection=in_component_collection, mode=1) model.voxel_lattice_hex_mesh_add_volume(x=50.0, y=50.0, z=50.0) model.voxel_lattice_hex_mesh_create() model.voxel_lattice_hex_mesh_end()