what is the right distance between the gear and rack?
in toolbox of solidwork i insert
Rack module 1
spure gear module 1 and with 20 Teeth
now i dont know hot to mate them?
What version of SolidWorks? At some point they added a Rack and Pinion mate to assemblies. This will give a graphical effect of each piece moving as the other does.
Lots of examples on YouTube: https://www.youtube.com/results?search_query=solidworks+rack+and+pinion