This work presents a method for the topology optimization of welded frame structures to minimize the manufacturing cost. The structures considered here consist of assemblies of geometric primitives such as bars and plates that are common in welded frame construction. A geometry projection technique is used to map the primitives onto a continuous density field that is subsequently used to interpolate material properties. As in density-based topology optimization techniques, the ensuing ersatz material is used to perform the structural analysis on a fixed mesh, thereby circumventing the need for re-meshing upon design changes. The distinct advantage of the representation by geometric primitives is the ease of computation of the manufacturing cost in terms of the design parameters, while the geometry projection facilitates the analysis within a continuous design region. The proposed method is demonstrated via the manufacturing-cost-minimization subject to a displacement constraint of 2D bar, 3D bar, and plate structures.