Yup - I use an accumulator where the group index is the point index transferred by closest - this allows you to “count” how many points occupy the same space ( method required since curves don’t know about “connecting edges”, only meshes have that concept )
Your method appears like it would work best with vector-type handles… aligned or auto would always give a dot product of -1… Which is why I stick to Poly-Curves or evaluated curves for these types of calculations.
P.S. forgot to add that I scaled the “previous” delta-vector by -1 in my example’s dot-product to make the point-angles easier to interpret:
Also, Check out higgsas’ method for calculating mesh point-tangents here (which you can use to calculate the point-angles):
Good luck…