I would have started with something like “Hi, I’m using Laurent’s definition from this other thread, I just deleted the reference panel in my file”
jokes apart, is always good and helpful to reference other’s work
that dispatch you grouped in your edit of Laurent’s file doesn’t wrongly select random segments: it selects segments depending on the point containment, which is based on the initial circle radius you set with the slider
in order to make Laurent’s definition work, the initial circles need to be small enough for each to only contain one single crossing, and of course you can’t have 3 portions of the same curve doing triple overlaps on the very same point like here on A:
don’t be afraid of setting the circle size as small as tolerance allows, as in this other post from Seghier (oh wait what it’s from the very same thread lololol ) he shows you can use Extend Curve component with negative values, in such a way the circles are just used to identify the trims, but the “length” of the trims/bridges can always be re-set with Extend Curve