An efficient 3D SLAM (Simultaneous Localization and Map Building) method is developed for urban building environments using a tilted 2D LRF (Laser Range Finder), in which a 3D map is composed of perpendicular/horizontal planar polygons. While the mobile robot is moving, from the LRF scan distance data in each scan period, line segments on the scan plane are successively extracted. We propose an "expected line segment" concept for matching: to add each of these scan line segments to the most suitable line segment group for each perpendicular/horizontal planar polygon in the 3D map. After performing 2D localization to determine the pose of the mobile robot, we construct updated perpendicular/horizontal infinite planes and then determine their boundaries to obtain the perpendicular/horizontal planar polygons which constitute our 3D map. Finally, the proposed SLAM algorithm is validated via extensive simulations and experiments.