# Mesh From Curves - Delaunay Problem

Hello

I’ve been having problems achieving a lofted Mesh using 3 curves. When I try Delaunay mesh, it gives me unwanted triangulation (As seen from the picture below).

What I want is to triangulate from the first curve to the last curve as in a regular Loft command. When I tried using Mesh Loft, It almost did the job but it had too many Mesh Faces.

(Uses Quads and has too much)

Is there a way to achieve this lofted mesh but with a Delaunay style triangulation without the excess faces and unwanted triangulation?

Delaunay Mesh Loft.gh (49.2 KB)

Thanks.

Hi -

That is a common issue and the standard way of dealing with this is to add a post-process to delete the faces that are not needed. This has been asked many times here on Discourse and you should be able to find examples of that.
-wim

1 Like

You should be able to do this by using the regular Loft command to produce a surface (not a mesh), then run ‘Mesh Surface’ on that surface with u=1 and vary v to adjust the density (and use ‘triangulate’ at the end if you want triangles)

You could make closed polylines and then triangulate them. Like so:

220528_TriangulateMeshLoft_00.gh (14.0 KB)

Thank you for your reply, Daniel. Unfortunately Mesh Surface won’t accept a loft as an input. Mesh Brep on the other hand does, but it has messy tessellation.

Thank you so much @AndersDeleuran. The method and the python script works fine and very fast. But is there a similar component native in Gh that does the same?

On the other hand, now that I’m at this point. Can you guys @AndersDeleuran @DanielPiker
@wim, help me figure out what’s going on with this mesh?

(Broken Mesh from Baking)

You see, I’m trying to make a comprehensive civil road script and one aspect of it is terrain cut and fill. I can’t seem to extrude my meshes in a straightforward way, so I had to dig around the forums for the solution. But when I use my cutting mesh for Mesh Difference it fails. I also tried Mesh + plugin and still produces a broken mesh which fails in Mesh Difference. But if I manually bake my mesh and only then extruded it, it works. What is wrong with my Gh mesh extrusion?

Broken Mesh from Road Cut.gh (540.6 KB)
Broken Mesh baked from GH.3dm (166.6 KB)

Thank you.

I don’t think so. The RhinoCommon Polyline class has several super useful methods that have not been wrapped in Grasshopper components. That said, the GHPython component is native, so there should’t be any dependency or issuing concerns using it in your pipeline.

There’s a few third party plugins in there, so I can’t inspect the files. That said, here’s a (very) quick go at how one could solve this. Again using the RhinoCommon Polyline and Mesh classes in GHPython:

220529_TriangulateMeshLoft_00.gh (15.4 KB)

Note that I’m not checking overlapping vertices, face normals etc. here. Which may, or may not, be a concern.

3 Likes

Does it have to be a Polyline Curve?
Is it possible to enter an ordinary Curve into the script?

No you will need to discretise the curve first.

1 Like