Skip to content

Commit

Permalink
fix size error on eigen mesh conversions for custom point attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
alemuntoni committed Nov 16, 2023
1 parent c5b5b70 commit 06c2e55
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/common/utilities/eigen_mesh_conversions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -479,7 +479,7 @@ void meshlab::addVertexVectorAttribute(
QString::fromStdString(attributeName));
}
h = vcg::tri::Allocator<CMeshO>::AddPerVertexAttribute<Point3m>(mesh, attributeName);
for (unsigned int i = 0; i < attributeValues.size(); ++i) {
for (unsigned int i = 0; i < attributeValues.rows(); ++i) {
h[i][0] = attributeValues(i, 0);
h[i][1] = attributeValues(i, 1);
h[i][2] = attributeValues(i, 2);
Expand Down Expand Up @@ -514,7 +514,7 @@ void meshlab::addFaceVectorAttribute(
QString::fromStdString(attributeName));
}
h = vcg::tri::Allocator<CMeshO>::AddPerFaceAttribute<Point3m>(mesh, attributeName);
for (unsigned int i = 0; i < attributeValues.size(); ++i) {
for (unsigned int i = 0; i < attributeValues.rows(); ++i) {
h[i][0] = attributeValues(i, 0);
h[i][1] = attributeValues(i, 1);
h[i][2] = attributeValues(i, 2);
Expand Down

0 comments on commit 06c2e55

Please sign in to comment.