gaschler / bounding-mesh

Implementation of the bounding mesh and bounding convex decomposition algorithms for single-sided mesh approximation
http://www.boundingmesh.com
BSD 2-Clause "Simplified" License
333 stars 47 forks source link

Eigen/src/Core/DenseBase.h:257: void Eigen::DenseBase<Derived>::resize(Eigen::Index, Eigen::Index) [with Derived = Eigen::Block<Eigen::Diagonal<Eigen::Matrix<double, 3, 3>, 0>, -1, 1, false>; Eigen::Index = long int]: Assertion `rows == this->rows() && cols == this->cols() && "DenseBase::resize() does not actually allow one to resize." #33

Open kingjin94 opened 4 years ago

kingjin94 commented 4 years ago

When using bounding-convex-decomposition this assertion fails: bounding-convex-decomposition: /usr/include/eigen3/Eigen/src/Core/DenseBase.h:257: void Eigen::DenseBase::resize(Eigen::Index, Eigen::Index) [with Derived = Eigen::Block<Eigen::Diagonal<Eigen::Matrix<double, 3, 3>, 0>, -1, 1, false>; Eigen::Index = long int]: Assertion `rows == this->rows() && cols == this->cols() && "DenseBase::resize() does not actually allow one to resize."' failed. I tracked the error down to the last line in VoxelSubset::ComputePrincipalAxes within SegmenterDownsampling.cpp, in case the svd contains singular values which are 0. Here svd.singularValues() returns all singular values including zeros while the left hand side only wants to assign the non-zero elements due to "head(svd.nonzeroSingularValues())". Removing the .head(...) part from the assignment solved the assertion error.

RodrigoFBernardo commented 2 years ago

I have the same error:

bounding-convex-decomposition: /usr/include/eigen3/Eigen/src/Core/DenseBase.h:257: void Eigen::DenseBase<Derived>::resize(Eigen::Index, Eigen::Index) [with Derived = Eigen::Block<Eigen::Diagonal<Eigen::Matrix<double, 3, 3>, 0>, -1, 1, false>; Eigen::Index = long int]: Assertion rows == this->rows() && cols == this->cols() && "DenseBase::resize() does not actually allow one to resize."' failed.