A periodic wall model has been developed to calculate the structure factor of hexagonal MCM-41 molecular sieves. This is a discrete lattice version of the continuum periodic cylindrical shell model of Oster and Riley. Using the periodic wall model we can explain the dramatic change in Bragg X-ray scattering that occurs upon removal of the structure-directing surfactant from the pores of the as-synthesized mesostructure. The physical origin of this intensity change can be traced to the sensitive phase relationship between the scattering from the pores and the walls constituting the open inorganic (silica) framework. The scattering intensity is affected only weakly by short-range disorder within the framework walls, provided that the long-range order of the pores channels is maintained. A similar periodic wall model may also be expected to explain the large Bragg intensity changes that occur upon surfactant removal from cubic MCM-48 mesostructures.