Abstract Laser powder bed fusion (LPBF) is an additive manufacturing technique that is gaining popularity for producing metallic parts in various industries. However, parts produced by LPBF are prone to residual stress, deformation, cracks and other quality defects due to uneven temperature distribution during the LPBF process. To address this issue, in prior work, the authors have proposed SmartScan, a method for determining laser scan sequence in LPBF using an intelligent (i.e., model-based and optimization-driven) approach, rather than using heuristics, and applied it to simple 2D geometries. This paper presents a generalized SmartScan methodology that is applicable to arbitrary 3D geometries. This is achieved by: (1) expanding the thermal model and optimization approach used in SmartScan to multiple layers; (2) enabling SmartScan to process shapes with arbitrary contours and infill patterns within each layer; (3) providing the optimization in SmartScan with a balance of exploration and exploitation to make it less myopic; and (4) improving SmartScan’s computational efficiency via model order reduction using singular value decomposition. Sample 3D test artifacts are simulated and printed using SmartScan in comparison with common heuristic scan sequences. Reductions of up to 92% in temperature inhomogeneity, 86% in residual stress, 24% in maximum deformation and 50% in geometric inaccuracy were observed using SmartScan. An approach for using SmartScan for printing complex 3D parts in practice, by integrating it as a plug-in to a commercial slicing software, was also demonstrated experimentally, along with its benefits in significantly improving printed part quality.