Rim diameter: across the opening
Inside diameter runs through the center from one inner edge of the ring to the opposite inner edge. It excludes the thickness of the metal. Measuring outside edge to outside edge would include that thickness and give a larger value.
RIM: TOP VIEW
.--------.
.-' '-.
|<--- 18 in ---->|
'-. .-'
'--------'
inside opening
Labeled schematic, not a scale drawing.
Rim height: a vertical distance
For the NBA height measurement, use the floor and the upper edge of the ring as the two reference points. The hanging net, the bottom of the metal, and the top of the backboard are different endpoints.
A slanted line to the ring is not the vertical distance. When checking a measurement, keep the reference points and direction consistent. For an adjustable system, the selected setting also matters.