Bài báo trình bày việc tính toán và tối ưu hóa kết cấu khung máy in 3D bê tông dạng cổng trục kích thước lớn ứng dụng trong ngành xây dựng. Mô hình phần tử hữu hạn của khung máy với các điều kiện làm việc khác nhau được xây dựng trong môi trường NX Nastran và Ansys APDL để khảo sát sự ảnh hưởng của các tham số thiết kế đến ứng xử của khung máy. Để tự động tính toán, phân tích kết cấu cụm trục di động của máy, chương trình tính toán chuyển vị và tần số dao động riêng của hệ được xây dựng dựa trên ngôn ngữ Matlab kết nối với Ansys APDL. Mô hình toán tối ưu của cụm trục di động máy in được xây dựng với tiêu chí khối lượng của cụm di động nhỏ nhất, bốn điều kiện ràng buộc và sáu biến - là các tham số thiết kế. Bài toán được giải nhờ giải thuật di truyền. Căn cứ vào bộ tham số tối ưu và bảng kích thước thép hộp tiêu chuẩn, phương án thiết kế hợp lý (gần với phương án tối ưu) đã được lựa chọn, cho phép giảm khối lượng kết cấu 70,6 % so với phương án thiết kế theo kinh nghiệm ban đầu.This article presents the structural analysis and design optimization of the frame of a large-scale 3D concrete printer for construction. A finite element model of the frame of the 3D printer with various operating conditions was established using NX Nastran and Ansys APDL software. The script code for automated calculation of the deflection and natural frequency of the structure was built in the integrated Matlab-Ansys APDL language. The influence of different design parameters on the behavior of the structure is clearly evaluated with the aid of script code. Then, the optimal mathematical model of the X and Z axis structure is built with the criteria of the minimum mass, four constraints, and six variables as design parameters. The problem is solved by the genetic algorithm. Based on the optimal set of parameters and the standard box steel size table, a reasonable design option was selected, with the mass reduced by 70.6 % compared to the design option based on early experience.