Here is how I've rebuilt the stator of my bike, a Yamaha yp250 scooter, branded here in Italy as Majesty 250. It might be also valid for other brands.
The original part is WAY too expensive here (more than 600$), so I HAD to invent ways to solve the problem. I drove the bike using this rebuilt stator for about 600 miles now and its still working. Im not sure that the insulating paint I've used will stand the eat from the engine motor oil as the original.
So far so good....
Step 5 has a picture with the complete schematic of the wiring.
Suggestions and criticism are welcome.
Step 1: Original stator.
This is the original faulty stator. It has all of its 3 windings shorted to the metal body.
Step 2: Uncoiling the thing
This is a quite tedious job, as the epoxy is quite hard to remove. You might need the help of a screwdriver to lift up the wire inside and between the poles. Be careful while handling the copper wire as you unwind it. Some of its insulating paint bits, still attached, are sharp and might cut your skin.
Step 3: Preparing the support
Before recoiling the stator, make sure to prepare its surface, smoothing out with a file (or a minidrill) all the sharp edges. In my case this step was absolutely required as I mistakenly removed the epoxy residuals (as you can see in the first picture below) with a paint removal gel. I had to prepare 36 small pieces of mylar cardboards (same used in transformers windings) cut in right size and cover with them all the poles.