OpenSubdiv: Correction to vert edge/face orientation code
authorSergey Sharybin <sergey.vfx@gmail.com>
Mon, 3 Aug 2015 12:26:31 +0000 (14:26 +0200)
committerSergey Sharybin <sergey.vfx@gmail.com>
Mon, 3 Aug 2015 12:27:34 +0000 (14:27 +0200)
non-manifold case didn't start ordering from the correct edge.

intern/opensubdiv/opensubdiv_converter.cc

index c0fca86ebabcfadcd076da6e2c446e0804c724d8..74c02ec5ebc7e019879920dfe35304c76bcf05cb 100644 (file)
@@ -235,8 +235,8 @@ inline bool TopologyRefinerFactory<OpenSubdiv_Converter>::assignComponentTopolog
                                        bool start_found = false;
                                        edge_start = vert_edges[i];
                                        IndexArray edge_faces = getBaseEdgeFaces(refiner, edge_start);
-                                       for (int j = 0; j < edge_faces.size(); ++j) {
-                                               face_start = edge_faces[j];
+                                       if (edge_faces.size() == 1) {
+                                               face_start = edge_faces[0];
                                                if (!face_used[face_start]) {
                                                        ConstIndexArray
                                                            face_verts = getBaseFaceVertices(refiner, face_start),