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

Index issue in mesh::refine #934

Open
Luoshetiange30 opened this issue Jul 10, 2023 · 0 comments
Open

Index issue in mesh::refine #934

Luoshetiange30 opened this issue Jul 10, 2023 · 0 comments

Comments

@Luoshetiange30
Copy link

in the function 'MeshRefiner::refine()', why the index of new2old_points and attributes are different, it seems to cause mismatch between points and uvs

auto find_or_emit_vertex = [&](int vi, int ii) { int offset = connection.v2f_offsets[vi]; int connection_count = connection.v2f_counts[vi]; for (int ci = 0; ci < connection_count; ++ci) { int& ni = old2new_indices[connection.v2f_indices[offset + ci]]; if (ni != -1 && compare_all_attributes(ni, ii)) { return ni; } else { ni = (int)new_points.size(); new_points.push_back(points[vi]); new2old_points.push_back(vi); for (auto& attr : attributes) attr->emit(ii); return ni; } } return 0; };

new2old_points saves vi while attr saves ii, does it right?

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

No branches or pull requests

1 participant