Generating polylines for individual stitches