Mapping curve from mesh to mesh with MeshMap not working

Hi everybody,

I am trying to map the red polylines from the left mesh to the right mesh in the picture by using the MeshMap node of kangaroo. Except the points are scattering.
I divided the polyline curves into points and made sure they are on the mesh with the “mesh closest point” node.

Doe anybody happen to know what I am doing wrong?

Post the file

Does MeshMap support quads?

There was a long standing bug in RhinoCommon where Mesh.PointAt would return incorrect points for quads, so this is indeed likely the problem here. This was actually fixed recently though, so I think after the next SR you should get the correct result from this without changing anything.

In the meantime though, you can triangulate. Because the default triangulation picks the best of the 2 diagonals based on the geometry of each quad though, it would likely pick different triangulations for the flat and curved meshes, making their topology different, so they wouldn’t work with MeshMap.
The solution is to set the triangulation directly: (123.9 KB)

1 Like

You were right!

Triangulating the meshes for now worked for me!

Thanks Daniel!
Have a nice day (120.7 KB)

There is Triangulate node in GH, but the result is inconsistent. Does that mean the result is not base on topology? Maybe curvature?

Correct, the default Triangulate is based on geometry, not just topology. It splits quads along the short diagonal. So deforming a mesh then triangulating the deformed and undeformed version can result in different face topology.

The definition I posted above triangulates every quad into (0,1,2) and (2,3,0), without considering geometry.

MeshMap (29.4 KB)

Seems like it is working with quad mesh (R8.5).