How to target a polysurface all at once?

Good evening,
Can someone guide me if there is any way to direct a poly surface, making the ‘NORMAL’ surfaces all facing the outside of the model?
Could this be done with the rhino command or using grasshopper?
Please see the attached image so that you understand my need.

Note: The surfaces cannot be joined, I need them all separated and with the same direction ( Z ), facing
the outside of the model.

Grateful,
Leandro

It appears that you want to set the normal direction of a number of individual surfaces.

A polysurface is made up of multiple surfaces joined together. The normal direction of each surface in a polysurface will face one side or the other side of the polysurface. The normal direction can be switched using Flip command.

I assume you have multiple surfaces which are not joined together.

One possible method:
Select all the surfaces, then Join command to join the surfaces into a polysurface.
The normal direction of each surface in a polysurface will face one side or the other side of the polysurface.
Use Flip if the normal directions are facing the wrong way.
Explode the polysurface back into the single surfaces.

Since you neglected to post a file of this chaos, I tried to replicate it. Your shape looks roughly convex so what you can try is to take the dot-product of the vectors from the centroid of the shape with the surface normals of each surface. The dot product goes from -1 to 1 so anything less than 0 you can flip.

unify normals.gh (240.5 KB)

3 Likes

Good morning,
Unfortunately, I need the surfaces without being joined.
Grateful.

Good morning,
I tested your code and unfortunately it didn’t work.
You can help me, maybe I did something wrong.
If you can record a video with the example I’m attaching, hey I’ll be grateful.base - modela - one.7z (2.2 MB)

[quote=“leandro.arquivos3d, post:4, topic:131616”]

The surfaces will not be joined after the Explode command is used.

Select the polysurface you want to separate into individual surfaces.
Explode

As can be seen from your screenshot, using the _Dir with all of your surfaces selected isn’t very helpful - the arrows just look like a big mess.

If you set up your display mode properly, you can quickly identify and flip the surfaces that are reversed.

Copy the standard shaded display mode and edit the copy to set the backface color to something that stands out (I’ve used red here):

Set all the layer colors to black:

Unify_Normals_002

Select all of your surfaces using the _SelAll command and set thier display color to “By Layer”:

Now you can easily see which of your surfaces need to be flipped:

It took me about 5 minutes to manually select and flip the surfaces that were reversed:

You can go back to your original color scheme by selecting all with the _SelAll command and setting the display color back to “Custom”:

Here’s your file after I edited it:

base - modela - one_re.3dm.zip (3.0 MB)

-Kevin

Good afternoon, Thank you so much for taking your time and demonstrating in a great way to understand and also to help. Can you tell me if there is a way to access with command prompt, selection steps, so I can create a button shape shortcut, and speed up access? Thanks for your attention, Leandro

I’m not sure what you’re asking here. I just selected the surfaces that were reversed by using normal selection methods and ran the _Flip command.

If you are using a shaded display mode set up as I’ve shown above while you are creating your model you should be able to keep the directions of your surfaces oriented correctly. Just flip them as soon as they are created if they aren’t facing in desired direction.

As with most things in Rhino, there isn’t really any one “best” way of doing this. You just need to find what works in each situation.

The method suggested by @davidcockey works well in many situations:

  1. Select surfaces with _SelAll command (or another selection method as the situation requires)
  2. Use _Join command
  3. If needed, use the _Flip command to reverse joined surfaces
  4. If you don’t want your surfaces joined together use the _Explode command
  5. Manually select and flip any remaining surfaces that don’t have the desired orientation

As @akilli suggested, scripts can be also be helpful in many situations. The characteristics of your model will determine what script you’ll want to use and how successful it will be.

-Kevin

1 Like