yes, it is possible to do this.
create a column in the cart object for height width and depth.
in the eCart add to c art button, set those columns to be updatable from a text box or select list.
you can add a calculation in the ecart objects calculations tab to calculate the price based on the entered values.
the exact calculation will depend on how you want it to work.