Repair and generalization of hand-made 3D building models