Content based image retrieval (CBIR), a technique which uses visual contents to search images from the large scale image databases, is an active area of research for the past decade. It is increasingly evident that an image retrieval system has to be domain specific. In this paper, we present an algorithm for retrieving images with respect to a database consisting of engineering/computer-aided design (CAD) models. The algorithm uses the shape information in an image along with its 3D information. A linear approximation procedure that can capture the depth information using the idea of shape from shading has been used. Retrieval of objects is then done using a similarity measure that combines shape and the depth information. Plotted precision/recall curves show that this method is very effective for an engineering database.