Skip to content
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

Error in directional::dual_cycles #52

Open
ioannaMitropoulou opened this issue Oct 28, 2021 · 3 comments
Open

Error in directional::dual_cycles #52

ioannaMitropoulou opened this issue Oct 28, 2021 · 3 comments
Labels

Comments

@ioannaMitropoulou
Copy link

Hello, I am trying to use the function directional::dual_cycles, but I get an error when it's trying to build from Triplets the basisCycles.

My code is very simple:

#include <igl/readOBJ.h>
#include <igl/edge_topology.h>
#include <igl/triangle_triangle_adjacency.h>
#include <directional/curl_matching.h>
#include <igl/barycenter.h>

Eigen::MatrixXd V;
Eigen::MatrixXi F;
Eigen::SparseMatrix<double> basisCycles;
Eigen::MatrixXi EV, FE, EF;
Eigen::MatrixXd barycenters, faceNormals;
Eigen::VectorXi matching;
Eigen::VectorXd cycleCurvature;
Eigen::VectorXi vertex2cycle;
Eigen::VectorXi innerEdges;

int main()
{
  igl::readOBJ("tpms.obj", V, F);
  igl::edge_topology(V, F, EV,FE,EF);
  igl::barycenter(V,F,barycenters);
  
  directional::dual_cycles(V, F,EV, EF, basisCycles, cycleCurvature, vertex2cycle, innerEdges);
}

Here is the mesh that I'm using when this error occurs:
https://www.dropbox.com/s/a2zjmk8l5w57h7f/tpms.obj?dl=0

image

Do you have any suggestions about how I could fix this issue? Could it be a problem in input the geometry?

Thanks,
Ioanna

Stack Trace:

 	ucrtbased.dll!00007ffe06437475()	Unknown
 	ucrtbased.dll!00007ffe06437613()	Unknown
 	ucrtbased.dll!00007ffe0644d86d()	Unknown
 	ucrtbased.dll!00007ffe064534b5()	Unknown
 	ucrtbased.dll!00007ffe06453027()	Unknown
 	ucrtbased.dll!00007ffe064510b8()	Unknown
 	ucrtbased.dll!00007ffe06453a1f()	Unknown
>	000_Ioannas_integration_bin.exe!Eigen::internal::set_from_triplets<std::_Vector_iterator<std::_Vector_val<std::_Simple_types<Eigen::Triplet<double,int>>>>,Eigen::SparseMatrix<double,0,int>,Eigen::internal::scalar_sum_op<double,double>>(const std::_Vector_iterator<std::_Vector_val<std::_Simple_types<Eigen::Triplet<double,int>>>> & begin, const std::_Vector_iterator<std::_Vector_val<std::_Simple_types<Eigen::Triplet<double,int>>>> & end, Eigen::SparseMatrix<double,0,int> & mat, Eigen::internal::scalar_sum_op<double,double> dup_func) Line 934	C++
 	000_Ioannas_integration_bin.exe!Eigen::SparseMatrix<double,0,int>::setFromTriplets<std::_Vector_iterator<std::_Vector_val<std::_Simple_types<Eigen::Triplet<double,int>>>>>(const std::_Vector_iterator<std::_Vector_val<std::_Simple_types<Eigen::Triplet<double,int>>>> & begin, const std::_Vector_iterator<std::_Vector_val<std::_Simple_types<Eigen::Triplet<double,int>>>> & end) Line 996	C++
 	000_Ioannas_integration_bin.exe!directional::dual_cycles(const Eigen::Matrix<double,-1,-1,0,-1,-1> & V, const Eigen::Matrix<int,-1,-1,0,-1,-1> & F, const Eigen::Matrix<int,-1,-1,0,-1,-1> & EV, const Eigen::Matrix<int,-1,-1,0,-1,-1> & EF, Eigen::SparseMatrix<double,0,int> & basisCycles, Eigen::Matrix<double,-1,1,0,-1,1> & cycleCurvature, Eigen::Matrix<int,-1,1,0,-1,1> & vertex2cycle, Eigen::Matrix<int,-1,1,0,-1,1> & innerEdges) Line 203	C++
 	000_Ioannas_integration_bin.exe!main() Line 24	C++
 	[External Code]	
@avaxman
Copy link
Owner

avaxman commented Nov 1, 2021

I was able to reproduce. Looking into it.

@avaxman
Copy link
Owner

avaxman commented Nov 1, 2021

Yes, there is something wrong (I knew it for a long time, but so far it worked on most meshes) in the way I separate boundary from generator cycles. I am putting this up as a bug. Thanks!

@avaxman avaxman added the bug label Nov 1, 2021
@avaxman
Copy link
Owner

avaxman commented Nov 1, 2021

Actually already related to: #21

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants