Project object onto surface, align it with the normal surface direction

Hello. I would like to know a way to project multiple objects onto a surface and align them with the surface normal direction for each projected point of each object on the surface. I have a script to project them onto the surface, but I don’t know how to align each projected object with the corresponding normal direction at its projected position. I was messing around with Evaluate Surface and Orient, but I got confused with the script, so I just kept the commands for projecting objects onto a surface.

Project the object onto the surface and align it with the surface normal direction.gh (74.6 KB)

I would do this slightly differently.

  1. Keep your box shapes on the origin.
  2. The insertion points can be set on the XY plane. Project them vertically upwards to your surface.
  3. Find the surface closest point from the projected point and use the uv coordinates of these points to get the surface normal.
  4. Orient the boxes on the surface using the planes.

Project object onto surface and align it with the normal surface direction_re.gh (82.3 KB)

2 Likes

Hello, Martin. Thank you for your solution. I was figuring out how to put the objects exactly over the projected points from the original objects, so I made adjusts in your script (actually, I returned to my original one, integrating some ideas from your script), in order to get my exact objective. The final result was this:

Project object onto surface and align it with the normal surface direction_re2.gh (77.3 KB)

I do not know if there a better way to do this, but I think that work well. Your ideas resulted in a good solution, in my opinion.

1 Like

It always depends on what the definition needs to do for you… Glad I was able to help you

1 Like