Points to Lines turns a point cloud into a polyline: it connects each point to the next one in the order in which the points are stored in the cloud. It does not search for a path through the points by their position.
Use it when the points already describe a line in the right order, for example a contour, a profile or a measured path saved as a list of points. The result is a lines object that you can process with the tools of the Lines tab, such as Lines to Mesh, Offset for Lines or Extrusion Body.
A scan of a surface stores its points in an order that has nothing to do with a line, so Points to Lines turns it into a tangle of zigzags.

How to convert points to a line
- Select one or more point clouds in the Scene tree.
- Click Points › Points to Lines.
- Turn Closed Line on to connect the last point back to the first one, or leave it off (the default) for an open line.
- Click Convert, or press Enter.

Each cloud is replaced by a lines object with the same name, and the panel closes. The points become the vertices of the line, and point colors are kept. Undo (Ctrl+Z, or Cmd+Z on macOS) returns the point cloud.
If the first and the last point have exactly the same coordinates, the line is closed at that point whether Closed Line is on or off.
Points to Lines: Results
With Closed Line on, the last point is connected to the first one, and the line forms a loop. In this example, the polyline has 120 vertices and 120 edges.

With Closed Line off, the points are connected in the same order, but the last point is not connected to the first one. The polyline has 120 vertices and 119 edges, and the gap between the two end points stays open.

To turn a line back into points, use Lines to Points.