Conformal Grid
Endpoint: https://studiobitonti.appspot.com/conformalGrid
The conformal grid function generates a grid structure inside a given volume defined by four surfaces. The difference between a conformal and adaptive grid is that the interior units of the conformal grid are shaped based on the boundary surfaces of the volume.
Attributes:
U: Input the number of grid cells in u direction.
V: Input number of grid cells in v direction.
W: Input number of grid cells in w direction.
Top: Name of uploaded .stp file
Bot: Name of uploaded .stp file (opposite of the Top Surface)
Side1: Name of uploaded .stp file
Side2: Name of uploaded .stp file
Filename: Name of the resultant .obj file for the lattice unit.
T: [YOUR SECRET TOKEN]
Optional:
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.
Methods:
.setUVW(U,V,W):
-sets the dimensions of the conformal lattice
.setSurfaces(top=‘top.igs’, bot=‘bot.igs’, side1=‘side1.igs’, side2=‘side2.igs’):
-Assign the four surfaces that must create a closed volume to the object
.setGridOuput(‘grid.json‘):
-Sets the output file name of the conformal grid that is created by the .genGrid() method
.genGrid(token):
-Generates the grid needed to populate the final lattice
Output:
A list of result file in storage.
Input Surface File Format
To create a conformed volume lattice, the 4 untrimmed surfaces that create a closed volume are needed. If the surfaces are closed, the seam of the surfaces must match.
To upload surfaces, use the genysis.upload(inputFile,outputName,token) function. Once the files are uploaded, use the .setSurfaces() method to add the surfaces to your conformal lattice object.
lattice = genysis.conformalLattice() lattice.setEPSILON(0.1) genysis.upload("EXPORTS/handleBot.igs", "handleBot.igs", token) genysis.upload("EXPORTS/handleTop.igs", "handleTop.igs", token) genysis.upload("EXPORTS/handleSide01.igs", "handleSide01.igs", token) genysis.upload("EXPORTS/handleSide02.igs", "handleSide02.igs", token) lattice.setSurfaces(top='handleTop.igs', bottom='handleBot.igs', side1='handleSide01.igs', side2='handleSide02.igs')
Once the surfaces are assigned to your conformal lattice object you must declare the dimensions of the resulting lattice in U, V and W directions using the .setDim() method and the resulting grid output.
lattice.setUVW(20,4,30) lattice.setGridOutput("handle.json") lattice.genGrid(token) genysis.visualize("bar.json",token,True)
Visualizing the grid you should see something like the screen shot below.