-
Notifications
You must be signed in to change notification settings - Fork 63
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Request: Adding isolines_intrinsic to the python bindings #230
Labels
Comments
Thanks!. Would you like to submit that as a pull request?
…On Mon, Jun 10, 2024 at 3:21 AM Daniel ***@***.***> wrote:
Hello,
I believe exposing the isolines_intrinsic function with a Python binding
could be highly beneficial. This function can be particularly useful when
interpolating data beyond point coordinates. Here is the file I added to my
build to access isolines_intrinsic. It seems to work without issues so far:
// This file is part of libigl, a simple c++ geometry processing library.
//
// Copyright (C) 2023 Teseo Schneider
//
// This Source Code Form is subject to the terms of the Mozilla Public License
// v. 2.0. If a copy of the MPL was not distributed with this file, You can
// obtain one at http://mozilla.org/MPL/2.0/.
//TODO: __example
#include <common.h>
#include <npe.h>
#include <typedefs.h>
#include <igl/isolines_intrinsic.h>
const char *ds_isolines_intrinsic = R"igl_Qu8mg5v7(
Constructs isolines interpolation parameters for a function z given on a mesh (V,F)
Parameters
----------
F #F by 3 list of mesh triangle indices into V
S #S by 1 list of per-vertex scalar values
vals #vals by 1 list of values to compute isolines for
Returns
-------
iB #iB by 3 list of barycentric coordinates
iFI #iB list of triangle indices for each row of iB
iE #iE by 2 list of edge indices into iV
I #iE by 1 list of indices into vals indicating which value
See also
--------
Notes
-----
None
Examples
--------
)igl_Qu8mg5v7";
npe_function(isolines_intrinsic)
npe_doc(ds_isolines_intrinsic)
npe_arg(F, dense_int32, dense_int64)
npe_arg(S, dense_float, dense_double)
npe_arg(vals, npe_matches(S))
npe_begin_code()
assert_cols_equals(S, 1, "S");
Eigen::Matrix<typename npe_Matrix_S::Scalar, Eigen::Dynamic, 3> iB;
Eigen::Matrix<int, Eigen::Dynamic, 1> iFI;
EigenDenseLike<npe_Matrix_F> iE;
Eigen::Matrix<typename npe_Matrix_F::Scalar, Eigen::Dynamic, 1> I;
Eigen::Matrix<typename npe_Matrix_vals::Scalar, Eigen::Dynamic, 1> vals_copy = vals;
igl::isolines_intrinsic(F, S.col(0), vals_copy, iB, iFI, iE, I);
return std::make_tuple(npe::move(iB), npe::move(iFI), npe::move(iE), npe::move(I));
npe_end_code()
This was useful for me, so I though maybe someone else could need it at
some point
—
Reply to this email directly, view it on GitHub
<#230>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AARDJGPU7KIG5ZUEL253EGTZGVHXZAVCNFSM6AAAAABJBWWBA6VHI2DSMVQWIX3LMV43ASLTON2WKOZSGM2DGMBXGI3DCMQ>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello,
I believe exposing the isolines_intrinsic function with a Python binding could be highly beneficial. This function can be particularly useful when interpolating data beyond point coordinates. Here is the file I added to my build to access isolines_intrinsic. It seems to work without issues so far:
This was useful for me, so I though maybe someone else could need it at some point
The text was updated successfully, but these errors were encountered: