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.
Tags:
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.
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!
T
Welcome to
Grasshopper
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
© 2024 Created by Scott Davidson. Powered by