The paper discusses the irregular parts packing problem based on an improved immune genetic algorithm, and a NIGA based on crowing mechanism is proposed. For improving the packing efficiency, the graphics-matching algorithms and clustering algorithm in the pretreatment of the part graphics are introduced. Matching algorithm of surplus rectangle as decoding algorithm for local optimization is proposed for automatic layout. In solving the large-scale packing problem, the application of immunity operator and niche genetic algorithm based on crowing mechanism improves the global optimization performance and velocity of convergence. The algorithms are effective and feasibility for solving the packing problem in the hull construction automatic packing system.