Limiting Delaunay mesh: faces between different contours only

Hi there,

I will likely be starting a grading job for a landscape firm and will be converting between contours and TIN mesh surfaces.

When using the contour edit points into a Delaunay mesh component, the component often creates flat step areas due to larger distances between consecutive contours. I’m trying to find a way to avoid this.

  1. Is there a way to prevent the component from creating triangle faces within one contour elevation, and forcing it only to create faces between the points of contours at different elevations?
  2. I was possibly thinking of consecutive tween between the contours on a projected plane, then re-raising those contours to their respective heights. The smaller distances might limit flat steps
  3. I was thinking about potentially doing curve plane intersections to create polylines which bridge between the crests of the contours. Not sure how the list order would work though.
  4. Is there a less basic Delaunay mesh component?

-Jeremy

  1. Unfortunately no.
    The delaunay triangulation is a 2.5 algorithm and this means that the calculations are done on a temporary plane (in 2D space), so the method doesn’t know that it shall not make mesh faces between points with similar z value.

  2. Making good inbetween curves are difficult, but can be done. This would be your best option I guess, you’ll still get the same “problems” but on a much smaller scale eventually.

  3. Not really sure what you mean here.

  4. Not that I am aware of

Another option is to use Patch and then mesh that, but it won’t be super accurate and will sometimes make strange hills and valleys if the height curves are too close to each other seen from above.

Can you share some curves that illustrate your problem areas?

Hi Holo, thanks for your answers.

I’ve attached a typical problem: you can see where the flat faces are creating ‘steps’ (blue circles)

I was thinking if somehow I could put tweened curves (yellow) between the original curves, that it would lessen the issue (orange):


However, tweened curves seem to be very inaccurate

Delaunay mesh test.3dm (3.6 MB)
Delaunay mesh test.gh (9.5 KB)

-Jeremy

I think that this has been identified previously:

can you internalize your geometry in the grasshopper script? or save in a previous version? (I have rhino 7) thank you

Hi Fabio. I saved it as rhino 7, and internalised the curves into the container in the GH definition. I don’t know if that version of the GH file will work in R7.

Delaunay mesh test.gh (43.8 KB)
Delaunay mesh test.3dm (3.6 MB)

-Jeremy

Hello
not sure it is OK, you can use Triremesh


Cull duplicates is mandatory in order to have a valid mesh.

Mesh could then be smoothed with keeping points on curves/But it keeps the discontinuities on curves.
Before


After

2 Likes

Hi Laurent, thank you very much for your reply.

Would you be able to post your grasshopper definition file to this thread? I just wanted to see what features input you used for the tri remesh component, and how you may have implemented the mesh smoothing component.

Best,
Jeremy

No problem, here it is
It uses my Nautilus plugin (just free components)
There are 2 components used
Smooth Weights (Z values) and Laplacian Smoothing
Welding the mesh is mandatory as Triremesh unweld on curve.
Delaunay mesh test.gh (42.5 KB)

The only thing missing is the smoothing along the curve but keeping points on curve. I don’t know if tools like that exists for mesh.

1 Like

Wow thanks so much Laurant. I will try your advice and script :slightly_smiling_face::slightly_smiling_face:

Thank you,
Jeremy

Hi Laurent,

I’ve just plugged in your script into my file, and it works really well :slight_smile:
Just wondering, if the mesh was already created using basic Delaunay, and had the problematic flat spots mentioned earlier, can the flat spots be removed in a similar way directly from the mesh without the contour curves?

Best,
Jeremy

Hello
I am not a specialist for that but it seems you are seeking some G1 continuity of the mesh.
I try here to interpolate heights using curves, but “Nurbs Curve” or “Interpolate” have they drawbacks.
Not sure there is a magic tool!


At the end mesh is a bit better but you can see band along some Axis, due to the use of Nurbs Curve.

I plugged polyline in gh file. But you can try whatever you want.
Delaunay mesh test V2.gh (47.6 KB)

1 Like

I had a similar problem but on a smaller case, with just two curves defining the boundary of a hillside. the 2 curves are on different z and are not similar, so a loft would give something nonsense.
I tried with divide curve and delaunay mesh and the result was better but had the problem you are discussing (the planar areas), so after some trials i came up with this

Hillway.gh (19.6 KB)

Short explanation: the idea is to interpolate the Z value of the internal points between the Z of the 2 curves using the distances between the point and the 2 curves (evaluation done with the projections on xy plane).
in the example file the input curves are just 2 random curves with different z, you can draw your own pair, reference them and play with it (and with the graph mapper) to see how it works.

It would be interesting to apply this idea in a larger case with multiple curves but right now there are some problems I don’t know hot to solve yet, like:
-you don’t have all closed curves so you can’t define a series of slices (like in your file)
-you cant just pick the 2 closest curve of the point because they might be on the same side
(it may be hard to define what are the next and the previous contour line relative to a internal point on the mesh)

I will investigate further when I have more time, for now I share this hoping it can also inspire you to get a solution too

1 Like