Grasshopper

algorithmic modeling for Rhino

Hello,

 

I am a relative novice when it comes to Grasshopper, so please excuse me if my question is a bit simplistic.  Here is my question:

 

When I use the "Brep Components" component, there does not seem to be a consistent normal direction for the faces it outputs.  I want the normal vectors either to face into the Brep, or out of the Brep.  As it happens, most of the vectors face outward, but some face inward.  This presents problems later on; when I orient the faces onto the XY Plane, the faces with inward-facing Breps are mirrored.  How can I ensure that the normal vectors of the faces are consistent?

 

I should also mention that the original Brep was created using the "Solid Difference" component.  Is it possible the problem lies there and not with the "Brep Components" component?

 

Any help would be appreciated.  I'm not sure this question requires me to post my definition, but I can if that would be useful.

 

Thank you.

Views: 3130

Replies to This Discussion

In order to change the direction of some of the Normals you are going to have to create a reference for each face. The example I've provided is a simple cube with a chunk taken out, where some of the surfaces have been flipped in Rhino. (I couldn't get a closed Brep to not have unified Normals so the Definition has them as separate surfaces).

Each face has a guide curve associated with it from the inside of the Brep to the face's centroid, then these are compared to the direction of the Normals and any found to be opposite are dispatched to a reverse Vector component Merged back together and then sorted into the original Normals order.

You might find that this will not work on your Brep if it is a complex shape and you may have to rethink the generation of the guide curves, but the theory would be the same.

Attachments:

RSS

About

Translate

Search

Photos

  • Add Photos
  • View All

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service