This paper describes an algorithm to select the cheapest tool sequence for machining 2.5D pockets using the milling process when the stock is uneven (noncylindrical). Uneven stock is generated when multiple setups are used to machine a prismatic part. Even though the pockets have flat bottom faces, the amount of material to be removed will vary along the depth of the pocket. This research has developed algorithms for finding accessible areas for tools, and pocket decomposition when the stock is uneven. Finally, it is shown that tool sequence selection problem can be formulated as the shortest path problem in a single-source, single-sink directed acyclic graph.