Alright. So I have a line of points. But not only 1 line. Multiple lines. I say "lines", because the points have all been projected to the same magnitude. So they're all lined up. I used what I learned in this other question to get the lines of points.
Now that they're all lined up, I want to scale them and fit them to their respective edges. The edges are just that: edges of a mesh. The problem is that each point-line is either smaller or larger than its respective edge. And misaligned too. I want them to match up, while still retaining the proportional distance of the points. Like this:
I've thought of a number of half-baked ideas:
The first instinct was to reach for the attribute statistics node. But as far as I'm aware, that thing can only work a single set of attributes at a time. It can't work each group of points individually.
Using the accumulate field node, each point-line can have their points added up, then divided to get the average. On my first test, I fooled myself into believing that actually got the middle point of each point-line. But no, the average is weighted to either one side or the other. I tried a bunch of stuff using this weighted average, but couldn't figure anything out. My guess is that I need the middle point. If only I could just get the minimum and maximum of each point-line. 🤔
Pursuing the middle point(vainly?), I turned to the Points to Curve node. Perhaps turning each point-line to a curve, I can select the middle of the curve, which would also be the middle of the point-line. Or, alternatively, I could just move the curve by selecting the ends, and moving them to the ends of the edges. I couldn't figure out either of these things. The endpoint selection node baffled me. I selected something, but I'm not sure they were the endpoints. If they were , then that means the end points aren't actually at the ends. Which means the Points to Curve node selected middle points as curve ends.
Well in any case. I'm stuck. Any ideas?