More Versatile Voxel Definition

edit: Since posting this, I have created a tutorial with a slightly tweaked version of the script shown below. Feel free to check it out for a full explanation of this method, or else just check out the script at the foot of this post.

A while ago I created a simple voxel definition in grasshopper, which worked fine for some geometries, but I thought it was about time that I updated that definition to handle more situations and allow more control.

Firstly, the script currently has been setup to work with a surface/brep geometry as the input. If you would like to voxelise an existing mesh, you will simply need to change the BREP Closest Point component to a Mesh Closest Point component.

This script works a little differently to the previous one. I’ve included the option to create the voxels based on a resolution factor, or on the voxel size factor, and one can switch between these methods using the True/False. If using the voxel resolution factor, then beware of the scale of your scene, a resolution factor of 1 will produce 1 voxel every 1 unit, which could crash your work if you are not careful.

Thirdly, I’ve created an extra function of the script which will create closed water-tight voxel meshes for 3D Printing, if you would like to have that option. In order to use this part of the script you will need to have the weaverbird and [uto] plugins for grasshopper installed on your machine. If you do not have these installed, grasshopper will throw an error upon opening the file. If you don’t need this step, disregard the error. Furthermore, the part of the script which creates the 3D Printable mesh is a rather resource intensive operation, which is why I have included the data dam component to control the flow of your script so that once you are happy with the voxelised output you can ‘press play’ to complete this final bit.

You can download the script here or view it below:

Feel free to ask any questions.

2 Comments

  1. how do you get the voxel to preview and or what componet do you bake if you are not interesting in the weaverbird definition that follows it ?

    Like

    1. Ahh yes of course. You need to preview the ‘move’ component which takes the meshbox and cull pattern as inputs.

      Also, You don’t have to use meshboxes, you can plug the box component straight into the geometry to move, but! Meshboxes are far more efficient to display than normal boxes. Hope that makes sense!

      Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s