Restrain UV on vertical faces

Hi!


Restrain UV direction.3dm (292.5 KB)
restrain UV direction.gh (12.1 KB)

I want to be able to restrain UV direction of vertical surfaces, so they are in same direction.
I´ve imported some breps from archicad. First I separate horizontal and vertical surfaces, and that parts work fine but then I want to restrain UV direction for further editing, because som vertical surfaces comes out “wrong” like the bottom volume in the detached 3dm file.
My plan was to rebuild surfaces with a component from lunchbox, and then give them the right UV directions, but I´m not really shore how to use this component.

There is a component called “reverse surface directions”, but it also flips the normals, and also to not restrain all surfaces in the model in the same direction.

Would be super gratful if you could help me!
Se the attached gh and 3dm file.

/Anders

transpose.gh (19.3 KB)

transpose2.gh (21.0 KB)
you can add some flip afterwards to deal with direction problem.
but this will lead to other problems:
1: your surface V direction will not be the same, some points up while some down.I believe this would be a problem for your future program.
2: all faces that are flipped would have same u and v direction, this lead to surface property “reverse” =1. same would happen if you mirror a surface. not always a problem, but still.

so I suggest doing so:

transpose3.gh (19.9 KB)
solving the problem from the source

Tank you! I’m a newbie in grasshopper so not so experienced yet. But can you explain how this solves the issue with direction of surfaces. When I try your file I still have the same problem, but I’m probably doing something wrong. And why is there an extrusion in the end? Did you try this on the model that I attached I got it to work out?

your brep (the 2 volumn export from Revit/Arhicad) somehow does not have proper surface orientation.
they are all facing outwards which is fine.
but the uv direction are not normal.
normally if you create a new extrusion brep in Rhino, all side faces are with below direction:
1: U (red) is up
2: V (green) is clockwise or counter-clockwise depends on your curve direction.


in this case all V are in counter-clockwise.

Hi,
First of all: next time try to internalize the referenced data from Rhino
Now, I had a similar problem in this thread:

and the ‘dark lord’ made a C script that unifies the normals of a brep’s faces which solves the problem at its roots.
It is the component with the Sherlock Holmes icon.
The only problem is that it works per solid, so the surfaces are continuous for each floor but not between them…


erase.gh (29.0 KB)


restrain UV direction_re.gh (23.2 KB)

1 Like


For anyone not willing to install 3rd party plugin but still want to flip UV and swap UV
here is some code and a file.
uv.gh (5.6 KB)