@@ -17,15 +17,16 @@ const char *ds_isolines = R"igl_Qu8mg5v7(
1717
1818Parameters
1919----------
20- V #V by dim list of mesh vertex positions
21- F #F by 3 list of mesh faces (must be triangles)
22- z #V by 1 list of function values evaluated at vertices
23- n the number of desired isolines
20+ V #V by dim list of mesh vertex positions
21+ F #F by 3 list of mesh triangle indices into V
22+ S #S by 1 list of per-vertex scalar values
23+ vals #vals by 1 list of values to compute isolines for
2424
2525Returns
2626-------
27- isoV #isoV by dim list of isoline vertex positions
28- isoE #isoE by 2 list of isoline edge positions
27+ iV #iV by dim list of isoline vertex positions
28+ iE #iE by 2 list of edge indices into iV
29+ I #iE by 1 list of indices into vals indicating which value
2930
3031See also
3132--------
@@ -44,21 +45,23 @@ Examples
4445npe_function (isolines)
4546npe_doc(ds_isolines)
4647
47- npe_arg(v , dense_float, dense_double)
48- npe_arg(f , dense_int, dense_long, dense_longlong)
49- npe_arg(z, dense_float, dense_double )
50- npe_arg(n, int )
48+ npe_arg(V , dense_float, dense_double)
49+ npe_arg(F , dense_int, dense_long, dense_longlong)
50+ npe_arg(S, npe_matches(V) )
51+ npe_arg(vals, npe_matches(S) )
5152
5253
5354npe_begin_code()
5455
55- assert_valid_23d_tri_mesh(v, f);
56- assert_rows_match (v, z, " v" , " z" );
57- assert_cols_equals (z, 1 , " z" );
58- EigenDenseLike<npe_Matrix_v> iso_v;
59- EigenDenseLike<npe_Matrix_f> iso_e;
60- igl::isolines (v, f, z, n, iso_v, iso_e);
61- return std::make_tuple(npe::move(iso_v), npe::move(iso_e));
56+ assert_valid_23d_tri_mesh(V, F);
57+ assert_rows_match (V, S, " V" , " S" );
58+ assert_cols_equals (S, 1 , " S" );
59+ EigenDenseLike<npe_Matrix_V> iV;
60+ EigenDenseLike<npe_Matrix_F> iE;
61+ Eigen::Matrix<typename npe_Matrix_F::Scalar, Eigen::Dynamic, 1 > I;
62+ Eigen::Matrix<typename npe_Matrix_vals::Scalar, Eigen::Dynamic, 1 > vals_copy = vals;
63+ igl::isolines (V, F, S.col(0 ), vals_copy, iV, iE, I);
64+ return std::make_tuple(npe::move(iV), npe::move(iE), npe::move(I));
6265
6366npe_end_code ()
6467
0 commit comments