Based on the Independent Continuous Mapping method (ICM), a topological optimization model with continuous topological variables is built by introducing three filter functions for element weight, element allowable stress and element stiffness, which transform the 0-1 type discrete topological variables into continuous topological variables between 0 and 1. Two methods for the filter functions are adopted to avoid the structural singularity and recover falsely deleted elements: the weak material element method and the tiny section element method. Three criteria (no structural singularity, no violated constraints and no change of structural weight) are introduced to judge iteration convergence. These criteria allow finding an appropriate threshold by adjusting a discount factor in the iteration procedure. To improve the efficiency, the original optimization model is transformed into a dual problem according to the dual theory and solved in its dual space. By using MSC/Nastran as the structural solver and MSC/Patran as the developing platform, a topological optimization software of frame structures is accomplished. Numerical examples show that the ICM method is very efficient for the topological optimization of frame structures.