BUG: delaunay mesh bake problem

Version 6 of Grasshopper will not bake delaunay meshes. When opened in version 5 all meshes bake fine. Let me know if a fix is forthcoming or if I’m missing an update.

Very best,
Keith V

It will be difficult for Mcneelies to help without a file !
Rhino 6 is more severe on validity of mesh, it must be an invalid mesh which could be viewed but not baked ! Let your mouse on the output and look if you see “invalid mesh”

As @laurent_delrieu said, the mesh is probably considered invalid by Rhino6. That’s a bug in its own right we need to fix (so yet, having the file to replicate it would be helpful), but new versions of GH1 for R6 should bake invalid meshes after showing a warning. This is a newish feature so it won’t be in the currently stable Service Release, but you could try switching to a more aggressive update schedule if you want that feature earlier.

Hi David/ Laurent—

I think your response was an invitation to review the file that’s not baking meshes. Both Rhino & Grasshopper files attached via Adobe Send—see link below. I hope it helps rectify the bug in the latest/ pending build. Let me know if you have any questions.

As you recommended, I’ll also install a newer build to see if that solves the problem.

Many thanks,

Keith

I’m using Adobe Send & Track.
You can view “UPenn_Analytic Terrains_v6.zip” at: https://files.acrobat.com/a/preview/b7650d9d-48de-4576-8137-09e6a15f4905

PEG office of landscape + architecture

1906 Catharine Street

Philadelphia, PA 19146

v. 310.717.3221

info@peg-ola.com

www.peg-ola.com

Hello, I did have a look, here is 2 quick fixes, hope they will work. They work on the file you send.
Mainly the 2 scripts suppress degenerate faces, so faces with a very small edge.
“MeshFaceList.CullDegenerateFaces”
https://developer.rhino3d.com/api/RhinoCommon/html/M_Rhino_Geometry_Collections_MeshFaceList_CullDegenerateFaces.htm

heal_invalid_mesh.gh (40.5 KB)

Mesh result = mesh.DuplicateMesh();
result.Faces.CullDegenerateFaces();
mesh.Vertices.CombineIdentical(true, true);
result.Vertices.CullUnused();
result.RebuildNormals();
A = result;

double radiusSquared = radius * radius;

Mesh result = new Mesh();
result.Vertices.UseDoublePrecisionVertices = true;
Point3d vert = inMesh.Vertices.ToPoint3dArray();
for(int i = 0; i < vert.Length; i++)
{
result.Vertices.SetVertex(i, vert[i]);
}

foreach (MeshFace face in inMesh.Faces)
{
  Point3d pa = vert[face.A];
  Point3d pb = vert[face.B];
  Point3d pc = vert[face.C];

  if ((pa.DistanceToSquared(pb) > radius) && (pa.DistanceToSquared(pc) > radius) && (pc.DistanceToSquared(pb) > radius))
  {
    result.Faces.AddFace(face.A, face.B, face.C);
  }
}
result.Vertices.CombineIdentical(true, true);
result.Vertices.CullUnused();
result.RebuildNormals();

A = result;

https://discourse.mcneel.com/t/bake-invalid-mesh/58847/

Laurent—

The fix works great.

Many thanks!

k.

PEG office of landscape + architecture

1906 Catharine Street

Philadelphia, PA 19146

v. 310.717.3221

info@peg-ola.com

www.peg-ola.com

1 Like

You are welcome,
the simpliest fix (CullDegenerateFaces) has a normal problem and has more faces (2303) than my custom script (2293). So If you have not big mesh the custom script seems to be more robust.
I also noted that the initial Delaunay mesh has a hole.