Create regularly spaced points along a bezier curve

Just wondering if anyone knows if this is possible. What I’d like to do is take a bezier curve and create points along it every 5cm. Currently I’m doing it manually by snapping to it, but it’s imprecise and slow.

Ideally what I’d like to be able to do is write some function that returns an array of points that exist where it intersects the y-plane located at y coordinate C. That way I can just iterate along the curve and generate points.

Alternatively, is there any way of converting it to a mesh which gives a point every 5cm?

Just an update. I’m currently working on this by converting the bezier to a high-vertex mesh first, then resampling that mesh to get the result I want. It’s not as precise as I’d like but it’s probably good enough for this project.

How did you resample it? I am looking for something similar. Basically rebuild and set target vertex count while keeping the overall shape.