UV coordinate relative to the surface?

Hi. My goal is to mathematically map points from XY plane to a surface.

Easy approach:

  • project surface to XY
  • find surface closest points
  • evaluate original surface

But some points used for evaluation exist sightly outside the projeted surface, meaning that I get a lot of edge distortion. This is why I would like to ask for help if anyone knows how to get UV coordinates that are “relative” to projeted surface? I know that there’s also a distortion, but my points exist quite close to the edge where the distortion is still minimal.

Could someone give me a hint, please? (I cannot share the file because of NDA)

Is your surface projected to a plane*?
If so, why don’t you project the points to the surface instead?

Make a line for each your points with SDL and use the normal of the plane* as direction.
Then use Surface | Line intersection (SLX)…

I can’t do that because there’s no intersection. The situation looks like this:

The goal is to get UV coordinates of red marked points, relative to UV space of the surface (so if the surface had 0 to 1 domain, these points will have UV outside that domain)

Oh, seeing the image make everything clearer…

Try this:


UV outside surface domain.gh (43.3 KB)

code for extension from Extend surface?!?! - #12 by Mahdiyar

1 Like

You mean BrepFace I assume. Anyway … see attached as an entry level take on that matter.

BrepFace_MapUVPoints_V1.3dm (91.7 KB)
BrepFace_MapUVPoints_V1.gh (123.0 KB)

Thank you! This is the magic I was dreaming about. I will also check other aproaches shared in this thread.