This paper proposes an optimisation method for fabricating composite materials and functionally graded structures. Using the proposed method, 3D printing of copper (Cu)–polyethylene (PE) composite, Al2O3–ZrO2 ceramic composite and functionally graded CuO foams are utilised. This work aims to advance the capabilities of additive manufacturing by leveraging nature‐inspired approaches to create complex, tailored structures with enhanced performance across various industries. The major objective of the proposed method is to reduce the feed rate and increase the airflow rate and airflow temperature for the heat transfer process. Using the proposed technique in the advanced preparation conditions, Cu–PE composites with unreliable Cu substances are fabricated. The PE binder particle is melting as well as forming thick composites by means of soft surfaces. Using the proposed AHO approach, functionally graded materials with common distributions can be efficiently optimised. By then, the proposed model is implemented on the MATLAB platform, and its execution is calculated using the current procedures. The proposed technique displays superior outcomes in all existing methods like wild horse optimiser, particle swarm optimisation and heap‐based optimiser. The proposed method shows a throughput of 57 mm3. The existing method shows the throughput of 32, 27 and 45 mm3. The results show that the proposed method has higher throughput compared with existing methods.