ok, here we go:
there are a few details: first, the type annotation on the input was somehow wrong. the name of a type is a unique identifier, that means that it needs an exact character sequence to find it: Spread<Vector3>
no spaces and case sensitive. it seems you typed that in differently.
your type LinePair was set to ‘Class’ which is probably not what you want in this case. instances of classes are not actually passed around like values (vectors, numbers) which have a solid link. instances of classes sit somewhere in a fixed memory location and you only pass around a reference to them which is indicated by a dashed link. i would change LinePair be a ‘Record’, so that you don’t have to think about this indirection while patching.
the VL spread is also a record, this means that as soon as you change it you have a new spread, same as in vvvv. this requires you to pass it thru every accumulator of every region. but here it comes: you stumbled over a bug we haven’t seen before. for some reason you can’t connect the LinePair spread to the accumulator input of the if region as long as it is a class. our fault, sorry!
but you can fix that with CTRL + click to force the link to the accumulator input, or simply change LinePair to Record.
then the loop that gets the A/B position has two issues:
same as above, the empty spread that you put in will be the same empty spread for each iteration of the loop. this is as if you would put in a number. it will always be the same number. if you want to increment the number on every iteration of the loop, you need to pass the new result on to the next iteration. so you have to input it as accumulator (instead of linking it directly into the loop) in order to get the new result from the last iteration of the loop.
same is true for the spread, you need to pass the new spread with one added element on to the next iteration of the loop by outputting it with an accumulator and input it with an accumulator.
second issue is, it does not need empty spreads to fill up at all, because you don’t want to output a spread with different size than the input spread, just one slice for each input LinePair. so simply use splicers there:
the rest should be easy… only one thing to consider, if you add a line for each pair that is closer together than the threshold, you will add the same line twice, because the loop in loop construct gives you each position pair twice, for each position you will get all other positions, you you will have AB and BA. but that’s not VL related…