A generic approach for simplification of building ground plan