Commit Graph

2 Commits

Author SHA1 Message Date
Campbell Barton
f5ec03698c License headers: add SPDX headers 2024-07-20 13:55:45 +10:00
Lukas Tönne
d0089e6fe1 GPv3: Automerge feature for joining curve endpoints by distance
This implements the _automerge_ feature which finds nearby end points
during stroke draw and merges the new curve with existing strokes.

New utility functions are added in `geometry` for slightly generalized
functionality. The `curves_merge_endpoints` takes an index map that
describes how to connect curves by index. It performs a topological sort
and reorders connected curves into contiguous ranges. This can be used
with an arbitrary number of connected curves. The tool feature itself
only uses a single curve, based on 2D end point positions.

Unit tests have been added for the curve merge utility function.

Pull Request: https://projects.blender.org/blender/blender/pulls/124459
2024-07-12 11:21:23 +02:00