Is there any automated way to tightly fit an irregular set (say tree-shaped) of nodes in TikZ?
The standard approach (using fit = (v1) (v2) ... (vk)) uses predefined shapes (eg. circle or rectangle) that might include vertices outside the desired set v1,v2,...,vk.
fityou can only use standard node shapes (rectangle, ellipse, circle, cloud, ... ), so, you should in such a cases draw curve "by hand" :-( – Zarko Jun 20 '17 at 08:49