Created by: portnov
Addressed problem description
Consider you want to use a quad grid, i.e. a mesh made of quads only, arranged in topology equivalent to subdivided Plane object. If you make such mesh in other way than by use of Sverchok's "Plane" node, for example, by using Blender's standard "Subdivide" or "Extrude" operations, then most probably the order of vertices in such mesh will be near to random. On the other hand, sometimes you need these vertices to be ordered according to grid topology, row by row, column by column. For example, it can be useful for creating Nurbs surfaces with "Build NURBS Surface" node.
Solution description
Make a new node, "Sort Quad Grid". It takes a mesh (vertices, edges and faces) and outputs sorted vertices. It can output a separate list of vertices for each row, or join all rows into one list.
Implemented with bmesh
's BMLoop
API.
Preflight checklist
Put an x letter in each brackets when you're done this item:
-
Code changes complete. -
Code documentation complete. -
Documentation for users complete (or not required, if user never sees these changes). -
Manual testing done. -
Unit-tests implemented. -
Ready for merge.