Precise digital 3D models of indoor environments are needed in several applications, e.g., facility management, architecture, rescue and inspection robotics. This paper presents a new method that transforms a 3D volumetric model, acquired by a mobile robot equipped with a 3D laser scanner, into a very precise compact 3D map and generates semantic descriptions. The scanned 3D scene is matched against a coarse semantic description of general indoor environments. The matching is done by a Prolog program compiled from the scanned 3D scene and combined with clauses from the coarse semantic description. The generated scene specific knowledge produced by the unification in the Prolog program is used to refine the 3D model.