Grasshopper

algorithmic modeling for Rhino

Counting U-V Vertices Per Columns or Rows on Imported Maya Mesh.

Afternoon All

How would i go about counting the number of U-V vertices per row /column on an imported maya mesh surface.  So i can use the workflow i know from divide surface frames for a project. I have been able extract the vertices and create the planes from the normals but as this is my first project working with meshes i don't know the best way to count them row by row paramertically.

Thanks
Matt

Views: 861

Replies to This Discussion

Hi Matt,

I don't think that's possible. The number of total vertices (provided the mesh is not closed, or, if it is, vertices on the seam are not shared) of a rectangular grid mesh is W×H. If the mesh is known to have the same density in both directions (i.e. W == H) then you can take the square root of the total number and figure out the number of points in both directions.

If however the mesh is not square, there's no easy way to really figure out whether it's supposed to be 20×5 or 5×20, or 10×10 or 25×4 or 4×25. You might be able to figure it out by looking at mesh topology, i.e. which faces are connected by edges, but that takes a lot of coding. You might also be able to figure it out by looking at the shape of the mesh, to try and find a single column of points by their positions, but this will require some pretty heavy duty heuristics.

--
David Rutten
david@mcneel.com
Seattle, WA
Hi David

Thanks for that i will see if i can aquire the infomation from the mesh in maya then link this Numeric info to GH.

Thanks
Matt

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