Grasshopper

algorithmic modeling for Rhino

There have been discussion posts on this topic before, but I've yet to see a satisfactory response....

I am getting incorrect normal vectors from the Evaluate Surface component.  The baked surface (see attached .jpg) is clearly downward-facing ({0, 0, -1}), but the Eval component returns an upward-pointing normal ({0, 0, 1}).  Flipping the surface in Grasshopper (or in Rhino) does not change the direction of the normal, according to the Eval component.

Thoughts?

-Jon


eval surface normals.jpg

Views: 1114

Replies to This Discussion

This has been answered before, and I thought that the "bug" had been fixed. Internally Rhino really only wants to deal with right handed planes. Depending on the direction of your surface, the orientation of the surface may be left handed. In those situations, Rhino still thinks of those surfaces as if they had a right handed orientation in regards to any sort of NURBS calculations, and flips the normals for display purposes. Rhino keeps a boolean value to keep track of whether or not the surface is "naturally" right handed (and thus does not need to reverse its normals), or whether it is left handed (and therefore needs reversing).

Here's some code which you can use to retrieve that boolean value so you can flip the normal(s) if need be. Just paste it into a code component, change one of the inputs to B, and the type hint to OnBrep...

Dim orientationList As New List(Of Boolean)

For i As Integer = 1 To b.m_F.Count
orientationList.Add(b.m_F(i - 1).m_bRev)
Next

A = orientationList
you have to use a dotnet vb script component if you use GH 07.XXX

to]

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