From 59b03433ea2cc4e2b10b679bc9f46cfc54d65c13 Mon Sep 17 00:00:00 2001 From: s-koch Date: Wed, 15 Feb 2017 16:01:33 +0100 Subject: [PATCH] Update docstrings Former-commit-id: 111e7f5d38370045b55b8bf8944d4685f5679ff3 --- python/py_doc.cpp | 154 +++++++++++++++++++++------------------ python/py_doc.h | 4 +- python/python_shared.cpp | 1 + 3 files changed, 89 insertions(+), 70 deletions(-) diff --git a/python/py_doc.cpp b/python/py_doc.cpp index 4499106e3..106a1f67a 100644 --- a/python/py_doc.cpp +++ b/python/py_doc.cpp @@ -88,27 +88,26 @@ const char *__doc_igl_barycentric_to_global = R"igl_Qu8mg5v7(// Converts barycen // bc: #Xx3 Barycentric coordinates, one row per point // // Output: - // #X: #Xx3 3D coordinates of all points in bc - // )igl_Qu8mg5v7"; + // #X: #Xx3 3D coordinates of all points in bc)igl_Qu8mg5v7"; const char *__doc_igl_bbw = R"igl_Qu8mg5v7(// Compute Bounded Biharmonic Weights on a given domain (V,Ele) with a given - // set of boundary conditions - // - // Templates - // DerivedV derived type of eigen matrix for V (e.g. MatrixXd) - // DerivedF derived type of eigen matrix for F (e.g. MatrixXi) - // Derivedb derived type of eigen matrix for b (e.g. VectorXi) - // Derivedbc derived type of eigen matrix for bc (e.g. MatrixXd) - // DerivedW derived type of eigen matrix for W (e.g. MatrixXd) - // Inputs: - // V #V by dim vertex positions - // Ele #Elements by simplex-size list of element indices - // b #b boundary indices into V - // bc #b by #W list of boundary values - // data object containing options, intial guess --> solution and results - // Outputs: - // W #V by #W list of *unnormalized* weights to normalize use - // igl::normalize_row_sums(W,W); - // Returns true on success, false on failure)igl_Qu8mg5v7"; + // set of boundary conditions + // + // Templates + // DerivedV derived type of eigen matrix for V (e.g. MatrixXd) + // DerivedF derived type of eigen matrix for F (e.g. MatrixXi) + // Derivedb derived type of eigen matrix for b (e.g. VectorXi) + // Derivedbc derived type of eigen matrix for bc (e.g. MatrixXd) + // DerivedW derived type of eigen matrix for W (e.g. MatrixXd) + // Inputs: + // V #V by dim vertex positions + // Ele #Elements by simplex-size list of element indices + // b #b boundary indices into V + // bc #b by #W list of boundary values + // data object containing options, intial guess --> solution and results + // Outputs: + // W #V by #W list of *unnormalized* weights to normalize use + // igl::normalize_row_sums(W,W); + // Returns true on success, false on failure)igl_Qu8mg5v7"; const char *__doc_igl_boundary_conditions = R"igl_Qu8mg5v7(// Compute boundary conditions for automatic weights computation. This // function expects that the given mesh (V,Ele) has sufficient samples // (vertices) exactly at point handle locations and exactly along bone and @@ -128,7 +127,11 @@ const char *__doc_igl_boundary_conditions = R"igl_Qu8mg5v7(// Compute boundary c // (notice the #b != #weights in general because #b will include all the // intermediary samples along each bone, etc.. The ordering of the // weights corresponds to [P;BE] - // Returns true if boundary conditions make sense)igl_Qu8mg5v7"; + // Returns false if boundary conditions are suspicious: + // P and BE are empty + // bc is empty + // some column of bc doesn't have a 0 (assuming bc has >1 columns) + // some column of bc doesn't have a 1 (assuming bc has >1 columns))igl_Qu8mg5v7"; const char *__doc_igl_boundary_facets = R"igl_Qu8mg5v7(// BOUNDARY_FACETS Determine boundary faces (edges) of tetrahedra (triangles) // stored in T (analogous to qptoolbox's `outline` and `boundary_faces`). // @@ -161,7 +164,7 @@ const char *__doc_igl_cat = R"igl_Qu8mg5v7(// Perform concatenation of a two mat // Inputs: // A first input matrix // B second input matrix - // dim dimension along which to concatenate, 0 or 1 + // dim dimension along which to concatenate, 1 or 2 // Outputs: // C output matrix // )igl_Qu8mg5v7"; @@ -394,9 +397,7 @@ const char *__doc_igl_cotmatrix = R"igl_Qu8mg5v7(// Constructs the cotangent sti // **minus** the sum of off-diagonal entries. The diagonal entries are // therefore in general negative and the matrix is **negative** semi-definite // (immediately, -L is **positive** semi-definite) - // - // Known bugs: off by 1e-16 on regular grid. I think its a problem of - // arithmetic order in cotmatrix_entries.h: C(i,e) = (arithmetic)/dblA/4)igl_Qu8mg5v7"; + //)igl_Qu8mg5v7"; const char *__doc_igl_covariance_scatter_matrix = R"igl_Qu8mg5v7(// Construct the covariance scatter matrix for a given arap energy // Inputs: // V #V by Vdim list of initial domain positions @@ -514,14 +515,21 @@ const char *__doc_igl_edge_lengths = R"igl_Qu8mg5v7(// Constructs a list of leng // for tets, columns correspond to edges // [3 0],[3 1],[3 2],[1 2],[2 0],[0 1] //)igl_Qu8mg5v7"; -const char *__doc_igl_edge_topology = R"igl_Qu8mg5v7(// Initialize Edges and their topological relations +const char *__doc_igl_edge_topology = R"igl_Qu8mg5v7(// Initialize Edges and their topological relations (assumes an edge-manifold + // mesh) // // Output: // EV : #Ex2, Stores the edge description as pair of indices to vertices // FE : #Fx3, Stores the Triangle-Edge relation // EF : #Ex2: Stores the Edge-Triangle relation // - // TODO: This seems to be a duplicate of edge_flaps.h)igl_Qu8mg5v7"; + // TODO: This seems to be a inferior duplicate of edge_flaps.h: + // - unused input parameter V + // - roughly 2x slower than edge_flaps + // - outputs less information: edge_flaps reveals corner opposite edge + // - FE uses non-standard and ambiguous order: FE(f,c) is merely an edge + // incident on corner c of face f. In contrast, edge_flaps's EMAP(f,c) reveals + // the edge _opposite_ corner c of face f)igl_Qu8mg5v7"; const char *__doc_igl_eigs = R"igl_Qu8mg5v7(See eigs for the documentation.)igl_Qu8mg5v7"; const char *__doc_igl_embree_ambient_occlusion = R"igl_Qu8mg5v7(// Compute ambient occlusion per given point // @@ -533,23 +541,6 @@ const char *__doc_igl_embree_ambient_occlusion = R"igl_Qu8mg5v7(// Compute ambie // S #P list of ambient occlusion values between 1 (fully occluded) and // 0 (not occluded) //)igl_Qu8mg5v7"; -const char *__doc_igl_embree_reorient_facets_raycast = R"igl_Qu8mg5v7(// Orient each component (identified by C) of a mesh (V,F) using ambient - // occlusion such that the front side is less occluded than back side, as - // described in "A Simple Method for Correcting Facet Orientations in - // Polygon Meshes Based on Ray Casting" [Takayama et al. 2014]. - // - // Inputs: - // V #V by 3 list of vertex positions - // F #F by 3 list of triangle indices - // rays_total Total number of rays that will be shot - // rays_minimum Minimum number of rays that each patch should receive - // facet_wise Decision made for each face independently, no use of patches - // (i.e., each face is treated as a patch) - // use_parity Use parity mode - // is_verbose Verbose output to cout - // Outputs: - // I #F list of whether face has been flipped - // C #F list of patch ID (output of bfs_orient > manifold patches))igl_Qu8mg5v7"; const char *__doc_igl_embree_line_mesh_intersection = R"igl_Qu8mg5v7(// Project the point cloud V_source onto the triangle mesh // V_target,F_target. // A ray is casted for every vertex in the direction specified by @@ -567,6 +558,23 @@ const char *__doc_igl_embree_line_mesh_intersection = R"igl_Qu8mg5v7(// Project // id b1 b2. id is the id of a face of the source mesh. b1 and b2 are // the barycentric coordinates wrt the first two edges of the triangle // To convert to standard global coordinates, see barycentric_to_global.h)igl_Qu8mg5v7"; +const char *__doc_igl_embree_reorient_facets_raycast = R"igl_Qu8mg5v7(// Orient each component (identified by C) of a mesh (V,F) using ambient + // occlusion such that the front side is less occluded than back side, as + // described in "A Simple Method for Correcting Facet Orientations in + // Polygon Meshes Based on Ray Casting" [Takayama et al. 2014]. + // + // Inputs: + // V #V by 3 list of vertex positions + // F #F by 3 list of triangle indices + // rays_total Total number of rays that will be shot + // rays_minimum Minimum number of rays that each patch should receive + // facet_wise Decision made for each face independently, no use of patches + // (i.e., each face is treated as a patch) + // use_parity Use parity mode + // is_verbose Verbose output to cout + // Outputs: + // I #F list of whether face has been flipped + // C #F list of patch ID (output of bfs_orient > manifold patches))igl_Qu8mg5v7"; const char *__doc_igl_find_cross_field_singularities = R"igl_Qu8mg5v7(// Inputs: // V #V by 3 eigen Matrix of mesh vertex 3D positions // F #F by 3 eigen Matrix of face (quad) indices @@ -643,7 +651,7 @@ const char *__doc_igl_get_seconds = R"igl_Qu8mg5v7(// Return the current time in // cout<<"part 2: "<