You ask for examples. Here is an assembly of parts in Alibre. If you grab ahold of the shaft and rotate it the piston will move in the cylinder and the valve will cover and uncover steam ports. You can check for interference and correct travel.
It would take a lot more work to do this in 2D...