Model.voxel_lattice_hex_mesh_add_box#
- Model.voxel_lattice_hex_mesh_add_box(collection, x1, y1, z1, x2, y2, z2, i1, j1, k1, i2, j2, k2)#
Adds elements within a box to the include entities in the voxel domain. The elements are determined by the box with the given input lower and upper corner coordinates, and components of x and y axes of the box along the global axis system. This function internally adds the triangulation elements to the voxel mesh creation if there are any gaps, holes, or openings between the intersection of the box faces with the shell elements bound by the box.
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:
collection (Collection) – The collection containing the element entities to be inlcuded. This collection should be defined as empty.
x1 (double) – The x coordinate of the lower corner in the global system.
y1 (double) – The y coordinate of the lower corner in the global system.
z1 (double) – The z coordinate of the lower corner in the global system.
x2 (double) – The x coordinate of the upper corner in the global system.
y2 (double) – The y coordinate of the upper corner in the global system.
z2 (double) – The z coordinate of the upper corner in the global system.
i1 (double) – The i-th component of the x-axis of the box at the lower corner of the box along the global x axis.
j1 (double) – The j-th component of the x axis of the box at the lower corner of the box along the global x axis.
k1 (double) – The k-th component of the x axis of the box at the lower corner of the box along the global x axis.
i2 (double) – The i-th component of the y axis of the box at the lower corner of the box along the global x axis.
j2 (double) – The j-th component of the y axis of the box at the lower corner of the box along the global x axis.
k2 (double) – The k-th component of the y axis of the box at the lower corner of the box along the global x axis.
Example#
Add elements within the box with corners at ( 100 , 100 , 100 ) and ( 400 , 400 , 400 ) and generate a voxel mesh of size 5.0#import hm import hm.entities as ent model = hm.Model() # Defining the empty collection of elements element_collection = hm.Collection(model, ent.Element, populate=False) model.voxel_lattice_hex_mesh_init(voxel_size=5.0) model.voxel_lattice_hex_mesh_add_box( collection=element_collection, x1=100.0, y1=100.0, z1=100.0, x2=400.0, y2=400.0, z2=400.0, i1=0.0, j1=1.0, k1=0.0, i2=0.0, j2=1.0, k2=0.0, ) model.voxel_lattice_hex_mesh_create() model.voxel_lattice_hex_mesh_end()