algorithmic modeling for Rhino
Tags:
Can you be a little more specific about what exactly you're trying to do? to which "topology functions" are you referring?
Could you post an example of a mesh which displays this behaviour?
Anders, just try using these functions/methods on any imported mesh, or any rhino mesh that has an unequal x and y face count.
Is it that you're trying to apply TopologyVertices directly to the mesh Vertices? If so, the two are managed separately, which I also find a bit troublesome. You have to pass back and forth between them:
'with m as your mesh
Dim vtx As Int32 = my_mesh_vertex 'the mesh vertex you want to find adjacent vertices for
Dim t_vtx As Int32 = m.TopologyVertices.TopologyVertexIndex(vtx) 'get the topology vertex related to your mesh vertex
Dim ct_vtc() As Int32 = m.TopologyVertices.ConnectedTopologyVertices(t_vtx) 'get the connected topology vertices
Dim vtc As New List(Of Int32) 'the list of mesh vertex indices
Dim vtc_pts As New List(Of Point3d) 'the list of vertices as points
For i As int32 = 0 To ct_vtc.length - 1
vtc.Add(m.TopologyVertices.MeshVertexIndices(ct_vtc(i))(0)) 'get the first mesh vertex related to each connected topology vertex
vtc_pts.Add(m.Vertices(vtc.last))
Next
I am right now playing around with making a half-edge .net class so that I can play with triangulated meshes and avoid exactly this sort of thing.
Thanks for the insight David, good to know that the two List types are stored differently, although I was hoping this wasn't the case. Also thanks for the example.
Welcome to
Grasshopper
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
© 2024 Created by Scott Davidson. Powered by