Extracting contour / isoline curves from Isopod field_display texture

Hi everyone,

I’m currently experimenting with Isopod and the field_display example. I can visualize the SDF field nicely with the colored texture and contour-like lines, but I’m wondering if there is a way to extract those lines as actual Grasshopper/Rhino curves.

What I would like to get is not only the main iso-surface boundary, but the multiple contour lines visible in the texture preview, a bit like topographic curves of the SDF field.

I was wondering if there is already a simple workflow or component for this in Isopod, or if it should be done by sampling the field on a 2D grid and running a marching-squares / contour extraction process.

I also saw the OnIsoSurf component in Kangaroo and wondered if it could help here, but I’m not sure if it is meant for extracting curves or only for pulling points onto a specific isovalue.

So my questions are:

  1. Is there a native/simple way to extract the contour curves shown in the SDF texture preview?

  2. Can OnIsoSurf be used for this purpose?

  3. If not, what would be the recommended method to generate real curves from several SDF isovalues?

Thanks a lot!

Hi @Victor17

Here’s an example of getting the contour curves of a field:
fieldcontours.gh (18.3 KB)

I’ve also written something for getting contour curves of fields on a mesh that uses root-finding to position the vertices more accurately than just sampling on the grid and interpolating like the above. I’ll try and push an update to the Isopod package soon with this as an added component.

Hello

as I see that Daniel uses the mesh and texture coordinate, here is my go with Nautilus plugin

fieldcontours.gh (22.1 KB)

Thanks a lot Daniel and Laurent!

This is exactly what I was looking for. I’ll download both examples and test them in my definition.

The Nautilus approach also makes a lot of sense now: using the mesh/UV values from FieldTexture2 and extracting the isolines with Mesh Iso Splitting to Lines.

Thanks again for the quick help — very useful!