  Giant planets form in protoplanetary disks while these disks are still
gas-rich, and can reveal their presence through the annular gaps they carve
out. HD 100546 is a gas-rich disk with a wide gap between between a radius of
~1 and 13 AU, possibly cleared out by a planetary companion or planetary
system. We want to identify the nature of the unseen companion near the far end
of the disk gap. We use mid-infrared interferometry at multiple baselines to
constrain the curvature of the disk wall at the far end of the gap. We use 2D
hydrodynamical simulations of embedded planets and brown dwarfs to estimate
viscosity of the disk and the mass of a companion close to the disk wall. We
find that the disk wall at the far end of the gap is not vertical, but
rounded-off by a gradient in the surface density. Such a gradient can be
reproduced in hydrodynamical simulations with a single, heavy companion
(>=30...80 M_Jup) while the disk has viscosity of at least \alpha{} >~ 5 10^-3.
Taking into account the changes in the temperature structure after gap opening
reduces the lower limit on the planet mass and disk viscosity to 20 M_Jup and
\alpha{} = 2 10^-3. The object in the disk gap of HD 100546 that shapes the
disk wall is most likely a 60(+20)(-40) M_Jup brown dwarf, while the disk
viscosity is estimated to be at least \alpha{} = 2 10^-3. The disk viscosity is
an important factor in estimating planetary masses from disk morphologies: more
viscous disks need heavier planets to open an equally deep gap.
