Skip to content

Improve node join w/ large variance in bezier handle length

Version: Inkscape 1.4.2 (ebf0e940d0, 2025-05-08)

Description

Current node join algorithm has a flaw where it produces nonsense results if merged nodes greatly vary in length of their curve handles:

image

This is less apparent in the above image as opposed to a common case with duplicate nodes:

image

In top part, there's two cusp nodes on top of each other, first is useless and second has a large bezier handle. Result (second part) should be the same as if only the first node was deleted.

The algorithm should take into account how large the handles are. If handles of first/last node are orders of magnitude larger than inner merged nodes, then the result shouldn't be a node that's shifted largely towards the middle of edge node bezier handle because inner nodes can be removed and the result would look more correct.

The opposite case, where inner nodes have large handles works the way I'd expect it to:

image

Edited by Tin Švagelj
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information