How do you determine deck clearance in an engine using math?

Or the supposed to be deck heights
Or the rods all the same exact length.