Grasshopper

algorithmic modeling for Rhino

Problem: I have gh surfaces with different normal directions (see image below). I would like to somehow determine what's inside or outside so I can flip the vectors to all point outward. I was thinking maybe using a bounding box around all the surfaces to somehow compare vectors that way then flip them accordingly??

Any help would be great!! Thanks.

Views: 4026

Replies to This Discussion

I do not know why the picture has been obscured!
Well, you can try to move 2 pt for each vector, the first with the normal vector, and the second with its inverse.
Measures which is closer to the center point of the bounding box.
If the closest is the first index, the normal vector is inward. If is the second index, means that the vector nomal going out.

Thanks for the reply Daniel, your approach works for the particular scenario I posted, however, I'm not sure how we can automatize this process when the panels form an outside shape like the one attached. Where a common center point may not always direct the normals to the "outside". Any Thoughts??

 

If you have the shape (closed) curve, u can use Point in Curve to test who pt are inside, instead of use Distance comp.

My original thought was to use your bounding box idea. The basic workflow would be to scale up the bounding box then use Surface Closest Point to project outward to get a 2 point vector general direction. However, the image here with a complex curve asks for something more robust. My thought is to use Offset Curve then re-extrude to surface (if a simple straight surface) OR Offset surface (if a complex surface). From there generate your panels like normal on the base surface, get the center point (typically Evaluate Surface w/ MD slider after "S" input is set to "Reparamaterize") OR from closed curves using "Polygon Center". Use "Project Point" plugging in the EvalSrf Point and Normal and the surface you have determined as 'inside' or 'outside'. Use a "Vector 2pt" to get the new, unified normal vector, and adjust as needed with "Amplitude" to get a precise offset/extrusion or whatever you plan to do with that corrected vector data. 

Hope that helps!

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service