Dendro - Curve to Volume Error Fix - Solution exception: Object reference not set to an instance of an object

We have gotten some questions about a solution exception error that happens when using Dendro’s Curve to Volume component.

The Dendro Curve to Volume component has three inputs; Curves, Curve Radius and Settings. This error happens due to the length of one or more input Curves being shorter than the Curve Radius value.

Essentially the Curve to Volume component is an automated version of the Point to Volume component. Curve to Volume takes in curves, divides them into points based on the radius input and generates volumes from those points behind the scenes.

If any curve length is shorter than half the radii input value then division points along the curve can’t be created and it fails, throwing out the error.

To fix this issue you need to use your Curve Radius value to cull out any curves with a length less than 1/2 this value. This culled list of curves can then be entered into the Curve to Volume component with no problems. These culled curves are so short that they would be irrelevant to the generated voxel field so it should have no impact on the final output volume.

See attached files and canvas captures below for details on a simple fix. (19.6 KB)


Hi, when I download this script the curve to volume function is still red on the ammended script??? thanks

Hi, there are two examples in the file. The first one in the “curve_to_vox_error_example” is intended to show an example of the error. It should be red and failing.

The second group on the canvas shows the fix and and a working volume from the same source curves. There should also be a volume visible in Rhino being generated from Grasshopper.

Attached is a full canvas view for reference.

I’ve been having the same issue with the curve to volume, but even the downloaded script doesn’t work in both cases (upper and lower examples on the canvas). Any chance there might be some other bug?