Surface Orientation


on this picture:

do you see something wrong?

for me there is a problem:

  • red arrows are in same direction,
  • the pink too,
  • but greens no,

is it normal?

i have a script that orient a profil on surface intersections, but in this case it reverse some orientation, why? i don’t know, so i search, an i find the reverse orientation of this surface.

i try with a script that write the start and end of surface intersections:

i don’t know how i can make the green vector on same orientation…

Hi - you can use the Dir command and then use the VReverse option on the surface that you want to change.

my script can orient a lot of polyline on surfaces intersections, but how can i be sure that all are in the same orientation?
i have to search a better way…

Hello - you can check for a local plane - Surface.FrameAt() - and see ff the axes are parallel Vector3d.IsParallelTo().


is there a command, allowing to standardize the parameters u and v of a surface set.
i think no but it can be asked… no?

Hello - if the input is parallel, or more or less parallel, more or less planar surfaces, then I can imagine it is possible to line them up, yes. But currently there is no command for this - well, except the ShowDir command which will lat you make adjustments to multiple surfaces at once, but it is not automatic.


input are more or less parallel, and planar surfaces, so have you an idea?

if i analyse U domain and V domain, is it possible to standardize all of them?

does all surfaces have a domain that begins or ends at 0?

No - you can set this, (in Rhino Reparameterize)but in general no.
I’ll see if I can cook something up - it seems to me that @Helvetosaur might have done this already in a script…?


No, nothing in my library for that currently, sorry…

OK, thanks… Still, I am impressed that you have a library. I have a blob.


1 Like

Thank you!!! All surfaces are planar surface, but not parallel… I don’t know how I can compare u or v direction. To be sure, maybe I can rebuilt all surfaces with the same code…

Something like this should set the domain of all single-face breps (i.e. surfaces, not polysurfaces) to 0 to 1 in both the U and V directions:

import rhinoscriptsyntax as rs
import scriptcontext as sc
import Rhino

srfIDs=rs.GetObjects("Select surfaces to normalize domain",8,preselect=True)
if srfIDs:
    breps=[rs.coercebrep(srfID) for srfID in srfIDs]
    for i,brep in enumerate(breps):
        if brep.Faces.Count==1:

Ok but how can i compare the u direction to an other u direction of an other surface?

note, all surfaces are planar surfaces!!

what do you think about it:

import rhinoscriptsyntax as rs
if surfs:
    for surf in surfs:
        if rs.IsSurfacePlanar(surf):
            if rs.ObjectLayer(surf):layer=rs.ObjectLayer(surf)
            if rs.ObjectName(surf):name=rs.ObjectName(surf)
            if layer:rs.ObjectLayer(surf,layer)
            if name:rs.ObjectName(surf,name)

i built a new surface, that make all surfaces with the same u and v direction…

Hello - @onlyforpeace - I think this thing works - it modifies the existing surfaces. (2.5 KB)

To use the Python script use RunPythonScript, or a macro:

_-RunPythonScript "Full path to py file inside double-quotes"


thank you for your script!!!
i take it!!!
which is faster, write directly script in the buton, or call it by full Path inside double-quotes?

Is what I would do…