Skip to content

Index issue in mesh::refine #934

@Luoshetiange30

Description

@Luoshetiange30

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions