C# SDK Surface.NormalAt() and GH Evaluate surface component returns different result

Normal directions are matched prior to evaluate surface but evaluate surface and SUrface.NormalAt() returns different result. As you can see, surface at index 16 is flipped to match the base geometry, but it seems that NormalAt() returns normal vector that is not flipped.
I have tried same operation with baking the surfaces and flipping the surface manually and also tried with joining them to polysurface(which also matches face normals) but results were same.
Am I doing something wrong?
Please see attached GH.

problem.gh (16.8 KB)

In RhinoCommon the Surface type supports no trims, and no normal flipping. For that you need BrepFace, which is what a Grasshopper “surface” really is.

Thank you David as always. I have one more question. What about NurbsSurface? What are the differences between NurbSurface and BrepFace?

Hi - I’m not sure where you got that term from but a “NurbsSurface” probably is the same as a surface.
Other than that:


NurbsSurface is same as Surface except NurbsSurface let’s you access more properties, constructors, and methods. Surfaces are a protected class and are the root of NurbsSurface. Same goes for Curve > NurbsCurve. You can see it here in the inheritance tree: https://developer.rhino3d.com/api/RhinoCommon/html/T_Rhino_Geometry_NurbsSurface.htm

1 Like

Never knew the existence of such class… Thank you.