We present an algorithm to approximate a set of unorganized points with a simple curve without self-intersections. The moving least-squares method has a good ability to reduce a point cloud to a thin curve-like shape which is a near-best approximation of the point set. In this paper, an improved moving least-squares technique is suggested using Euclidean minimum spanning tree, region expansion and refining iteration. After thinning a given point cloud using the improved moving least-squares technique we can easily reconstruct a smooth curve. As an application, a pipe surface reconstruction algorithm is presented.