0

I'm triying to merge 2 meshes in EyeShot to calculate the volume of the intersecction and difference between this solid and another one. I need the resulting mesh to be closed.

I try this to merge the meshes.

List<Point3D> lpoint3D = new List<Point3D>();             
lpoint3D.Add(new Point3D(0, 0, 10));
lpoint3D.Add(new Point3D(5,5, 10));
lpoint3D.Add(new Point3D(0, 5, 10));
lpoint3D.Add(new Point3D(5, 0, 10));

VAR_Glob.mesh2 = UtilityEx.Triangulate(lpoint3D);

List<Point3D> lpoint3D = new List<Point3D>();


lpoint3D.Add(new Point3D(0, 0, 5));
lpoint3D.Add(new Point3D(5, 5, 5));
lpoint3D.Add(new Point3D(0, 5, 5));
lpoint3D.Add(new Point3D(5, 0, 5));

VAR_Glob.mesh1 = UtilityEx.Triangulate(lpoint3D);

VAR_Glob.mesh2.MergeWith(VAR_Glob.mesh1, false, true);

But the resulting mesh is not closed. I transform the mesh to a solid but I only get the two planes separately.

Solid s2 = VAR_Glob.mesh2.ConvertToSolid();
  • worth mentioning both shapes are planar object therefore do not have volume but do have area – Franck Mar 10 '23 at 11:56

1 Answers1

0

The second parameter of this call is weldNow, please set it to true:

VAR_Glob.mesh2.MergeWith(mesh1, false, true);
abenci
  • 8,422
  • 19
  • 69
  • 134