The adaptive grid function generates a regular euclidean grid inside a given closed volume (container). Unlike the conformal grid this grid is built independent of the bounding volume and is modified after words to match the container’s shape.
Origin: A 3D float array defining the origin of the euclidean grid.
Volume: The .stp or .igs file name of the closed container.
Cell Size: Float indicating step size of the grid.
Output: Name of the resultant .json file storing the grid information.
T: [YOUR SECRET TOKEN]
Direct Output: The input of true or false, defines whether to send content of result file directly instead of its storage location.
Unitize: The input of true or false,defines whether to redivide the surface in unitized way.
-sets the step size of the euclidean grid filling the volume.
-sets the closed volume that will be filled with the regularized grid.
.setOrigin([float, float, float]):
-sets the 3D origin point of the euclidean grid that will fill the volume.
-Sets the output file name of the adaptive grid that is created by the .genGrid() method
-Generates the grid needed to populate the final lattice
A .json file listing the eight corners that define each cell.
Input Volume File Format
To create an adaptive grid structure you need a CLOSED polysurface/surface .stp or .igs file (shown below). Once you have uploaded the file, use the .setVolume() method to assign this volume to your adaptive lattice object.
genysis.upload("EXPORTS/handleVol.stp","volume.stp",token) lattice = genysis.adaptiveLattice() lattice.setVolume('volume.stp')
Once the volume is defined you can set the cell size and output file using the .setCellSize() and .setGridOuput() methods respectively. Finally use the .genGrid() method to generate the adaptive lattice grid.
lattice.setGridOutput('handleAdaptiveGrid.json') lattice.setCellSize(7) lattice.genGrid(token) genysis.visualize('handleAdaptiveGrid.json',token,True)
Visualizing the grid you should see something like the screen shot below.
If the cells at the boundary are too distorted or squished. You can manipulate the origin of the adaptive grid to shift the cells in any direction using the .setOrigin() method.