Unfortunately, a linear relationship only exists if the solid only consists of straight lines, and no curvature.A great tip for "irregular solids" would be using the fact that the relationship between the variables is always linear. This saves the hassle of drawing diagrams and utilising similar triangles (if they can be found).
PS: A very wise man shared this pearl of wisdom with me.