Share
 
 

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;
  • Divide blocks off: Blocks with blocksize X=2, Y=2, Z=2 are split off from the core fragment. This block fragment is referred to as blocks.
  • Assign cells: The structure cell cell1 is assigned to the remains of the core fragment, cell2 is assigned to the fragment blocks.
  • The final cleanup and the creation of the simulation are equivalent to Example 1.

Was this information helpful?