Abstract A layout optimization method that integrates No-Fit Polygons (NFP) positioning and a genetic algorithm is proposed for the two-dimensional irregular sponge packing problem. Firstly, according to the geometric characteristics of the parts, they are classified and encoded to calculate the NFP between part classes, avoiding redundant NFP calculations. Simultaneously, heuristic rules aimed at minimizing the packing height are introduced to provide a comprehensive evaluation function for part positioning strategies, thus improving packing efficiency. Secondly, in the optimization of part sorting, a genetic algorithm is introduced to optimize the sponge packing algorithm. Finally, several standard cases provided by the European Special Interest Group on Cutting and Packing (ESICUP) are used to test the proposed packing method. The results show that compared to the traditional Bottom-Left algorithm, the computational efficiency of the proposed packing method is improved by 4.20% to 22.73%.