Beginner:Forming a solid from projected curve

 From:  SteveMacc (STEVEH)
4657.9 
Easiest way is to create your sphere. Then draw your hex shape. Use trim to cut the sphere with the hex and discard the bits you don't need. You will then have a surface that would be one of your caps. Just extrude this surface. then boolean a cylinder out of the middle.

You can extrude a non planar surface, because MoI caps it with the original surface.