Share
 
 

Example 1

-- Getting volume data
volumedata = structure:findvolumedata ("volume data 1");

-- Getting cell
cell = structure:findcell ("diamond");

-- initializing
volumedata:reset ();

-- rastering the part
fragment = volumedata:addmeshtoraster ();

-- create shell (2 grid cells in each direction)
hull = fragment:createhull (3,3,3,3,3,3);

-- assign cell
fragment.cell = cell;

-- final cleanup
volumedata:cleanup ();

-- create simulation
structure.simulateafterexecution = true;

The first script example automatically executes the following working steps in the 3S module.

  • Getting volume data: The information of the volume data in the 3S Generator is loaded into the script, referred to as volumedata.
  • Getting Cell: The cell with the name diamond is loaded into the script and is referred to as cell.
  • Initializing: The part is cleared of all fragments.
  • Rastering the part: The part is gridded and a new fragment is created, overwriting all other fragments within the part. The new fragment is referred to as fragment in the script.
  • Create Shell: A hull of the fragment is created with the parameter 3 for all axes and all directions. The hull fragment is referred to as hull.
  • Assign cell: The structure cell cell is assigned to the core fragment fragment.
  • Final Cleanup: All empty fragments containing no more grid cells are removed.
  • Create Simulation: After execution of the script, a simulation of the part is created.

Was this information helpful?