Shaykh Ibn Uthaymeen was asked:
“This letter is from Qasim…He says, ‘Is it allowed to build the masjid in the different geometric shapes like a hexagon? And what is the the correct way to build a masjid? I believe the cube and rectangle are the most correct. I ask this because I witnessed that the Masaajid, All praise is due to Allah, are few in the shape of a hexagon?
“Building a masjid in any form is allowed as long as it is in the direction of the Qiblah completely and apparently. Only if it is in the form of a church or a temple of the disbelievers, then it is not allowed due to what is in it of imitating them. As for if it is built upon a form that does not agree to anything of the temples of the disbelievers from churches, monasteries, or other than that, then there is no harm in it being in any form. As long as it is in the direction of the Qiblah completely and clearly”. End translation.[Reference]
Faisal Ibn Abdul Qaadir Ibn Hassan