Those little splines on the inner diameter would be really tough to machine. You'd need to broach them and those kind of tools are not cheap to make.
I'm about ready to take a small socket and JB weld it to the gear and then drill a hole in the centr of the gear so it can be bolted to the sunroof's splined drive shaft ( the ID of the shaft has like a 4 or 5mm thread). Then with a small hole cut in the plastic cover I can open and close the roof with a ratchet and small extension. If I can find some sort of rubber plug to stick over the hole it won't even look too bad. Am I cheap or what?