Project point on the surface

Hi all,

I tried to project a list of points to a trimmed surface but it didn’t succeed. Hope somebody can help. Thank you in advance.

1103_point projection.3dm (1.7 MB) 1103_point projection.gh (28.9 KB)

What I am trying to do:

-HC

1 Like

Hi.
I try to open your .gh file but it’s so slow, maybe you should simplify your function before update.

Try to use PojectPoint component you can find it in Vector category, for input you should have point, vector for your project direction and geometry (your surface).

Hi @samuelef1992,

I simplified the definition. I use the ProjectPoint component but it didn’t succeed either. Try these simplified files. Thank you in advance.

1103_point projection.3dm (1.8 MB) 1103_point projection_rev1.gh (28.1 KB)

-HC

You can try this…i don’t konw why in your function there are so many null objects maybe you should check it.

1103_point projection_rev1.gh (32.7 KB)

I tried your file but the outcome seems not what I want.

That’s also my question. I tried to find the surface intersect point by projecting the points to the surface but it is weird that the outcome is all null.


(To project the point to the surface to find the intersect points)

Thanks,
HC

I am thinking about what components can be used other than MeshRay.

I see two things

you have 2 meshes here, I think you want to use only the first one:

a good portion of your initial mesh has Z value lower than 0
so when you project points in the direction 0,0,1 they intersect nothing :slight_smile: (happened to me thousands times)

I just moved in Rhino the whole content +Z by 10 units and used only the first mesh in the list for the MeshRay, and your definition looks like working

1 Like

If you want project points to the mesh use project point component
move the point above the mesh than project them with negative zaxis

1 Like

You are right!!
Because by default the projection vector are set to Z+, then ignore points when surface value is Z-.
I hadn’t noticed that the Rhino surface was in Z- value.

1 Like

Hi @inno,

Thanks for your reminder. I just move the geometry upward and it works well. I am going to try projecting curves to the surface tomorrow. This time I will check the direction carefully.

Best,
HC

Hi @anon39580149,

Thanks for the suggestion! I am barely new to GH. Is there a project curve component as I am going to project curves tomorrow? (as a practice)

Best,
HC

Thanks @samuelef1992, I didn’t notice the direction. It is an amazing forum!!!

1 Like

Thanks!