My Goal
I'm trying to make a shape in TikZ like the one depicted in the following sketch:
It's the union of an annulus and a rectangle, with the region shaded and outlined. The annulus has a given inner radius and outer radius. The rectangle, located at the bottom of the annulus and with its left side aligned with the center of the annulus, has a height equal to the width of the annulus and some length that is some value up to the outer radius of the annulus).
My Work So Far
\documentclass[tikz]{standalone}
% Definitions
\newcommand{\innerRadius}{3cm}
\newcommand{\outerRadius}{4cm}
\newcommand*{\footLength}{2.4cm}
\begin{document}
\begin{tikzpicture}
% Draw the ring
\draw[fill=gray!30,even odd rule] (0,0) circle (\outerRadius)
(0,0) circle (\innerRadius);
% Draw the rectangle
\draw[fill=gray!30] (0,-\outerRadius) rectangle (\footLength,-\innerRadius);
\end{tikzpicture}
\end{document}
This produces the following:
The problem with my code is that the rectangle's outline covers the annulus.
My Question
How can I make the desired figure in TikZ such that the outline is around the entire region rather than having the rectangle's outline be separate from the annulus's outline?
Bonus Points (not necessary!)
If the outer radius is large and the inner radius of the annulus is only slightly less, and if the rectangle is wide enough (e.g. 5 cm, 4 cm and 3.5 cm, respectively) then the outer edge of the annulus will intersect the top of the rectangle rather than its right side, as shown below. In this case, I don't like that the right side of the foot does not reach the annulus. Modeling the intended figure with an annulus and a rectangle is insufficient in this special case.
If possible, I'd love to have a solution that raises the right side of the rectangle up to meet the outer edge of the annulus. In this case, a rectangle would no longer be sufficient: a rectangle should not reach higher than the inner radius of the annulus on the left, but the right side needs to reach from the bottom to the outer radius on the right. This would give me more flexibility with my diagram's dimensions and would give me more insight into how TikZ works. However, I do not expect to need this, so this would be for my curiosity. I would be grateful for any solution, with or without this extension!



