AbstractOffsite construction is gaining attention due to government policies promoting automation and productivity. Therefore, understanding the impact of building design on construction cost and the carbon footprint associated with offsite construction is important for the improved sustainability and climate resilience of the built environment. This study aims to develop a system approach, with the aid of building information modeling (BIM), for 3D geometric modeling and automatic generative design toward optimizing the carbon footprint and construction cost from offsite construction. A mathematical formulation is proposed to represent the topological relationships between different kinds of precast and cast-in-situ elements, which in turn, underpin 3D geometric modeling for possible geometric variations within precast buildings. New generative algorithms are developed to automatically manipulate building geometrics subject to pre-defined constraints, and create parametric BIM models in compliance with material types assigned by users. A BIM-based automation tool is developed to extract and match the model geometry/material information with a customized BIM object library, through which carbon emission factors and cost coefficients can be retrieved for multi-criteria sustainability analysis. The proposed new approach empowers 3D geometric modeling and geometry-based design automation, which enable comprehensive exploration of design alternates in precast construction. The proposed new method is illustrated via a case study that investigates the impact of different design variations on embodied carbon and construction cost of precast structures. The proposed BIM development takes around 30 minutes to create 1,000–1,500 new design options. Besides, it produces design options that contain a 30% less carbon footprint and construction cost than reference buildings from the literature. The results indicate that our proposed method can support automated design exploration at early stages, which help to identify optimal solutions for more informed decision making.