Align mesh points to curve

Is it possible to align mesh points of a mesh border to a curve?

I remember I had similar issue when we were doing a workshop using Kangaroo for students. At that time I added a small script to search for closest point from naked mesh edges to curves. So you can either do it in grasshopper components by simply decomposing the mesh and constructing again with different vertices or use this component.

I was doing this in two steps: a) relocate naked vertices of a mesh b) smooth inner mesh vertices to have a nicer output:

This simple trick also works with multiple curves:

This is now wrapped into this component in NGon plugin:

1 Like

Here’s a way with native components


pullnaked.gh (14.2 KB)

1 Like

Thank you for the solution. Unfortunately, the result is an invalid mesh.

That’s odd - it’s simply moving a few points, and gives a valid mesh here

1 Like

image

image

Ah, I recall now there was an issue with the old GH PointDeform component and single precision.
I thought it was fixed now though - can you post your mesh?

1 Like

Without file it is hard to tell.
Probably small faces gets flipped resulting in an invalid mesh.
And there is some weird snapping going on from your screenshot.

Here the file with the mesh and the line :
249-31 terrain.3dm (2.0 MB)

Works without a problem, and mesh is valid.

Works perfect! Thank you very much.

1 Like