Parametric planning for the restoration and rehabilitation of architectural heritage