In this study, an ant colony optimisation (ACO)-based setup planning system focusing on an integrated procedure for automatic setup planning for machining cast parts is presented. It considers the selection of available machine tools, tolerance analysis and cost modelling simultaneously for achieving an optimal setup planning result. A tolerance cost factor is introduced when machining error stack-up occurs. The setup planning process can be divided into three stages: preliminary setup planning, tolerance planning and optimal setup planning. During the preliminary setup planning stage, design information is extracted from CAD models and each machining feature is assigned certain machine resource based on its tool access directions (TAD) and the tool orientation space of the available machine resource. During the tolerance planning stage, machining features are grouped into setups based on machine tools assigned and their TADs, and the machining datum for each setup is determined. The setups are next sequenced. Then the blueprint tolerances of the machining features are checked based on their ideal setup datum, and a tolerance cost factor is generated accordingly. During the optimal setup planning stage, the manufacturing cost of each setup plan is evaluated based on the cost model, in which, multiple objectives (setup change cost, machine tool cost, cutter change cost, etc.) that are possibly in conflict with each other are combined through the use of a weight vector and an aggregation function. The setup plan which incurs the least cost is taken as the final result. The feasibility of using the ACO algorithm is studied to address the NP-complete setup planning problem. A case study is carried out to illustrate the proposed approach. This approach can optimise product design and its manufacturing processes simultaneously to meet cost, time and performance objectives, achieving product quality and user satisfaction.