If there is a rectangle to the side $a$ and $b$. $(a \leq b)$. Then divide it into $ab$ smaller segments, and then draw the rectangle diameter.
How many intersections are there between Rectangular diameter and smaller parts?
For example, for a shape below, we have a rectangle on the sides 6 and 8 and when we draw the rectangle's diameter.
thanks

Let $d=\gcd(a,b) $. The diagonal intersects the $a$ horizontal lines and the $b$ vertical lines. So, the answer should be $a+b-k$, where $k$ is the number of points where the diagonal intersects a horizontal and vertical line simultaneously, that is, the diagonal passes through a lattice point. Suppose such an intersection occurs at $(x,y)$. Then, $\frac{y}{x}=\frac{a}{b}$, whence, $y=la', x=lb'$ where $a'=\frac{a}{d}$, $b'=\frac{b}{d}$ and $l\in\{1,2,...,d\} $. Therefore, $k=d$.
$\therefore$ The diameter intersects the smaller parts at $a+b-\gcd(a,b)$ points.