Voxelization¶
New in version 5.0.
voxelize
module provides functions for voxelizing NURBS volumes. voxelize()
also supports multi-threaded
operations via multiporcessing module.
Function Reference¶
-
geomdl.voxelize.
voxelize
(obj, **kwargs)¶ Generates binary voxel representation of the surfaces and volumes.
- Keyword Arguments:
grid_size
: size of the voxel grid. Default: (8, 8, 8)padding
: voxel padding for in-outs finding. Default: 10e-8use_cubes
: use cube voxels instead of cuboid ones. Default: Falsenum_procs
: number of concurrent processes for voxelization. Default: 1
Parameters: obj (abstract.Surface or abstract.Volume) – input surface(s) or volume(s) Returns: voxel grid and filled information Return type: tuple
-
geomdl.voxelize.
save_voxel_grid
(voxel_grid, file_name)¶ Saves binary voxel grid as a binary file.
The binary file is structured in little-endian unsigned int format.
Parameters: - voxel_grid (list, tuple) – binary voxel grid
- file_name (str) – file name to save