Sir Joseph Whitworth is quite the famous name in engineering circles, credited with the development of such things as Whitworth threading (the first standardized thread pattern) and engineer’s blue. When he decided to make a rifle, he decided that he could make flat surfaces more precisely than round ones, and chose to design a rifle with a hexagonal bore and mechanically fitted bullets.
Video: [15:19]
https://youtu.be/Hi-S_horZGk?si=
Ian makes a correction to the original video: [7:18]
https://youtu.be/cUd2RQGfL7E?si=
Pretty sure that rifling nowadays is sometimes done this way. I think it’s called polygonal rifling.
Polygonal rifling is commonly found on nearly all Glock pistols along with many of Heckler & Koch’s guns just to name two brands. I think technically the mechanics of the Whitworth rifling differentiate it from modern polygonal rifling, but that’s me being very technical and pedantic.
Button rifling is common, but as I understand it the machines are pretty expensive, so it’s the big players doing that, mostly. There’s still plenty of traditional cut rifling too. IIRC, the cut rifling ends up with a better finish and doesn’t get as much stress imparted to the steel.