Construction of grating structure model based on Gibbs free energy and experimental verification by micro-milling