Grasshopper

algorithmic modeling for Rhino

finding a vector perpendicular to a face of a brep and facing the interior

Hi, I'm trying to extrude a cut-out portion of a surface perpendicular to the surrounding surface. The surfaces in question are faces of a brep, and I've gotten it almost to the point where it works, but the normals of the surfaces seem to vary, so my extrusion sometimes points to the interior of the brep (as I want it to) and sometimes to the exterior.

This is the definition that I have so far:and this is an example of the type of brep I'm looking at:

the surface split and the list item create the portion of the face to be extruded, and the evaluate surface isolates the normal vector, which is then plugged into the extrude function, and sometimes it's right, sometimes it's not. Is there another way to do this so the extrusion is always inwards?

Thanks

Views: 1699

Replies to This Discussion

Hi Lauren, I guess in the case of this shape you could move the midpoint of the split surface fragment in both directions and check which point is closest to the Brep's volume centroid. I want to add to this that I'm very tired so this could turn out to be not the most practical... Btw your picture is cut off so everything before that we have to guess. I bet you get a more suitable answer if you show us the whole thing, preferably upload your definition to save us some time.
After a bit of sleep I'm thinking of the Inside component (surface> analysis) to test which point (and therefore which direction) is the one you want. Still, we'd like to see why there is something flipped in the first place.

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