Skip to content

Notebook 1 - Voxelization

    The following script will voxelize a given mesh. In regards to our project, we provide the script with a mesh of what we consider to be an acceptable maximum envelope for the context. Then the size of the voxels is provided. As mentioned in Voxel size - decision making we chose voxel sizes that are multiplications of 3.6. Our biggest chosen voxel size is 14.4, which is used to initially voxelize the envelope mesh. This collection of voxels is then saved in a three-dimensional lattice and exported.


Flowchart

    The flowchart as shown in Figure 23 is in the first (purple) section of the fundamental flowchart as shown in the Planning - products.

Flowchart - Voxelization
Figure 23: Flowchart - Voxelization

Pseudo code

This is the Pseudo code for Notebook 1.

Initialize large voxel size (14.4)
Load "envelope.stl"
Check if mesh is watertight
Visualize mesh
Forego the check for inside to use boundaries instead of mesh
  Create full_lattice conisiting of only 'True'
Reshape full_lattice to properly
create a tg lattice from full_lattice
export full_lattice to lattice_14_4.csv

Visualisations of the result

GIF

GIF - Voxel
Figure 24: GIF - Voxel

Voxelcloud

The result of voxelization at size 14,4 is shown in Figure 24.

Voxelized model
Figure 25: Voxelized model (14,4 x 14,4m)

Last update: January 27, 2021