algorithmic modeling for Rhino
Hi David,
I know this has come up before, but I was wondering if you'd made any headway on the linkage between normals and the "flip" toggle for Nurbs surfaces. Specifically, I am hoping that a user, by flipping a surface in Rhino, can cause a reversal of its surface normal in GH. However, neither NurbsSurface.NormalAt nor NurbsSurface.FrameAt appear to register the change.
Any advice would be appreciated.
Thanks,
Jon
Tags:
Try loading the surface as a Brep, and getting Brep.Faces[0].NormalAt(u,v).
Not sure why would be any different, but it seems to work...
Yes, strange, but that does the trick. Thanks, Andrew!
-Jon
Hi Jon,
sorry, I don't get it. Is this a bug in Grasshopper or are you not getting the expected normals when you call NurbsSurface.NormalAt in a script component?
The reason there's a difference is that Breps (all surfaces in Rhino are internally stored as single-face breps) have a Reverse flag on them, whereas surfaces do not. So if you import a Brep which has been reversed, then downcast it to a surface and then call things like NormalAt, it won't reflect this reversed state.
This is a problem for plugin developers but not one that can be solved at the moment (SDK breakages).
The reason we do this is because it's quite difficult to really flip a surface. Setting a single boolean is quickly achieved and since we often need to flip surfaces when you join them together, we chose the quick'n'easy path.
All components in Grasshopper should pay attention to the Flipped state, if they don't, that's a bug I need to fix.
--
David Rutten
david@mcneel.com
Poprad, Slovakia
Hi David,
No -- it's not a bug in Grasshopper. I cast the brep to a surface in a script component. Now I know better!
Thanks,
Jon
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
Added by Parametric House 0 Comments 0 Likes
© 2024 Created by Scott Davidson. Powered by