Files
test/source/blender/geometry/intern
Germano Cavalcante 113004687d Refactor: Mesh Merge By Distance
- Deduplicate code;
- Support no customdata interpolation for edges;
- Reduce number of required elements in context arrays.

With 74772c6920, the merge by distance code for meshes now supports
optional interpolation of custom data for vertices.

As this can be advantageous for performance and memory, it seems
convenient to support the same for edges (and in the future polygons
and corners).

So this commit reworks the code that finds the edge groups to match the
same used for vertices and thus deduplicating and simplifying the code.

Conveniently the `edge_ctx_map` array is no longer needed and can be
removed to save memory.

However it was necessary to create another array (which is usually
smaller) called `double_edges` (to match `double_verts`).

---

**Results:**

The profiling result depends on some factors such as:
- interpolate or not interpolate customdata;
- affect a large or small portion of the mesh;

The best case is when the customdata **is not** interpolated and the operation affects **large** portions of the mesh:

| Before:    | After:     | Factor: |
| ---------- | ---------- | ------- |
| 1256.61 ms | 1073.218 ms| -14.44% |

The worst case is when the customdata **is not** interpolated and the operation affects **small** portions of the mesh:

| Before:   | After:    | Factor: |
| --------- | --------- | ------- |
| 1077.50 ms| 1086.7 ms| +0.85%  |

Pull Request: https://projects.blender.org/blender/blender/pulls/109836
2023-07-10 14:55:38 +02:00
..
2023-06-20 21:10:30 +10:00