voxelize [[-d] | {n}] [[-s] | {"%s %s %s"}] [[-t] | {f}] {new_obj old_obj} [old_obj1 old_obj2 ...]
VOXELIZE(nged)
NAME
voxelize - Takes as input a primitive or a collection of primitives, __old_obj__, and creates a region __new_obj__ which is the collection of voxels(RPPs) approximating the __old_obj__.
On this page
SYNOPSIS
DESCRIPTION
Takes as input a primitive or a collection of primitives ,old_obj, and creates a region new_obj which is the collection of voxels(RPPs) approximating the old_obj. The -d option specifies the level of detail (precision in approximation of volume) required (default is 1). An argument of n means that n * n rays will be shot through each row, and an approximation of volume filled in each voxel region is reached averaging these n * n values. The -s option lets the user specify the voxel size in each direction (default is 1, 1, 1 in current units). Note that setting the voxel size too small can increase the filesize exponentially. The -t option specifies the threshold volume to decide if voxel is to be included in the voxelized output (default is .5). The threshold should always be a value between 0 and 1.
EXAMPLES
The following example shows the use of the voxelize command to create a voxelized version of an existing object (old_object) and naming the output(new_object).
- mged> voxelize -d 2 -s "100 100 100" -t 0.3 newregion.r oldregion.r
-
Creates a voxelized region corresponding to the original region oldregion.r.
The region newregion.r consists of the resulting voxels.
The -d 2 option means that on each voxel row, 2*2(=4) rays are uniformly shot over the area and an approximation of the volume is reached from the raytrace data of these four rays.
-s "100 100 100" sets the size of the voxels as 100 current units in each dimension. Note that setting the voxel size too small can increase the filesize exponentially.
-t 0.3 means that a voxel region is considered to be "filled" if the approximated volume of oldregion.r filling this voxel region is 30% of its total volume.
AUTHOR
BRL-CAD Team
BUG REPORTS
Reports of bugs or problems should be submitted via electronic mail to devs@brlcad.org