Variable stiffness and shape interface to improve comfort in orthoses and prostheses