// Last edited on 2019-11-22 04:21:08 by jstolfi #macro show_volume(label, dx, dy, dz, dens) // Prints a message with the {label} and the dimensions of some free storage volume. // Usually {dx} is width, {dy} is depth, {dz} is height. // Also prints the volume in liters, assuming that the // dimensions are in mm. If {dens > 0} also computes // the weight assuming density of {dens} kg/L. #local vol = dx*dy*dz/1000000; // Volume in liters. #debug concat("\n!! volume ", str(dx,6,1), " x ", str(dy,6,1), " x ", str(dz,6,1), " = ", str(vol,6,3)) #if (dens > 0) #local wt = vol*dens; #debug concat(" weight = ", str(wt,6,3)) #end #debug concat(" ", label, "\n") #end