Mesh weld!

Hello
Why these meshes have different welding result?

weld problem.gh (16.6 KB)

It seems to be a tolerance problem. After trying to invert the order of faces/vertices.both so your two examples match perfectly, I ended up rounding the coordinates of the vertices to 0.01, and the weld component worked.

You can use Align Vertices component to avoid rebuilding the mesh.

1 Like

These components surely doesn’t use a tolerance, they surely use something like a hashset. So if points are exactly the same they are glued.
Here the example
First example 4 points differents
Second example 5 points differents

 private void RunScript(List<Point3d> pts, ref object A)
  {

    HashSet<Point3d> h = new HashSet<Point3d>();
    foreach (Point3d pt in pts)
    {
      h.Add(pt);
    }

    A = h.ToList();

  }
2 Likes

I already tried Align Vertices but didn’t work, and there no input for tolerance as @laurent_delrieu mentioned
Can you show your result?

In Blender we can collapse duplicated vertices but i don’t find an option like that in Grasshopper.

There are some component that uses tolerance.There is one from Petras in Ngon I think or Cockroach.

1 Like

Here is the file.

weld problem.gh (18.1 KB)

1 Like

Thank you @magicteddy
Align vertices solve the problem