Re #6924 make sample thickness optional