This looks like a simple pair of revolves of an rectangle, that are cut out (boolean difference / solid difference).
quite similar to the “heads” of the bayonette.
I would recommend to update the initial definition to work with a construction plane, not only at WorldXY-Plane.
Please also notice that it s great to see some starting effort from your side.
My guess - this is why Quan Li did not post his definition.
See this older topic - which explains quite well the spirit of this forum: