VL sort along curve

Hi ggml,

so, it looks like that two parts of your question can be solved like this:

The patch is attached.

q_vl_nearest_usage_am_2.zip (24.0 KB)

Best,
Anton