Grasshopper

algorithmic modeling for Rhino

I can't compute mesh normals and I have no idea why.

I start with a flat mesh and the normals are inherited. Obviously they are Vertical

I iterate through the mesh and change the vertices position (in the z direction)

When I go through the next iteration, I recompute with:

myMesh.Normals.ComputeNormals();

but they end up the same. Even after I've moved the vertex positions...

Then I tried:

myMesh.Normals.Clear();
myMesh.Normals.ComputeNormals();

Still no change.

Rhino has a command called RebuildMeshNormals and if I bake the thing then do that and bring it back in the normals are right. I couldn't find an equivalent command in C# or VB

I am using Grasshopper 0.9.0076 (aka Grasshopper 1.0)

Views: 462

Attachments:

Replies to This Discussion

This usually does the trick:

myMesh.FaceNormals.ComputeFaceNormals();
myMesh.Normals.ComputeNormals();




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