How to convert a surface into a solid and vice versa in one operation?