As an update to the 2d involute (curved teeth) gears, I modified the program to produce 3d (extruded) gears. This required a change in drawing tactics.
Finally, not perfect at all but working gear set in 3D. Thanks to asplech's blog about involute gear and this Spur Gear document, I finally get to know better about these cogged wheels.