Hi Rob,
a pic of one of my home switches...as you can see there is a ramp which activates the roller.
The combination is very conveniently placed within the machine boundaries, the ramp is such that if it overrides the switch no harm is done.
The spec on these switches give a hysteresis of 0.05 mm and are very repeatable.
Craig