Example 2

Example 2 is similar to Example 1, but contains one more cell and an additional fragmentation operation.

-- This is like Example 1
volumedata = structure:findvolumedata ("volume data 1");
cell1 = structure:findcell ("cell small");
cell2 = structure:findcell ("cell large");
volumedata:reset ();
fragment = volumedata:addmeshtoraster ();
hull = fragment:createhull (3,3,3,3,3,3);

-- divide blocks off
blocks = fragment:divideblocks (2,2,2,0,0,0);

-- assign cell
fragment.cell = cell1;
blocks.cell = cell2;

-- final cleanup
volumedata:cleanup ();
structure.simulateafterexecution = true;