Rolling a rack to create a gear profile

 From:  Fubax
11914.2 In reply to 11914.1 
I might be onto something, did some research and maybe the correct method for creating such meshing gears would be a Curve Envelope script, that would trace a rolling shape of one curve over the other, in my case a straight rack over a curve arch. The script would work on a "tooling curve" first (here the rack curve) and expect it to be selected first, then selecting the roll path curve. It would expect that the initial position of the two is in its initial meshing position.
The roll path curve is essentially a pitch curve for a spur gear.

That would be all that's needed for production of the Envelope curve. The exact points making the envelope are a result of two parameters, position along rack curve and rack roll progress which drives its position and rotation. The Rack motion just assumes a straight rolling over the pitch roll curve, parallel at contact.

I got the idea from this video https://youtu.be/eG-z-791_ak?t=652