A Framework for 3D Pattern Analysis and Reconstruction of Persian Architectural Elements