How to stick movable points permanently to a mesh?

Hi,
does anyone have an idea how I can solve this?

Goal: I want movable points sticking to a mesh. The points should be movable to every destination on the mesh and stick to it. I want to move the points (that are generated in the GH definition) in the Rhino View Port. For this I use the gumball component in GH.

Problem: With the PullPoint component or the MeshClosestPoint component I get the points on the mesh. But if I move a point with the gumball the point does not stick to the mesh and can be moved away from it.

I tried the Kangaroo OnMesh Component but it did not work as I expected.

Gumball is not necessary. Any other way to have a kind of handle in the Rhino viewport to move the point on the mesh is good, too.

Have you tried _SnapToMeshObject?

Unfortunately, this is not available in Grasshopper. It seems like a Rhino specific command. I want the points to be generated in grasshopper.

So you’re expecting the grasshopper points you’re moving with the grasshopper gumball to stick to a mesh?

yes :slight_smile:

Try the kangaroo grab component

OK, thanks! I will try this and write later - probably tomorrow. Kangaroo is quite new to me.

What is wrong in my patch???

I can not grab the gumball points.

Can you post a file?

movable_points_on_mesh.gh (15.5 KB)

I’m not using this plugin:

And your file is empty. Please internalise the input mesh.

sorry, for the empty file…thanks for showing me!

v2_movable_points_on_mesh.gh (3.4 MB)

Can you use the Gumball in Grasshopper without the PlugIn?

I just need to move the points in Grasshopper on the mesh in the Rhino view port. A kind of handle would be good. Does’nt have to be the gumball. Maybe the point itself is enough. But the points in Rhino are so small - thats why I used the GHgumball Plug In.

Ok, not sure what your idea with the convex hull is. It seems something similar can be achieved with a plane | mesh intersection.

To keep the points on the mesh, use the OnMesh goal.

Maybe the drag strength was too low. Check out my file.

v2_movable_points_on_mesh_grab.gh (3.4 MB)

Drag the points then bake them or use a data dam to save them temporarily

The convex hull was used to be able to position the points near the top of the mesh automatically. i plan to build this part later.

I will check you’re file and come back later. Thank you!!!

1 Like

Works great! Thanks!!!

I am still trying to understand what you have done. Maybe I need some time to formulate a question.

As a next step I want the points to generate a curve. This curve should stick as well on the mesh even when i move the points.

I just copied the kangaroo stuff from the points and added an interpolate component.
It works but do you think it is an efficient solution?
v2_movable_points_and_curve_on_mesh_grab.gh (3.4 MB)

The interpolated curve does never lie on the mesh completely.

You’d have to divide it and pull all points to the mesh and then interpolate again.

You can find the closest point on the mesh for all curve points and then decide how many divisions are required to be within a certain tolerance.

I did this…

right?

1 Like

I think you would only need the solver again if you manipulate points manually with the grab component which I wouldn’t do twice…

v2_movable_points_on_mesh_grab_interpolate.gh (3.5 MB)

OK, very good!!! Thank you for showing the distance as well. That made me understand why there is a second interpolate and divide. :slight_smile:

1 Like