Flip mixing face (correct direction and incorrect direction)


I want to flip some back face with pink color and using Grasshopper do that(Not Join Surface ). Have solution for me ? thank you !

attaching a reference file with internalized geometries is always the best way :slight_smile: :+1:


you can compare the direction of the Normal of each face (A) to a reference vector (B) and decide to flip just some faces based on their angle (C), something like this:

you could also take advanced of the Brep Join component while keeping the surfaces separated:
when you join several surfaces together, the direction of the first surface on the list defines the Normal direction to be respected by all of them

so if you Brep Join by picking as first surface this one circled in red, you will end up with something like this:

while if you Brep Join picking as first a surface one pointing in the opposite direction (circled in red) you will get the opposite result:

Flippy_Floppy.gh (188.9 KB)

1 Like

Hi Mr.Inno
Flip.3dm (275.2 KB)

Thank for support, it verry helpful, but I still have 1 case if brep is 1 solid or overlap like this file. If brep isn’t join I can’t flip correctly direction i want. Can You help me !
Thank you so much !

this is one of those cases where Brep Join → Deconstruct Brep does the job for you very easily :slight_smile:

because the Joined Brep is a solid, the Normals are automatically set to outwards for each face:

if you want inwards normals you can just flip everything after the deconstruction:

Flippy_Floppy_Re.gh (110.4 KB)

Thank you Mr.Inno !
I known it but some Brep can’t join or still not flip when join ( because of a little space between surface, Brep or Surface have issue). So my point is

  1. Flip but not using join Surface or filter all face correct side in one and wrong side in one
  2. Join Brep but some surface wrong direction will be flip all
    Sorry because imformation not clear !

if you can’t use Brep Join, then I think it’s more of a case-by-case scenario depending on the real shape of the surfaces you are working with

for sure you need to evaluate each normal with a reference vector and a threshold
of course, depending on the shape of your breps, the reference vector can be external and static (for instance in my first post the normals were compared to the Z axis vector)
but it can also be based on connectivity, meaning on the direction of neighbor-surfaces normals (but in order to get connectivity they must connect… so it could be a problem considering the following)

please post some of those :slight_smile:

Flip.3dm (778.9 KB)
This is a case join but 1 face not flip ! thank you !