fix size error on eigen mesh conversions for custom point attributes

This commit is contained in:
Alessandro Muntoni 2023-11-16 10:32:20 +01:00
parent c5b5b701ef
commit 06c2e556be

View File

@ -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);
@ -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);