We present an approach for producing complex nanoscale patterns by integrating computer-aided design (CAD) geometry processing with an atomic force microscope (AFM) based nanoindentation process. Surface modification is achieved by successive nanoindentation using a vibrating tip. By incorporating CAD geometry, this approach provides enhanced design and patterning capability for producing geometric features of both straight lines and freeform B-splines. This method automatically converts a pattern created in CAD software into a lithography plan for successive nanoindentation. For ensuring reliable lithography, key machining parameters including the interval of nanoindentation and the depth of nanogrooves have been investigated, and a proper procedure for determining the parameters has been provided. Finally, the automated nanolithography has been demonstrated on poly methylmethacrylate (PMMA) samples. It shows the robustness of complex pattern fabrication via the CAD integrated, AFM based nanoindentation approach.