Grasshopper

algorithmic modeling for Rhino

I have a fairly simple triangle mesh that has some inconsistency in face normals. Any easy way to make these triangles all face the same direction? Thanks.

Views: 3343

Replies to This Discussion

Try:

Private Sub RunScript(ByVal x As Mesh,  ByRef A As Object)
A = x.UnifyNormals()
End Sub

Thanks for the reply. I'm fairly new to VB, what am I missing to get out the mesh?

Ouch, sure...
Write this:


x.UnifyNormals()

A = x

VB script ran clean but accomplished the same thing UTO unify normals component did. I was able to test the vectors against each other below, but this solution only works on a flat mesh.

Could you upload the mesh?

Attached. Thanks for the help.

Attachments:

Ok well, I attached two solutions, but are unique solutions for your mesh.
The first arranges the points of each face using the direction of one face (only works for cuasi-flat meshes).
The second ordered the two initial groups of meshes and unifies normal in each group, then joins them together.
It is not the solution you expected, but maybe serve to muddle through.

Attachments:

A third solution, ordering the faces by distance + unify normals.

Attachments:

Well I think that mesh is not computationally correct/clean because if you add subdivisions in certain faces, vertices must also add to the topology. You are doing as A, whose new vertices are "above" the edges of faces, whereas in B, neighboring faces are also subdivided to compensate and redefine the topology. I think this may be causing you get strange results.

Computationally this makes perfect sense, however away from the modulation intent. A second iteration of subdivision also causes some unique moments:

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