Find the capacity of 2D printed objects
Haskell, 54 bytes
f l=(sum$zipWith min(scanl1 max l)$scanr1 max l)-sum l

The expressions scanl1 max l and scanr1 max l compute the running maximum of the list reading forwards and backwards, i.e. the profile of the water plus land if water would go flow one direction.
Orig:
      #
 #    # #
 #    ###
 ##  ####
#########

Left:
      #~~
 #~~~~#~#
 #~~~~###
 ##~~####
#########

Right:
~~~~~~#
~#~~~~#~#
~#~~~~###
~##~~####
#########

Then, the profile of the overall picture is the minimum of these, which corresponds to where the water does not leak either direction.
Minimum:
      #
 #~~~~#~#
 #~~~~###
 ##~~####
#########

Finally, the amount of water is the sum of this list, which contains both water and land, minus the sum of the original list, which contains only land.