Unify UV direction of planar surfaces oriented in different directions

Hi guys,

I’m trying to unify the UV directions so the the edges of the cones will face towards the stright line of each surface. As you can see in the picture some of the cones are facing other directions (yellow lines) while some are facing the direction that I need (green lines).

I tried using many differnt scripts from this forum to unify the direction, but without any succses. Some of them are included in the script (very sorry for not giving credits for each script that I tried, cant remember who created which).

I will be greatful for any advice.


unify uv direction.gh (43.4 KB)

the portion of script you posted starts with surfaces already created with mixed UVs:

I think the solution might be on how those surfaces are generated, meaning how those curves are generated in first place: plese post that part

they were originally made in Rhino. I have attached the original surfaces in this script.
unify uv direction.gh (353.7 KB)

ahh, that doesn’t help then :frowning:

I think this might be a way, taking advantage of the thing that all those surfaces are planar, and they all have a straight edge

it finds the bounding box of each surface based on a plane aligned with the straight edge, then goes back to your original definition (on those rectangular surfaces, for which UVs are fine) to create the cones:

unify uv direction_Re.gh (360.0 KB)

but I don’t know if you are happy with the side on which those cones are generated :smiley:

1 Like

Amazing!
Thank you so much!