add pyigl seam_edges

This commit is contained in:
Zhongshi Jiang
2018-02-16 22:41:16 +08:00
parent 84d078222e
commit ea005c91e0
4 changed files with 54 additions and 0 deletions
+30
View File
@@ -1470,3 +1470,33 @@ const char *__doc_igl_readPLY= R"igl_Qu8mg5v7(// Read a mesh from an ascii ply f
// N double matrix of corner normals #N by 3
// UV #V by 2 texture coordinates
// Returns true on success, false on errors)igl_Qu8mg5v7";
const char *__doc_igl_seam_edges=R"igl_Qu8mg5v7(// Finds all UV-space boundaries of a mesh.
//
// Inputs:
// V #V by dim list of positions of the input mesh.
// TC #TC by 2 list of 2D texture coordinates of the input mesh
// F #F by 3 list of triange indices into V representing a
// manifold-with-boundary triangle mesh
// FTC #F by 3 list of indices into TC for each corner
// Outputs:
// seams Edges where the forwards and backwards directions have different
// texture coordinates, as a #seams-by-4 matrix of indices. Each row is
// organized as [ forward_face_index, forward_face_vertex_index,
// backwards_face_index, backwards_face_vertex_index ] such that one side
// of the seam is the edge:
// F[ seams( i, 0 ), seams( i, 1 ) ], F[ seams( i, 0 ), (seams( i, 1 ) + 1) % 3 ]
// and the other side is the edge:
// F[ seams( i, 2 ), seams( i, 3 ) ], F[ seams( i, 2 ), (seams( i, 3 ) + 1) % 3 ]
// boundaries Edges with only one incident triangle, as a #boundaries-by-2
// matrix of indices. Each row is organized as
// [ face_index, face_vertex_index ]
// such that the edge is:
// F[ boundaries( i, 0 ), boundaries( i, 1 ) ], F[ boundaries( i, 0 ), (boundaries( i, 1 ) + 1) % 3 ]
// foldovers Edges where the two incident triangles fold over each other
// in UV-space, as a #foldovers-by-4 matrix of indices.
// Each row is organized as [ forward_face_index, forward_face_vertex_index,
// backwards_face_index, backwards_face_vertex_index ]
// such that one side of the foldover is the edge:
// F[ foldovers( i, 0 ), foldovers( i, 1 ) ], F[ foldovers( i, 0 ), (foldovers( i, 1 ) + 1) % 3 ]
// and the other side is the edge:
// F[ foldovers( i, 2 ), foldovers( i, 3 ) ], F[ foldovers( i, 2 ), (foldovers( i, 3 ) + 1) % 3 ])igl_Qu8mg5v7";