Grasshopper

algorithmic modeling for Rhino

Adding mesh to document returns guid 00000000-0000-0000-0000-000000000000 ???

Hi,

I'm having some problems with the following lines of code.

msh = rs.JoinMeshes ((msh,newMsh), True)
rs.UnifyMeshNormals(msh)

mesh = rs.coercemesh(msh)
Rhino.Geometry.Collections.MeshVertexList.CombineIdentical(mesh.Vertices, True, True)
mesh = sc.doc.Objects.AddMesh(mesh)

I run this because rs.JoinMeshes doesn't seem to weld the vertices, and there doesn't appear to be any weld method in rhino python. This works most of the time, but sometimes it returns a mesh with guid 00000000-0000-0000-0000-000000000000, which I'm guessing is different than returning False, but it is not a valid mesh? Can someone help me understand what is happening?

Thanks! files attached.

Views: 461

Attachments:

Replies to This Discussion

I figured out the problem. I'm generating a mesh that gets subdivided too small in some places, i.e., vertices are within 0.00001 of each other. Is there a way to merge vertices within a certain tolerance?

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