Isosurfaces / Signed Distance Fields


Here’s a script that lets you input an implicit equation as a string and makes a level set/isosurface mesh.
Isosurfacer.gh (17.8 KB)

This is a version of the method given by Paul Bourke here.
(in particular this tetrahedral version), which @laurent_delrieu had already kindly shared a translation of into Rhino/C# here.
This takes Laurent’s script as a starting point and makes a few improvements and speed ups.

The file contains 2 versions - one which lets you input the equation as text, and one where the equation is given in a method in the code.
The text input one uses Grasshopper’s expression parser, and is slower.
To modify the code one, you don’t need to know much C# though, just open the editor, scroll down to line 158 where it says public double Evaluate and replace the function.

11 Likes