This example takes a surface and voxelizes it according to the bending moment analysis. The resulting meshes can then be used in Processing.
Grashopper plugins required:
If you would like access to the files, send me an email and I’ll be more than happy to share them with you 🙂
Step 1. Input the reference surface, within the 03_GH_INPUT_MESH layer, in Rhino by right-clicking on the mesh parameter in Grasshoper and select ‘set one mesh’. Do the same for the brep parameter for the support boundary, under 03_SUPPORT_BOUNDARY, which is a closed polysurface near the bottom of the surface.
Step 2. Once inputed, the Karamba bending moment analysis will run. You can preview the results or bake the colored curves from the analysis by right-clicking on the bake component (this step requires the Human GH plugin to be installed on your computer). Points are generated from the resulting curves, which are the points used to populate the voxels in the next step.
Step 3. Turn on the 00_CUBE layer to reveal the next inputs for voxelization. We will be voxelizing with cubes in this example, but the file provided also contains other voxel types to try out.
Step 4. First, input the 3D array of cubes under the 00_CUBE_3D_ARRAY layer. Notice that there is a data dam here, which is like a play button– we’ll come back to this at the end when we want to run the whole script.
Step 5. The main principle of this voxelization is that the higher the bending moment, the more subdivided the voxel becomes. So we input two different voxel types that are populated on the points from the bending moment analysis. They are named accordingly— 00_CUBE_MESH_M goes inside the geometry parameter labeled Med Sub (subdivision) and so on.
Step 6. Now, we go back to the play button from Step 4 and click on it to run the script. Voila! You have voxelized the surface!!
Step 7-8. Bake the resulting meshes inside the mesh parameter labeled ‘final meshes to bake’. You can also preview your work by turning on the custom preview to the right of this parameter.