Knowledge-based Representation of 3D Shapes