A kind of line tracing in a point cloud


I am new to Grasshopper and try to analyze a point cloud.The goal is to find polylines in a linear point cloud.
I have calculated a bounding box around the point cloud and a number of planes to project the points onto the planes with a tolarance (Cloud|Plane). Now the next step would be to use square cells on the planes to evaluate where the most points are. After that I want to calculate a center point and then draw a polyline through it (a kind of line tracing).
Does anybody have an idea how I can get from the points on the planes to the cells with the most points and a following center point?

I would orient the points to XY planes.

Then create a grid of cells and access them based on point x y coord rounding.
It seems like marching squares method.

However I am not about the polyline tracing.
Did you try Alpha shape method? You can find it here on the forum, which is super slow but works from time to time.

The goal is a 3D polyine. Don’t I lose the Z-information when I align the points on XY planes.