Grasshopper

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

Views: 2526

Replies to This Discussion

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

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