Example. I drew a line with a pencil, set stroke to 5 px and made a shape using
Object->Path->Outline Stroke. Is it possible to convert this shape to line with a stroke again? 100% accuracy isn't necessary.
- Select your shape.
- Swap the fill back to stroke(shift x).
- Use the Scissors tool(C) to cut two end points on your shape (with the Scissors tool selected click on the first anchor point that was created when you used the pencil tool, and then click on the last anchor point that was created when you finished with the pencil tool.
- You should now have two paths similar to your original line. You can delete one of them
- You might run into trouble if your original pencil line overlapped itself.
I found a good solution here: https://forums.adobe.com/thread/568045?tstart=0
In a nutshell, you need to convert your shape into a stroke, remove caps at the end and apply a "Blend" between those 2 lines, with the following options (Specified Steps, number of steps: 1). So the line you want will be between 2 initial lines which you can remove.
Delete segments at the ends:
Object > Blend > Make. Then Object > Blend > Blend Options. Spacing: Specified Steps, number of steps: 1. Then Object > Blend > Expand:
- Add a stroke to the PATH, up the width until you just see a little bit of inner fill left.
- Object > Expand.
- You should have three paths now. Use the Direct Selection Tool to select the outer two paths and delete then. THEN USE @user26228 method above.
- Split the remaining path at it's tip using the eraser, scissors, direct selection tool, or what ever you preference is.
- Delete one of the remaining two paths.