You can calculate %offset using the brick's datablock's brickSizeZ variable. Note that its in studs, so a 1x1 brick would have a Z size of 3, but its 0.6 torque units high (I think, on the top of my head). Just divide the value by 5 to convert it into real units, and then of course half that again to calculate the difference from the center of the brick to the top, so overall divide by 10.