The automatic modeling of as-built building interiors, known as indoor building reconstruction, is gaining increasing attention because of its widespread applications. With the development of sensors to acquire high-quality point clouds, a new modeling scheme called scan-to-BIM (building information modeling) emerged. However, the traditional scan-to-BIM process is time tedious and labor intensive. Most existing automatic indoor building reconstruction solutions can only fit the specific data or lack of detailed model representation. In this thesis, we propose two automatic reconstruction methods from 2D linear primitives and 3D planar primitives respectively, to create 2D floor plans and 3D building models. The approach using 2D primitives is well suited for large-scale point clouds through a decomposition-and-reconstruction strategy. Moreover, it can retrieve semantic information of rooms and doors simultaneously. Another method using 3D primitives can deal with different types of point clouds and retain as much as structural details with respect to protruding structures, complicated ceilings, and fine corners. The experimental results indicate the effectiveness of proposed methods and the robustness against noises and downsampling.